deprecated-near-apps / linkdrop-proxy

If you want to create really low cost linkdrops...
5 stars 2 forks source link

[Feature Idea] Add callback for when link is claimed #2

Open willemneal opened 3 years ago

willemneal commented 3 years ago

We could add another function, send_with_callback, which adds an argument for a contract that will be called after the claims process is over. This will allow other contracts to just implement a callback but get all the benefits of the linkdrop. The contract could also have its own send method to make the proxy and it would fit nicely into the existing pipelines.

I'll take a crack at this this weekend.

mattlockyer commented 3 years ago

I like this idea.

Just to clarify, send_with_callback will save the callback contractId, methodName, args and it will be called when "something" claims the linkdrop?

willemneal commented 3 years ago

Yep I have to update tests but here is my working prototype: #3.

willemneal commented 3 years ago

For now I just assume the contract has a callback method with just accound_id, but the change to add a custom method and args should be easy.