Open AustP opened 2 years ago
Hi @AustP , thanks for reaching out. I think delegated signatures could achieve what you're looking for: https://developer.algorand.org/docs/get-details/dapps/smart-contracts/smartsigs/modes/?from_query=delegate#delegated-approval . Let me know if that doesn't solve your problem - definitely want to make Algorand slicker.
Talking to some friends about this a little. The delegated approval is considered "the nuclear option" in the sense that it increases security risk (for obviously reasons). So, going to think about this problem a bit more.
Yes, I agree. Using delegated approval would work but in addition to increasing the security risk, also requires more overhead for the developer. I think this use case will become more and more common as Algorand grows, so making it easier for developers to accomplish this task seems like a good thing to me.
Also, I don't know if using 'gaid 0' to specify is the best solution to the problem. I was mainly trying to come up with a good way to convey the issue and a possible solution.
Hi @AustP we're likely going to take a more drastic move to solve this problem (you're not the first to bring up this clunkiness), so I'm going to move this ticket to iceboxed and move it to the team who will work on that area. Once we have the new work written up we'll link it here and close this ticket. FYI @yaovi-a
Problem
Imagine that we have a smart contract that someone can call, and it will mint a new NFT asset for them. If the user wants the NFT to be in their wallet, they will have to sign a minimum of two transactions. This makes for a poor experience asking the user to sign a transaction, wait 15 seconds, then immediately sign another transaction.
Solution
The solution is adding support for a transaction to specify the asset/app ID that was created earlier in the group transaction, similar to how gaid t works in TEAL. The user could then sign a single group transaction and the end result would be a new asset is minted, opted into, and transferred to their wallet. An example of how this could be done using goal is below:
If this worked for app IDs, then it would also handle the situation where you create a contract and want to fund it as an account in a single transaction.
Dependencies
No dependencies.
Urgency
The sooner this is implemented, the slicker Algorand becomes.