-
Notifications
You must be signed in to change notification settings - Fork 23
Remove requirement of "current treasury value" for transactions #1322
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
base: master
Are you sure you want to change the base?
Remove requirement of "current treasury value" for transactions #1322
Conversation
ca753ee to
24d7d28
Compare
cardano-cli/test/cardano-cli-golden/Test/Golden/Conway/Transaction/BuildRaw.hs
Outdated
Show resolved
Hide resolved
d3f1e86 to
edcde6f
Compare
| pCurrentTreasuryValueAndDonation = | ||
| optional ((,) <$> pCurrentTreasuryValue' <*> pTreasuryDonation') | ||
| pCurrentTreasuryValue :: Parser (Maybe TxCurrentTreasuryValue) | ||
| pCurrentTreasuryValue = |
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.
Why not condense pCurrentTreasuryValue and pCurrentTreasuryValue' into one function? pCurrentTreasuryValue' is not used anywhere else.
| asum | ||
| [ Opt.flag' IncludeCurrentTreasuryValue $ | ||
| mconcat | ||
| [ Opt.long "include-current-treasury-value" |
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.
Why deviate from the name that build-raw uses?
| | TxCborNotCanonical | ||
| deriving (Eq, Show) | ||
|
|
||
| -- | Whether to include the current treasury value in the transaction body. |
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.
A better comment would elaborate that this is really aimed at Plutus scripts i.e it is exposed in the plutus script context. This is already implied since it's in the transaction body but being explicit about it lets us know what specifically it's related to.
|
|
||
| -- | Whether to include the current treasury value in the transaction body. | ||
| -- If included, the current treasury value will be obtained from the node. | ||
| data IncludeCurrentTreasuryValue = IncludeCurrentTreasuryValue | ExcludeCurrentTreasuryValue |
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.
Why are you introducing this sum type? It's not necessary. What is wrong with (Maybe TxCurrentTreasuryValue)?
Changelog
Context
See #1149
How to trust this PR
Ensure that only the specified restriction was lifted and in the appropriate places. Ensure this is the right thing to do. Confirm I interpreted this message correctly: https://discord.com/channels/1136727663583698984/1239888777015590913/1364244737602879498
Checklist