Skip to content

Conversation

carbolymer
Copy link
Contributor

@carbolymer carbolymer commented Mar 10, 2025

Changelog

- description: |
    Remove minting capabilities in eras prior to Mary.
    Change minted assets representation to `L.MultiAsset` instead of `Value`.
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
   - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

The minted amount was represented as Value which includes ADA. It was only guarded against "minting ada" in parser, not in the type. This PR changes the type to use ledger's L.MultiAsset, which contains only non-ADA assets.

Also the minting options are removed from eras before Mary.

Requires changes from to build successfully:

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@carbolymer carbolymer self-assigned this Mar 10, 2025
@carbolymer carbolymer force-pushed the mgalazyn/refactor/better-represent-minting-values branch from 5b296e4 to bbb2145 Compare March 13, 2025 16:32
@carbolymer carbolymer force-pushed the mgalazyn/refactor/better-represent-minting-values branch from bbb2145 to 12e662a Compare March 14, 2025 14:22
@carbolymer carbolymer force-pushed the mgalazyn/refactor/better-represent-minting-values branch 5 times, most recently from 03b775f to b55d002 Compare March 14, 2025 15:28
@carbolymer carbolymer marked this pull request as ready for review March 14, 2025 16:11
@carbolymer carbolymer changed the title Better represent minting values Better representation of minting values Mar 14, 2025
@carbolymer carbolymer changed the title Better representation of minting values Better representation of minting values in the code Mar 14, 2025
@carbolymer carbolymer requested review from a team as code owners March 18, 2025 19:59
@carbolymer carbolymer force-pushed the mgalazyn/refactor/better-represent-minting-values branch 4 times, most recently from 96bb16e to 568b12f Compare March 19, 2025 18:57
@carbolymer carbolymer force-pushed the mgalazyn/refactor/better-represent-minting-values branch from 568b12f to 61b1833 Compare March 19, 2025 18:57
| --tx-out-inline-datum-value JSON_VALUE
]
[--tx-out-reference-script-file FILEPATH]]
[--mint VALUE
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

<*> many pTxOut
<*> pChangeAddress
<*> optional (pMintMultiAsset sbe AutoBalance)
<*> (fmap join . optional $ pMintMultiAsset sbe AutoBalance)
Copy link
Contributor

@Jimbo4350 Jimbo4350 Mar 19, 2025

Choose a reason for hiding this comment

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

You can parameterize pMintMultiAsset on MaryEraOnwards era, remove the Maybe from the type signature and call caseShelleyToAllegraOrMaryEraOnwards here instead. I think that is cleaner but I wouldn't block the PR on it.

@carbolymer carbolymer enabled auto-merge March 20, 2025 08:54
@carbolymer carbolymer added this pull request to the merge queue Mar 20, 2025
Merged via the queue into master with commit deaa3d1 Mar 20, 2025
25 checks passed
@carbolymer carbolymer deleted the mgalazyn/refactor/better-represent-minting-values branch March 20, 2025 10:35
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.

3 participants