-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create Action type and send_with_callback #3
Conversation
I see where you're going with it. Could be really useful to kick off a cross contract call after linkdrop is claimed. e.g. I deploy this linkdrop proxy, call send_with_callback (restricted to only_owner) then a callback NFT contract and method could mint a free NFT, only for calls with predecessor of the linkdrop proxy contract. |
Bingo! That is exactly my plan. |
Yea cause then we don't have to redeploy our linkdrop proxy contracts to do "new things" with linkdrops. We can just keep creating them and changing the send_with_callback args. Great idea! Love the composability! |
@mattlockyer Just realized that we need to add a way to specify how much attached deposit is required for the final callback. But in other news, I've tested it with my newest project and realized I forgot about the attached deposit when the callback returns. |
This adds a new function
send_with_callback
, which takes a contract with a functionlink_callback(account_id)
, and the gas required for the call.To handle this change I added an Action enum to replace the Balance value type in the map:
Then when responding to claims the it checks the action to determine if a call back is added to the promise chain.