@@ -25,6 +25,11 @@ $ export ERA_ACTIVATION_SECRET_KEY=**YOUR_ERA_ACTIVATION_SECRET_KEY**
25
25
$ export ASSETS_PATH=** YOUR_ASSETS_PATH**
26
26
```
27
27
28
+ Compute the current Cardano era:
29
+ ``` bash
30
+ CARDANO_ERA=$( cardano-cli query tip --testnet-magic $CARDANO_TESTNET_MAGIC | jq -r ' .era |= ascii_downcase | .era' )
31
+ ```
32
+
28
33
Set the transaction amount used when a script transaction is made:
29
34
``` bash
30
35
$ export SCRIPT_TX_VALUE=2000000
@@ -54,7 +59,7 @@ $ ./mithril-aggregator era generate-tx-datum --current-era-epoch 1 --era-markers
54
59
55
60
Now create the bootstrap transaction with datum:
56
61
``` bash
57
- $ cardano-cli transaction build --babbage-era --testnet-magic $CARDANO_TESTNET_MAGIC \
62
+ $ cardano-cli $CARDANO_ERA transaction build --testnet-magic $CARDANO_TESTNET_MAGIC \
58
63
--tx-in $TX_IN \
59
64
--tx-out $( cat $CARDANO_WALLET_PATH /payment.addr) +$SCRIPT_TX_VALUE \
60
65
--tx-out-inline-datum-file $ASSETS_PATH /mithril-era-datum-1.json \
@@ -65,7 +70,7 @@ Estimated transaction fee: Lovelace 168669
65
70
66
71
Then sign the transaction:
67
72
``` bash
68
- $ cardano-cli transaction sign \
73
+ $ cardano-cli $CARDANO_ERA transaction sign \
69
74
--tx-body-file $ASSETS_PATH /tx.raw \
70
75
--signing-key-file $CARDANO_WALLET_PATH /payment.skey \
71
76
--testnet-magic $CARDANO_TESTNET_MAGIC \
@@ -74,7 +79,7 @@ $ cardano-cli transaction sign \
74
79
75
80
And submit it:
76
81
``` bash
77
- $ cardano-cli transaction submit \
82
+ $ cardano-cli $CARDANO_ERA transaction submit \
78
83
--testnet-magic $CARDANO_TESTNET_MAGIC \
79
84
--tx-file $ASSETS_PATH /tx.signed
80
85
Transaction successfully submitted.
@@ -155,7 +160,7 @@ $ ./mithril-aggregator era generate-tx-datum --current-era-epoch 1 --era-markers
155
160
156
161
Now create the update transaction with datum:
157
162
``` bash
158
- $ cardano-cli transaction build --babbage-era --testnet-magic $CARDANO_TESTNET_MAGIC \
163
+ $ cardano-cli $CARDANO_ERA transaction build --testnet-magic $CARDANO_TESTNET_MAGIC \
159
164
--tx-in $TX_IN_DATUM \
160
165
--tx-in $TX_IN_NO_DATUM \
161
166
--tx-out $( cat $CARDANO_WALLET_PATH /payment.addr) +$SCRIPT_TX_VALUE \
@@ -167,7 +172,7 @@ Estimated transaction fee: Lovelace 179889
167
172
168
173
Then sign the transaction:
169
174
``` bash
170
- $ cardano-cli transaction sign \
175
+ $ cardano-cli $CARDANO_ERA transaction sign \
171
176
--tx-body-file $ASSETS_PATH /tx.raw \
172
177
--signing-key-file $CARDANO_WALLET_PATH /payment.skey \
173
178
--testnet-magic $CARDANO_TESTNET_MAGIC \
@@ -176,7 +181,7 @@ $ cardano-cli transaction sign \
176
181
177
182
And submit it:
178
183
``` bash
179
- $ cardano-cli transaction submit \
184
+ $ cardano-cli $CARDANO_ERA transaction submit \
180
185
--testnet-magic $CARDANO_TESTNET_MAGIC \
181
186
--tx-file $ASSETS_PATH /tx.signed
182
187
Transaction successfully submitted.
0 commit comments