Skip to content

Commit 94468f7

Browse files
ch1bonoonio
authored andcommitted
Update withdraw zero tutorial
The dummy validator we use must also be able to certify if we want to demonstrate the (not needed!) registration step.
1 parent 7a9d846 commit 94468f7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docs/docs/how-to/withdraw-zero.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cardano-cli latest transaction build-raw \
3333
--tx-in 0000000000000000000000000000000000000000000000000000000000000000#0 \
3434
--tx-in-collateral 0000000000000000000000000000000000000000000000000000000000000000#0 \
3535
--tx-out addr_test1vp5cxztpc6hep9ds7fjgmle3l225tk8ske3rmwr9adu0m6qchmx5z+100000000 \
36-
--withdrawal stake_test17rekjamvnjyn3c3tcjpxe7ea20g7aek9vdqkaa3jefknz3gc066pt+0 \
36+
--withdrawal stake_test17zadf9dcekqn9cxkg3q68y56f4d6ujxsv8l6kq4kz2cuduc3gm35e+0 \
3737
--withdrawal-script-file rewarding.plutus \
3838
--withdrawal-redeemer-value "{}" \
3939
--withdrawal-execution-units "(10000000000, 14000000)" \
@@ -53,18 +53,18 @@ cat tx-signed.json | jq -c '{tag: "NewTx", transaction: .}' | websocat ws://loca
5353

5454
You might have noticed that registering the stake address was not needed - this is different than on the Cardano L1!
5555

56-
While you don't need to do it, you can still submit a transaction that registers the stake address and the L2 ledger will just ignore it (on the L1 you would also do this before using it in withdrawal transactions):
56+
While you don't need to do it, you can still submit a transaction that registers the stake address and the L2 ledger will just ignore it:
5757

5858
```shell title="Register stake transaction"
5959
cardano-cli latest stake-address registration-certificate \
60-
--stake-script-file rewarding.plutus \
61-
--key-reg-deposit-amt 0 \
60+
--stake-address stake_test17zadf9dcekqn9cxkg3q68y56f4d6ujxsv8l6kq4kz2cuduc3gm35e \
61+
--key-reg-deposit-amt 2000000 \
6262
--out-file reg.cert
6363

6464
cardano-cli latest transaction build-raw \
6565
--tx-in 0000000000000000000000000000000000000000000000000000000000000000#0 \
6666
--tx-in-collateral 0000000000000000000000000000000000000000000000000000000000000000#0 \
67-
--tx-out addr_test1vp5cxztpc6hep9ds7fjgmle3l225tk8ske3rmwr9adu0m6qchmx5z+100000000 \
67+
--tx-out addr_test1vp5cxztpc6hep9ds7fjgmle3l225tk8ske3rmwr9adu0m6qchmx5z+98000000 \
6868
--certificate reg.cert \
6969
--certificate-script-file rewarding.plutus \
7070
--certificate-redeemer-value "{}" \

hydra-plutus/src/Hydra/Contract/Dummy.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ dummyRewardingScript =
4747
[||
4848
\ctx ->
4949
check $ case unsafeFromBuiltinData ctx of
50+
ScriptContext{scriptContextScriptInfo = CertifyingScript{}} -> True
5051
ScriptContext{scriptContextScriptInfo = RewardingScript{}} -> True
5152
_ -> False
5253
||]

0 commit comments

Comments
 (0)