Skip to content
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

Mm/proposal procedures #422

Merged
merged 26 commits into from
Jun 28, 2024
Merged

Mm/proposal procedures #422

merged 26 commits into from
Jun 28, 2024

Conversation

mmontin
Copy link
Collaborator

@mmontin mmontin commented Jun 21, 2024

This add the core elements of proposal procedures feature to cooked-validators.

This also closes #419.

@mmontin mmontin marked this pull request as ready for review June 26, 2024 10:31
Copy link
Member

@florentc florentc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!! It is always satisfying to see how new features integrate well in the codebase. Also, I like the simplification of the redeemer api.

  • Changes to the API need to be applied to the CHEATSHEET.
  • The CHANGELOG should be updated as well.
  • I think splitting GenerateTx into several submodules and the documentation phase unrelated to proposal procedures should have been in another PR to ease focus during the review process. I did not review the generatetx submodules that are from previous code. I reviewed the new content though.

package.yaml Show resolved Hide resolved
package.yaml Show resolved Hide resolved
src/Cooked/Conversion/ToScriptHash.hs Outdated Show resolved Hide resolved
src/Cooked/Conversion/ToScriptHash.hs Outdated Show resolved Hide resolved
src/Cooked/MockChain/Balancing.hs Outdated Show resolved Hide resolved
src/Cooked/MockChain/GenerateTx/Proposal.hs Show resolved Hide resolved
src/Cooked/MockChain/GenerateTx/Proposal.hs Outdated Show resolved Hide resolved
src/Cooked/MockChain/GenerateTx/Proposal.hs Show resolved Hide resolved
src/Cooked/MockChain/GenerateTx/Proposal.hs Outdated Show resolved Hide resolved
src/Cooked/MockChain/GenerateTx/Witness.hs Outdated Show resolved Hide resolved
doc/IMPORTS.md Outdated Show resolved Hide resolved
doc/CONWAY.md Outdated Show resolved Hide resolved
src/Cooked/Pretty/Cooked.hs Outdated Show resolved Hide resolved
src/Cooked/Pretty/Cooked.hs Outdated Show resolved Hide resolved
src/Cooked/Pretty/Cooked.hs Show resolved Hide resolved
doc/CHEATSHEET.md Outdated Show resolved Hide resolved
doc/CHEATSHEET.md Outdated Show resolved Hide resolved
src/Cooked/Skeleton.hs Outdated Show resolved Hide resolved
Comment on lines +540 to +547
simpleTxSkelProposal :: (ToAddress a) => a -> TxGovAction -> TxSkelProposal
simpleTxSkelProposal a govAction = TxSkelProposal (toAddress a) govAction Nothing Nothing

withWitness :: (ToScript a) => TxSkelProposal -> (a, TxSkelRedeemer) -> TxSkelProposal
withWitness prop (s, red) = prop {txSkelProposalWitness = Just (toScript s, red)}

withAnchor :: TxSkelProposal -> String -> TxSkelProposal
withAnchor prop url = prop {txSkelProposalAnchor = Just url}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since a lot of datatypes in Skeleton already use existential types. Could we maybe do that with TxSkelProposal and replace its Api.Address with a where a has the ToAddress constraint? We would get the conversion for free without the need for simpleTxSkelProposal.

src/Cooked/MockChain/GenerateTx/Witness.hs Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
doc/CHEATSHEET.md Outdated Show resolved Hide resolved
src/Cooked/MockChain/GenerateTx/Witness.hs Outdated Show resolved Hide resolved
@mmontin mmontin merged commit 1002a38 into main Jun 28, 2024
7 checks passed
@mmontin mmontin deleted the mm/proposal-procedures branch June 28, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Haddock comments
2 participants