Add succinct README to explain what's going on.

This commit is contained in:
KtorZ 2023-02-14 16:25:17 +01:00
parent 685473ead6
commit a3078adce8
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
10 changed files with 97 additions and 1 deletions

View File

@ -1 +1 @@
data/**/*.cbor ctx/**/*.cbor

View File

@ -0,0 +1,18 @@
# Script Context Tests
This project contains a few handcrafted validators and transactions whose sole
purpose is to test the interpretation of the `ScriptContext` from within an
Aiken's validators.
So validators are meant to work hand-in-hand with an associated context.
Because we can't have fully static context (since they contain the validator
and its hash), we define _templates_.
Everything is a bit clunky, but steps have been captured in a `test.sh` script
for convenience.
## How to use
```
./test.sh [VALIDATOR_TITLE]
```

View File

@ -0,0 +1 @@
81825820000000000000000000000000000000000000000000000000000000000000000000

View File

@ -0,0 +1 @@
81A300581D70{{ VALIDATOR_HASH }}011A3B9ACA00028201D81843D87980

View File

@ -0,0 +1 @@
84A70081825820000000000000000000000000000000000000000000000000000000000000000000018182581D60111111111111111111111111111111111111111111111111111111111A3B9ACA0002182A0B5820FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0D818258200000000000000000000000000000000000000000000000000000000000000000001082581D60000000000000000000000000000000000000000000000000000000001A3B9ACA001101A20581840000D87980821A000F42401A05F5E1000681{{ VALIDATOR }}F5F6

View File

@ -0,0 +1,32 @@
[
{ 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
]

View File

@ -0,0 +1 @@
81825820000000000000000000000000000000000000000000000000000000000000000000

View File

@ -0,0 +1 @@
81A300581D70{{ VALIDATOR_HASH }}011A3B9ACA00028201D81843D87980

View File

@ -0,0 +1 @@
84A80081825820000000000000000000000000000000000000000000000000000000000000000000018182581D60111111111111111111111111111111111111111111111111111111111A3B9ACA0002182A05A2581DE022222222222222222222222222222222222222222222222222222222182A581DF05E1E8FA84F2B557DDC362329413CAA3FD89A1BE26BFD24BE05CE0A020E0B5820FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0D818258200000000000000000000000000000000000000000000000000000000000000000001082581D60000000000000000000000000000000000000000000000000000000001A3B9ACA001101A20582840000D87980821A000F42401A05F5E100840301D87980821A000F42401A05F5E1000682{{ VALIDATOR }}58AF58AD0100003232322225333004323253330063372E646E64004DD7198009801002240009210D48656C6C6F2C20576F726C64210013233300100137586600460066600460060089000240206EB8CC008C00C019200022253335573E004294054CCC024CDC79BAE300A00200114A226660060066016004002294088C8CCC0040052000003222333300A3370E008004016466600800866E0000D2002300D001001235573C6EA8004526165734AE855D11F5F6

View File

@ -0,0 +1,40 @@
[
{ 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
]