Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnshearing/b76d0f9320ee6c937700eab22f0b8c30 to your computer and use it in GitHub Desktop.
Save johnshearing/b76d0f9320ee6c937700eab22f0b8c30 to your computer and use it in GitHub Desktop.
There was an error at block ten of Lesson 4
https://github.com/input-output-hk/marlowe-cardano/blob/73ed922f025e494d0060e21cfba4a340b70d12e0/marlowe-cli/lectures/04-marlowe-cli-concrete.ipynb
This is the History of input and output at the Linux terminal.
The error message is shown at the very bottom.
C:\Users\jshea>wsl
johnshearing@LAPTOP-NGQPLDGT:/mnt/c/Users/jshea$ cd ~
johnshearing@LAPTOP-NGQPLDGT:~$ ls
cardano-src marlowe-cardano plutus-apps plutus-pioneer-program tut
johnshearing@LAPTOP-NGQPLDGT:~$ cd marlowe-cardano/
johnshearing@LAPTOP-NGQPLDGT:~/marlowe-cardano$ nix-shell
trace: To materialize project.plan-nix for cabal-install entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: To materialize project.plan-nix for haskell-project entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
trace: To materialize project.plan-nix for haskell-project entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
nix-pre-commit-hooks: hooks up to date
pid 13254's current affinity list: 0-11
pid 13254's new affinity list: 0-11
[nix-shell:~/marlowe-cardano]$ WALLET_SKEY=my-wallet.skey
[nix-shell:~/marlowe-cardano]$ cat my-wallet.skey
{
"type": "PaymentExtendedSigningKeyShelley_ed25519_bip32",
"description": "",
"cborHex": "5880583202e72bc4b6cdc51f25f41f51df8f31798eb74df39fc99172188ab5e2d842ebb1e39685cb29781bb94ebdae397429bdd60301ee443e442982f9a655b0ff27c778a7e9dd304d23f9cc2700610c8c7a55a5ef291b75f3174c1703014181881a146029f958a8c2802d7729e3c06f4ced06e976e2c8c6a2e7f34a6d8b23fda496"
}
[nix-shell:~/marlowe-cardano]$ WALLET_ADDRESS=$(cat my-wallet.address)
[nix-shell:~/marlowe-cardano]$ echo $WALLET_ADDRESS
addr_test1vz6fkvz3mj5ddpcleqyv9cxyjm5trrmtmrdudyd5rcvnjec98pk2g
[nix-shell:~/marlowe-cardano]$ export CARDANO_TESTNET_MAGIC=1567
[nix-shell:~/marlowe-cardano]$ export CARDANO_NODE_SOCKET_PATH=/tmp/node.socket
[nix-shell:~/marlowe-cardano]$ marlowe-cli util select $(cat my-wallet.address)
TxIn "9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4" (TxIx 0)
TxIn "9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4" (TxIx 1)
TxIn "9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4" (TxIx 2)
TxIn "9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4" (TxIx 3)
[nix-shell:~/marlowe-cardano]$ MEDIATOR_ROLE="$MEDIATOR_ROLE"
[nix-shell:~/marlowe-cardano]$ MEDIATOR_SKEY=mediator.skey
[nix-shell:~/marlowe-cardano]$ MEDIATOR_VKEY=mediator.vkey
[nix-shell:~/marlowe-cardano]$ cardano-cli address key-gen --signing-key-file "$MEDIATOR_SKEY" --verification-key-file "$MEDIATOR_VKEY"
[nix-shell:~/marlowe-cardano]$ MEDIATOR_ADDRESS=$(cardano-cli address build --testnet-magic "$CARDANO_TESTNET_MAGIC" --payment-verification-key-file "$MEDIATOR_VKEY")
[nix-shell:~/marlowe-cardano]$ echo $MEDIATOR_ADDRESS
addr_test1vzm36qfleamz5r7un00wzjtpkywfxk6hvg80pnflzx0qa9gsxc687
[nix-shell:~/marlowe-cardano]$ BUYER_ROLE="$BUYER_ROLE"
[nix-shell:~/marlowe-cardano]$ BUYER_SKEY=buyer.skey
[nix-shell:~/marlowe-cardano]$ BUYER_VKEY=buyer.vkey
[nix-shell:~/marlowe-cardano]$ cardano-cli address key-gen --signing-key-file "$BUYER_SKEY" --verification-key-file "$BUYER_VKEY"
[nix-shell:~/marlowe-cardano]$ BUYER_ADDRESS=$(cardano-cli address build --testnet-magic "$CARDANO_TESTNET_MAGIC" --payment-verification-key-file "$BUYER_VKEY")
[nix-shell:~/marlowe-cardano]$ echo $BUYER_ADDRESS
addr_test1vqx9m3p3p550hrrd8wdxlxze0lm7tmwc6x8fcaqfz6jwhhq3s8huh
[nix-shell:~/marlowe-cardano]$ SELLER_ROLE="$SELLER_ROLE"
[nix-shell:~/marlowe-cardano]$ SELLER_SKEY=seller.skey
[nix-shell:~/marlowe-cardano]$ SELLER_VKEY=seller.vkey
[nix-shell:~/marlowe-cardano]$ cardano-cli address key-gen --signing-key-file "$SELLER_SKEY" --verification-key-file "$SELLER_VKEY"
[nix-shell:~/marlowe-cardano]$ SELLER_ADDRESS=$(cardano-cli address build --testnet-magic "$CARDANO_TESTNET_MAGIC" --payment-verification-key-file "$SELLER_VKEY")
[nix-shell:~/marlowe-cardano]$ echo $SELLER_ADDRESS
addr_test1vr5xh920jzg302ds86cun9x77x9hqfyq74qyxflk8knj6qs7nc3ks
[nix-shell:~/marlowe-cardano]$ cardano-cli query utxo --testnet-magic "$CARDANO_TESTNET_MAGIC" --address "$WALLET_ADDRESS"
TxHash TxIx Amount
--------------------------------------------------------------------------------------
9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4 0 969821035 lovelace + TxOutDatumNone
9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4 1 10000000 lovelace + 1 f5d49aca7cd69d9b8347ce307e6f326e0c088181733ff9a5c1d66e57.434d + TxOutDatumNone
9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4 2 10000000 lovelace + 1 f5d49aca7cd69d9b8347ce307e6f326e0c088181733ff9a5c1d66e57.4642 + TxOutDatumNone
9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4 3 10000000 lovelace + 1 f5d49aca7cd69d9b8347ce307e6f326e0c088181733ff9a5c1d66e57.544d + TxOutDatumNone
[nix-shell:~/marlowe-cardano]$ TX_IN=9d882141b058fb39559a94e1d3701bccefef67597f3aef71b929bd2a689aadb4
[nix-shell:~/marlowe-cardano]$ marlowe-cli transaction simple --required-signer "$WALLET_SKEY" --tx-in "$TX_IN#0" --tx-in "$TX_IN#1" --tx-in "$TX_IN#2" --tx-in "$TX_IN#3" --change-address "$WALLET_ADDRESS" --tx-out "$MEDIATOR_ADDRESS+20000000+1 $ROLES_CURRENCY.$MEDIATOR_ROLE" --tx-out "$BUYER_ADDRESS+300000000+1 $ROLES_CURRENCY.$BUYER_ROLE" --tx-out "$SELLER_ADDRESS+40000000+1 $ROLES_CURRENCY.$SELLER_ROLE" --out-file /dev/null --submit 600
option --tx-out: Invalid token.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment