Skip to content

Propagate new TxBodyContent type#1309

Merged
Jimbo4350 merged 18 commits intomasterfrom
jordan/new-tx-body-content
Jan 28, 2026
Merged

Propagate new TxBodyContent type#1309
Jimbo4350 merged 18 commits intomasterfrom
jordan/new-tx-body-content

Conversation

@Jimbo4350
Copy link
Contributor

Changelog

- description: |
    Propagate new `TxBodyContent` type
# uncomment types applicable to the change:
  type:
  - compatible     

Context

Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

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

@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch 3 times, most recently from 559c0a2 to 0d78776 Compare November 27, 2025 15:21
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch from 84aa453 to dfdfae8 Compare December 5, 2025 15:22
Exp.TxMintValue $
Map.intersectionWith
(\assets wit -> (assets, BuildTxWith wit))
(\assets wit -> (assets, wit))

Check notice

Code scanning / HLint

Use (,) Note

cardano-cli/src/Cardano/CLI/EraBased/Transaction/Run.hs:1196:14-41: Suggestion: Use (,)
  
Found:
  \ assets wit -> (assets, wit)
  
Perhaps:
  (,)
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch from dfdfae8 to b1b3b59 Compare December 16, 2025 19:04
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch 3 times, most recently from 16b0451 to d1cb86e Compare December 24, 2025 20:30
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch 16 times, most recently from 9896d0c to f1da65d Compare January 15, 2026 14:49
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch from aa60a8c to 3c05d75 Compare January 15, 2026 15:06
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch from 06b29bf to ee402b1 Compare January 15, 2026 15:24
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch 4 times, most recently from 94e5b2a to ac0ef3a Compare January 26, 2026 17:30
Co-authored-by: Mateusz Gałażyn  <mateusz.galazyn@iohk.io>
@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch from ac0ef3a to bcb12b5 Compare January 27, 2026 13:23
Copy link
Contributor

Choose a reason for hiding this comment

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

haddocks missing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry what do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

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

There are no comments over the exported functions which end up in generated haddocks 😄

Copy link
Contributor

@carbolymer carbolymer left a comment

Choose a reason for hiding this comment

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

Blocking on unexplained golden file change




data AnyPlutusScript where
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

data AnyPlutusScript is a stopgap. It needs to be replaced with the AnyPlutusScript era in cardano-api: #1328

@Jimbo4350
Copy link
Contributor Author

Blocking on unexplained golden file change

#1309 (comment)

Copy link
Contributor

@palas palas left a comment

Choose a reason for hiding this comment

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

It all looks correct to me. I wrote a few potential simplifications that I saw. And the hardcoding of ConwayEra in some places (in estimation command for example) is a bit unsatisfying, but I cannot think of a way of getting around it at the moment.

witnessesProvidedMap :: Map PolicyId (ScriptWitness WitCtxMint era)
witnessesProvidedMap = fromList $ [(polid, sWit) | MintScriptWitnessWithPolicyId polid sWit <- scriptWitnesses]

let witnessesProvidedMap = fromList scriptWitnesses
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let witnessesProvidedMap = fromList scriptWitnesses
witnessesProvidedMap :: Map PolicyId (Exp.AnyWitness (Exp.LedgerEra era))
witnessesProvidedMap = fromList scriptWitnesses

For the signature, it also needs the following suggestion to compile

Comment on lines +1171 to +1172
:: (L.MultiAsset, [(PolicyId, Exp.AnyWitness (Exp.LedgerEra era))])
-> Either TxCmdError (Exp.TxMintValue (Exp.LedgerEra era))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
:: (L.MultiAsset, [(PolicyId, Exp.AnyWitness (Exp.LedgerEra era))])
-> Either TxCmdError (Exp.TxMintValue (Exp.LedgerEra era))
:: forall era
. (L.MultiAsset, [(PolicyId, Exp.AnyWitness (Exp.LedgerEra era))])
-> Either TxCmdError (Exp.TxMintValue (Exp.LedgerEra era))

For the previous suggestion to compile

Comment on lines +531 to +533
unsignedToToApiTx :: forall era. Exp.IsEra era => Exp.UnsignedTx era -> Api.Tx era
unsignedToToApiTx (Exp.UnsignedTx lTx) =
ShelleyTx (convert $ Exp.useEra @era) $ obtainCommonConstraints (Exp.useEra @era) lTx
Copy link
Contributor

Choose a reason for hiding this comment

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

unsignedToToApiTx -> unsignedToApiTx?

@Jimbo4350 Jimbo4350 force-pushed the jordan/new-tx-body-content branch from 9d62fb3 to 66661b0 Compare January 28, 2026 14:05
@Jimbo4350 Jimbo4350 enabled auto-merge January 28, 2026 14:05
@Jimbo4350 Jimbo4350 added this pull request to the merge queue Jan 28, 2026
Merged via the queue into master with commit dd03c5a Jan 28, 2026
25 checks passed
@Jimbo4350 Jimbo4350 deleted the jordan/new-tx-body-content branch January 28, 2026 15:42
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