Commit 496fd98
committed
Migrate to experimental TxOut in createCompatibleTx
Adapt to cardano-api PR #1209, which removes the legacy 'TxOut CtxTx era'
from the Compatible and Experimental APIs:
* 'createCompatibleTx' now takes '[Exp.TxOut (ShelleyLedgerEra era)]'
plus a new 'Map L.DataHash (L.Data ...)' argument carrying any
supplemental datum bodies. The legacy 'TxOut CtxTx era' bundled
supplemental datums inside outputs; 'Exp.TxOut' only carries the
datum hash, so callers thread the full datum bodies in explicitly.
* The bridge helpers 'fromLegacyTxOut', 'legacyDatumToDatum',
'supplementalDatumFromLegacy', 'toLedgerDatum', and the
'DatumDecodingError' type are deleted from 'Cardano.Api.Experimental.Tx'.
Migration:
* 'mkTxOut' and 'toTxOutInAnyEra' now return
'(Exp.TxOut (ShelleyLedgerEra era), Map DataHash (L.Data ...))'
directly, building the legacy 'TxOut CtxTx era' internally only as
a stepping stone for 'toShelleyTxOutAny'.
* 'createCompatibleTx' call site in 'Compatible/Transaction/Run.hs'
folds the per-output supplemental datums via 'Map.unions' and
passes them as the new argument.
* 'toTxOutInEra' and 'toTxOutInShelleyBasedEra' in
'EraBased/Transaction/Run.hs' delegate directly to 'mkTxOut' (the
deleted 'fromLegacyTxOut' is gone).
* 'TxCmdDatumDecodingError' is removed since the underlying
'Exp.DatumDecodingError' is gone and the new conversion is total.
Temporary 'cabal.project' additions (to be removed once #1209 is
merged and the next cardano-api is published to CHaP):
* 'source-repository-package' pointing at the PR branch so CI can
build against the unpublished API.
* Per-package '-Wwarn=deprecations -Wwarn=unused-imports' for
cardano-cli. The PR branch is several commits ahead of
cardano-api-11.1.0.0 and surfaces unrelated TxBody/TxBodyContent
deprecations (cardano-api PR #1200) plus a redundant
'Cardano.Ledger.Core' import in 'Cardano.CLI.Read' that became
visible after upstream re-exports widened. Both are separate
cleanups out of scope for this PR.1 parent 9ca9c9b commit 496fd98
5 files changed
Lines changed: 72 additions & 16 deletions
File tree
- cardano-cli/src/Cardano/CLI
- Compatible/Transaction
- EraBased/Transaction
- Type/Error
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
29 | 52 | | |
30 | 53 | | |
31 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
Lines changed: 33 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
21 | | - | |
| 30 | + | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
26 | 44 | | |
27 | 45 | | |
28 | 46 | | |
29 | 47 | | |
30 | 48 | | |
31 | 49 | | |
32 | | - | |
| 50 | + | |
33 | 51 | | |
34 | 52 | | |
35 | 53 | | |
| |||
46 | 64 | | |
47 | 65 | | |
48 | 66 | | |
49 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
50 | 80 | | |
51 | 81 | | |
52 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
| 370 | + | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
373 | | - | |
374 | | - | |
375 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
| |||
1176 | 1178 | | |
1177 | 1179 | | |
1178 | 1180 | | |
1179 | | - | |
| 1181 | + | |
| 1182 | + | |
1180 | 1183 | | |
1181 | 1184 | | |
1182 | 1185 | | |
1183 | | - | |
| 1186 | + | |
1184 | 1187 | | |
1185 | | - | |
1186 | | - | |
| 1188 | + | |
| 1189 | + | |
1187 | 1190 | | |
1188 | 1191 | | |
1189 | 1192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | | - | |
203 | | - | |
204 | 201 | | |
205 | 202 | | |
206 | 203 | | |
| |||
0 commit comments