diff --git a/examples/acceptance_tests/script_context/data/basic/inputs.cbor.template b/examples/acceptance_tests/script_context/data/basic/inputs.cbor.template deleted file mode 100644 index e7f75b49..00000000 --- a/examples/acceptance_tests/script_context/data/basic/inputs.cbor.template +++ /dev/null @@ -1 +0,0 @@ -81825820000000000000000000000000000000000000000000000000000000000000000000 diff --git a/examples/acceptance_tests/script_context/data/basic/outputs.cbor.template b/examples/acceptance_tests/script_context/data/basic/outputs.cbor.template deleted file mode 100644 index 71a0de30..00000000 --- a/examples/acceptance_tests/script_context/data/basic/outputs.cbor.template +++ /dev/null @@ -1 +0,0 @@ -81A300581D70{{ VALIDATOR_HASH }}011A3B9ACA00028201D81843D87980 diff --git a/examples/acceptance_tests/script_context/data/basic/tx.cbor.template b/examples/acceptance_tests/script_context/data/basic/tx.cbor.template deleted file mode 100644 index 1b121c91..00000000 --- a/examples/acceptance_tests/script_context/data/basic/tx.cbor.template +++ /dev/null @@ -1 +0,0 @@ -84A70081825820000000000000000000000000000000000000000000000000000000000000000000018182581D60111111111111111111111111111111111111111111111111111111111A3B9ACA0002182A0B5820FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0D818258200000000000000000000000000000000000000000000000000000000000000000001082581D60000000000000000000000000000000000000000000000000000000001A3B9ACA001101A20581840000D87980821A000F42401A05F5E1000681{{ VALIDATOR }}F5F6 diff --git a/examples/acceptance_tests/script_context/data/basic/tx.diag.template b/examples/acceptance_tests/script_context/data/basic/tx.diag.template deleted file mode 100644 index 872528af..00000000 --- a/examples/acceptance_tests/script_context/data/basic/tx.diag.template +++ /dev/null @@ -1,32 +0,0 @@ -[ - { 0: - [ [h'0000000000000000000000000000000000000000000000000000000000000000', 0] - ] - - , 1: - [ [h'6011111111111111111111111111111111111111111111111111111111', 1000000000] - ] - - , 2: 42 - - , 11: h'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' - - , 13: - [ [h'0000000000000000000000000000000000000000000000000000000000000000', 0] - ] - - , 16: - [ h'6000000000000000000000000000000000000000000000000000000000', 1000000000 - ] - - , 17: 1 - }, - - { 5: [[0, 0, 121([]), [1000000, 100000000]]] - - , 6: [h'VALIDATOR'] - - }, - true, - null -] diff --git a/examples/acceptance_tests/script_context/data/withdrawals/inputs.cbor.template b/examples/acceptance_tests/script_context/data/withdrawals/inputs.cbor.template deleted file mode 100644 index e7f75b49..00000000 --- a/examples/acceptance_tests/script_context/data/withdrawals/inputs.cbor.template +++ /dev/null @@ -1 +0,0 @@ -81825820000000000000000000000000000000000000000000000000000000000000000000 diff --git a/examples/acceptance_tests/script_context/data/withdrawals/outputs.cbor.template b/examples/acceptance_tests/script_context/data/withdrawals/outputs.cbor.template deleted file mode 100644 index 71a0de30..00000000 --- a/examples/acceptance_tests/script_context/data/withdrawals/outputs.cbor.template +++ /dev/null @@ -1 +0,0 @@ -81A300581D70{{ VALIDATOR_HASH }}011A3B9ACA00028201D81843D87980 diff --git a/examples/acceptance_tests/script_context/data/withdrawals/tx.cbor.template b/examples/acceptance_tests/script_context/data/withdrawals/tx.cbor.template deleted file mode 100644 index 62f86104..00000000 --- a/examples/acceptance_tests/script_context/data/withdrawals/tx.cbor.template +++ /dev/null @@ -1 +0,0 @@ -84A80081825820000000000000000000000000000000000000000000000000000000000000000000018182581D60111111111111111111111111111111111111111111111111111111111A3B9ACA0002182A05A2581DE022222222222222222222222222222222222222222222222222222222182A581DF05E1E8FA84F2B557DDC362329413CAA3FD89A1BE26BFD24BE05CE0A020E0B5820FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0D818258200000000000000000000000000000000000000000000000000000000000000000001082581D60000000000000000000000000000000000000000000000000000000001A3B9ACA001101A20582840000D87980821A000F42401A05F5E100840301D87980821A000F42401A05F5E1000682{{ VALIDATOR }}58AF58AD0100003232322225333004323253330063372E646E64004DD7198009801002240009210D48656C6C6F2C20576F726C64210013233300100137586600460066600460060089000240206EB8CC008C00C019200022253335573E004294054CCC024CDC79BAE300A00200114A226660060066016004002294088C8CCC0040052000003222333300A3370E008004016466600800866E0000D2002300D001001235573C6EA8004526165734AE855D11F5F6 diff --git a/examples/acceptance_tests/script_context/data/withdrawals/tx.diag.template b/examples/acceptance_tests/script_context/data/withdrawals/tx.diag.template deleted file mode 100644 index 787cabbe..00000000 --- a/examples/acceptance_tests/script_context/data/withdrawals/tx.diag.template +++ /dev/null @@ -1,40 +0,0 @@ -[ - { 0: - [ [h'0000000000000000000000000000000000000000000000000000000000000000', 0] - ] - - , 1: - [ [h'6011111111111111111111111111111111111111111111111111111111', 1000000000] - ] - - , 2: 42 - - , 5: - { h'e022222222222222222222222222222222222222222222222222222222': 42 - , h'f05e1e8fa84f2b557ddc362329413caa3fd89a1be26bfd24be05ce0a02': 14 - } - - , 11: h'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' - - , 13: - [ [h'0000000000000000000000000000000000000000000000000000000000000000', 0] - ] - - , 16: - [ h'6000000000000000000000000000000000000000000000000000000000', 1000000000 - ] - - , 17: 1 - }, - - { 5: - [ [0, 0, 121([]), [1000000, 100000000]] - , [3, 1, 121([]), [1000000, 100000000]] - ] - - , 6: [ h'58ad0100003232322225333004323253330063372e646e64004dd7198009801002240009210d48656c6c6f2c20576f726c64210013233300100137586600460066600460060089000240206eb8cc008c00c019200022253335573e004294054ccc024cdc79bae300a00200114a226660060066016004002294088c8ccc0040052000003222333300a3370e008004016466600800866e0000d2002300d001001235573c6ea8004526165734ae855d11' ] - - }, - true, - null -] diff --git a/examples/acceptance_tests/script_context/test.sh b/examples/acceptance_tests/script_context/test.sh index fb0d90fb..bd91d6d4 100755 --- a/examples/acceptance_tests/script_context/test.sh +++ b/examples/acceptance_tests/script_context/test.sh @@ -24,7 +24,7 @@ then exit 1 fi -aiken build +cargo run --quiet -- build if [ $? -ne 0 ]; then exit $? fi @@ -35,8 +35,8 @@ VALIDATOR_HASH=$(echo $BLUEPRINT | jq .hash | sed s/\"//g) VALIDATOR=$(echo $BLUEPRINT | jq .compiledCode | sed s/\"//g) VALIDATOR=$(cbor-diag --to hex --from diag <<< "h'$VALIDATOR'") -cp data/$TITLE/inputs.cbor.template data/$TITLE/inputs.cbor -sed "s/{{ VALIDATOR_HASH }}/$VALIDATOR_HASH/" data/$TITLE/outputs.cbor.template > data/$TITLE/outputs.cbor -sed "s/{{ VALIDATOR }}/$VALIDATOR/" data/$TITLE/tx.cbor.template > data/$TITLE/tx.cbor +cp ctx/$TITLE/inputs.cbor.template ctx/$TITLE/inputs.cbor +sed "s/{{ VALIDATOR_HASH }}/$VALIDATOR_HASH/" ctx/$TITLE/outputs.cbor.template > ctx/$TITLE/outputs.cbor +sed "s/{{ VALIDATOR }}/$VALIDATOR/" ctx/$TITLE/tx.cbor.template > ctx/$TITLE/tx.cbor -cargo run -- tx simulate data/$TITLE/tx.cbor data/$TITLE/inputs.cbor data/$TITLE/outputs.cbor +cargo run --quiet -- tx simulate ctx/$TITLE/tx.cbor ctx/$TITLE/inputs.cbor ctx/$TITLE/outputs.cbor