-
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
Withdrawals #11
Comments
Hello @Quantumplation , I'm interested about the "withdraw 0" trick, what is it about? As for your suggestion, what do you think about ariady-putra@0402536 I just exposed all ScriptContext.Transaction fields. For
The same goes for |
If you want some logic that runs globally for the whole transaction, you can make it a staking script and then "withdraw" the staking rewards. The ledger doesn't care that there are 0 rewards to withdraw, it'll run the script regardless. So, for example, your spending validator could just check that script X is in the list of withdrawals, and then the staking script can check that globally the whole transaction is valid. It saves a huge amount of execution units, makes it easier to deal with double satisfaction, etc. And that API looks great to me! |
Huh, interesting on what people could come up with!
Cool, I'll push |
@ariady-putra you might also be interested in CIP-0112 which introduces a "proper" mechanism for this. |
Hey @Quantumplation , I would also like to have a receiving validator, so that this type of contract must only contain valid UTXOs. It prevents assets being locked in a contract, and also prevent people from spamming a contract's UTXOs. I don't know about the feasibility though |
You can do a receiving validator, or close to it, by minting a token and paying it into the script |
Hey, interesting input. It's something for me to consider |
Given the prevalence of the "withdraw 0" trick, it'd be nice to be able to tweak the withdrawals field of the script context
The text was updated successfully, but these errors were encountered: