-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Enable adding scripts with redeemers for withdrawals #308
Enable adding scripts with redeemers for withdrawals #308
Conversation
Note that ogmios v6 returns "withdraw:n" as the purpose for a withdrawal, so I changed the tag from "reward" to "withdraw". Not sure if ogmios v5 behaves differently. Edit: removed from this PR |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #308 +/- ##
==========================================
- Coverage 83.42% 83.09% -0.34%
==========================================
Files 28 28
Lines 3415 3431 +16
Branches 836 841 +5
==========================================
+ Hits 2849 2851 +2
- Misses 416 429 +13
- Partials 150 151 +1 ☔ View full report in Codecov by Sentry. |
c69ddd8
to
bb61a82
Compare
I have confirmed that the |
Moreover there is only one place where the redeemer tag is actually used... which is within the transaction builder. So changing the value is most likely not breaking anything relevant. Anyways, I am open to move the change to a seperate PR |
7a93074
to
4b6e214
Compare
Thanks for checking! I am fine with the name changing in future PR. |
redeemer = self._inputs_to_redeemers[utxo] | ||
redeemer.index = sorted_mint_policies.index( | ||
script_hash(self._inputs_to_scripts[utxo]) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note I removed this case because AFAIK it is impossible to enter this part of the branch. Mint redeemers can only be present in mint scripts, not in inputs.
This has a usecase in the "withdrawal trick", where only one withdrawal is executed per transaction, checking overall invariants, and all inputs/mints by the script just check that the withdrawal is present.