Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Aug 22, 2024
1 parent f47c484 commit 8c28982
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions 614-repro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## Basic repro
```bash
rm -rf x509-cert-example/orchestrator
mkdir x509-cert-example/orchestrator
cd x509-cert-example/orchestrator
cp ../../local-testnet/example/utxo-keys/utxo1.skey ./orchestrator.skey
cp ../../local-testnet/example/utxo-keys/utxo1.vkey ./orchestrator.vkey
cardano-cli address build --testnet-magic 42 --payment-verification-key-file orchestrator.vkey > orchestrator.addr
```

```bash
cardano-cli transaction policyid --script-file ../../assets/V3/coldAlwaysTrueMint.plutus > coldAlwaysTrueMint.pol
cardano-cli address build --testnet-magic 42 --payment-script-file ../../assets/V3/coldLockScript.plutus > coldLockScript.addr
cardano-cli conway query protocol-parameters --testnet-magic 42 --out-file pp.json
```


### Failing one:
create transaction:
```bash
cardano-cli conway transaction build --testnet-magic 42 \
--tx-in "$(cardano-cli query utxo --address "$(cat orchestrator.addr)" --testnet-magic 42 --out-file /dev/stdout | jq -r 'keys[0]')" \
--tx-in-collateral "$(cardano-cli query utxo --address "$(cat orchestrator.addr)" --testnet-magic 42 --out-file /dev/stdout | jq -r 'keys[0]')" \
--mint "1 $(cat coldAlwaysTrueMint.pol).4964656e74697479204e4654" \
--tx-out $(cat coldLockScript.addr)+5000000 \
--tx-out-inline-datum-file ../../assets/datums/initColdLockScriptDatum.json \
--change-address $(cat orchestrator.addr) \
--mint-script-file ../../assets/V3/coldAlwaysTrueMint.plutus --mint-redeemer-value {} \
--out-file tx.fail
```
submit a transaction:
```bash
cardano-cli transaction sign --testnet-magic 42 --signing-key-file orchestrator.skey --tx-body-file tx.fail --out-file tx.signed
cardano-cli transaction submit --testnet-magic 42 --tx-file tx.signed
```

### Succeeding one:
```bash
cardano-cli conway transaction build --testnet-magic 42 \
--tx-in "$(cardano-cli query utxo --address "$(cat orchestrator.addr)" --testnet-magic 42 --out-file /dev/stdout | jq -r 'keys[0]')" \
--tx-in-collateral "$(cardano-cli query utxo --address "$(cat orchestrator.addr)" --testnet-magic 42 --out-file /dev/stdout | jq -r 'keys[0]')" \
--mint "1 $(cat coldAlwaysTrueMint.pol).4964656e74697479204e4654" \
--tx-out $(cat coldLockScript.addr)+5000000+"1 $(cat coldAlwaysTrueMint.pol).4964656e74697479204e4654" \
--tx-out-inline-datum-file ../../assets/datums/initColdLockScriptDatum.json \
--change-address $(cat orchestrator.addr) \
--mint-script-file ../../assets/V3/coldAlwaysTrueMint.plutus --mint-redeemer-value {} \
--out-file tx.success
```
submit a transaction:
```bash
cardano-cli transaction sign --testnet-magic 42 --signing-key-file orchestrator.skey --tx-body-file tx.fail --out-file tx.signed
cardano-cli transaction submit --testnet-magic 42 --tx-file tx.signed
```

0 comments on commit 8c28982

Please sign in to comment.