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

Expand TxAuxData interface #4267

Merged
merged 6 commits into from
Apr 16, 2024
Merged

Expand TxAuxData interface #4267

merged 6 commits into from
Apr 16, 2024

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Apr 16, 2024

Description

Because TxAuxData isn't really used in the ledger rules it has been neglected whenever we did the refactor of the ledger interface using lenses.

Now that we expanding our testing and have a need for era agnostic type construction we could use the same interface for TxAuxData as for other type families in ledger.

This PR introduces:

  • Cardano.Ledger.Metadata module with Metadatum type moved to it from cardano-ledger-shelley
  • mkBasicTxAuxData and metadataTxAuxDataL to EraTxAuxData type class.
  • AllegraEraTxAuxData type class with timelockScriptsTxAuxDataL lens
  • AlonzoEraTxAuxData type class with plutusScriptsTxAuxDataL lens

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@lehins lehins requested review from Lucsanszky and teodanciu April 16, 2024 03:29
@lehins lehins force-pushed the lehins/expand-TxAuxData-interface branch from 0d6f515 to 8800b82 Compare April 16, 2024 04:46
@lehins lehins mentioned this pull request Apr 16, 2024
9 tasks
@lehins lehins force-pushed the lehins/expand-TxAuxData-interface branch from 8800b82 to 546c7e0 Compare April 16, 2024 06:05
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

Great! (and almost definitely what I should have done in my other PR instead of assuming there is some reason to not have it and hacking my way around it).
Looks good to me, so nice to have this loose end tied up.

@lehins lehins force-pushed the lehins/expand-TxAuxData-interface branch from 546c7e0 to 6c6456b Compare April 16, 2024 15:14
@lehins lehins enabled auto-merge April 16, 2024 15:19
@lehins lehins force-pushed the lehins/expand-TxAuxData-interface branch from 6c6456b to 72428b2 Compare April 16, 2024 19:31
@lehins lehins merged commit 1b9466f into master Apr 16, 2024
15 checks passed
@lehins lehins deleted the lehins/expand-TxAuxData-interface branch April 16, 2024 21:47
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.

2 participants