chore: use insta snapshot for blueprint validator tests
This commit is contained in:
parent
4eebd4628b
commit
2f694b01cb
|
@ -135,6 +135,8 @@ dependencies = [
|
|||
"hex",
|
||||
"ignore",
|
||||
"indexmap",
|
||||
"indoc",
|
||||
"insta",
|
||||
"itertools",
|
||||
"miette",
|
||||
"minicbor",
|
||||
|
|
|
@ -10,7 +10,7 @@ shared-version = true
|
|||
tag-name = "v{{version}}"
|
||||
|
||||
[workspace.dependencies]
|
||||
insta = { version = "1.30.0", features = ["yaml"] }
|
||||
insta = { version = "1.30.0", features = ["yaml", "json"] }
|
||||
|
||||
[profile.dev.package.insta]
|
||||
opt-level = 3
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
---
|
||||
source: crates/aiken-lang/src/parser/expr/block.rs
|
||||
description: "Code:\n\nlet b = {\n let x = 4\n\n x + 5\n}\n"
|
||||
---
|
||||
Assignment {
|
||||
location: 0..32,
|
||||
value: Sequence {
|
||||
location: 12..30,
|
||||
expressions: [
|
||||
Assignment {
|
||||
location: 12..21,
|
||||
value: UInt {
|
||||
location: 20..21,
|
||||
value: "4",
|
||||
base: Decimal {
|
||||
numeric_underscore: false,
|
||||
},
|
||||
},
|
||||
pattern: Var {
|
||||
location: 16..17,
|
||||
name: "x",
|
||||
},
|
||||
kind: Let,
|
||||
annotation: None,
|
||||
},
|
||||
BinOp {
|
||||
location: 25..30,
|
||||
name: AddInt,
|
||||
left: Var {
|
||||
location: 25..26,
|
||||
name: "x",
|
||||
},
|
||||
right: UInt {
|
||||
location: 29..30,
|
||||
value: "5",
|
||||
base: Decimal {
|
||||
numeric_underscore: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
pattern: Var {
|
||||
location: 4..5,
|
||||
name: "b",
|
||||
},
|
||||
kind: Let,
|
||||
annotation: None,
|
||||
}
|
|
@ -47,6 +47,8 @@ aiken-lang = { path = "../aiken-lang", version = "1.0.20-alpha" }
|
|||
uplc = { path = '../uplc', version = "1.0.20-alpha" }
|
||||
|
||||
[dev-dependencies]
|
||||
indoc = "2.0.1"
|
||||
insta.workspace = true
|
||||
proptest = "1.2.0"
|
||||
pretty_assertions = "1.3.0"
|
||||
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\ntype Either<left, right> {\n Left(left)\n Right(right)\n}\n\ntype Interval<a> {\n Finite(a)\n Infinite\n}\n\nvalidator {\n fn generics(redeemer: Either<ByteArray, Interval<Int>>, ctx: Void) {\n True\n }\n}\n"
|
||||
---
|
||||
{
|
||||
"title": "test_module.generics",
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1Either$ByteArray_test_module~1Interval$Int"
|
||||
}
|
||||
},
|
||||
"compiledCode": "59016f0100003232323232323232323232223253330084a22930a99804a4811856616c696461746f722072657475726e65642066616c736500136563253330083370e900000089919299980718080010a4c2a6601600e2c6eb8c038004c01800c54ccc020cdc3a400400226464a66601c60200042649319299980599b87480000044c8c94ccc044c04c008526153300e00a16375a602200260120042a66601666e1d20020011533300f3009002149854cc0312411d4578706563746564206e6f206669656c647320666f7220436f6e7374720016153300c007163009001153300b00716300e00130060031533009004163006002490128436f6e73747220696e646578206469646e2774206d61746368206120747970652076617269616e74004901334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e20657870656374656400230063754002460086ea80055cd2b9c5573aaae7955cfaba157441",
|
||||
"hash": "6b2032fcc8875dfe34dc93e4c9709188e60734ad668a31866ff14487",
|
||||
"definitions": {
|
||||
"ByteArray": {
|
||||
"dataType": "bytes"
|
||||
},
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
},
|
||||
"test_module/Either$ByteArray_test_module/Interval$Int": {
|
||||
"title": "Either",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Left",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/ByteArray"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Right",
|
||||
"dataType": "constructor",
|
||||
"index": 1,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/test_module~1Interval$Int"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"test_module/Interval$Int": {
|
||||
"title": "Interval",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Finite",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/Int"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Infinite",
|
||||
"dataType": "constructor",
|
||||
"index": 1,
|
||||
"fields": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\ntype Dict<key, value> {\n inner: List<(ByteArray, value)>\n}\n\ntype UUID { UUID }\n\nvalidator {\n fn list_2_tuples_as_map(redeemer: Dict<UUID, Int>, ctx: Void) {\n True\n }\n}\n"
|
||||
---
|
||||
{
|
||||
"title": "test_module.list_2_tuples_as_map",
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1Dict$test_module~1UUID_Int"
|
||||
}
|
||||
},
|
||||
"compiledCode": "58fe01000032323232323232223253330044a22930a99802a4811856616c696461746f722072657475726e65642066616c736500136563253330043370e9000000899192999805180600109924c646600200200444a66601800229309919801801980780119191bad300d002375c6016002601a0022a6600e921334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e206578706563746564001637566014002600e6ea800c54cc01524128436f6e73747220696e646578206469646e2774206d61746368206120747970652076617269616e74001630053754004ae695ce2ab9d5573caae7d5d0aba201",
|
||||
"hash": "216d9334e8daaa401663667302f26cfb53c63d88fe4b14cd8e2a9c1e",
|
||||
"definitions": {
|
||||
"ByteArray": {
|
||||
"dataType": "bytes"
|
||||
},
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
},
|
||||
"List$Tuple$ByteArray_Int": {
|
||||
"dataType": "map",
|
||||
"keys": {
|
||||
"$ref": "#/definitions/ByteArray"
|
||||
},
|
||||
"values": {
|
||||
"$ref": "#/definitions/Int"
|
||||
}
|
||||
},
|
||||
"test_module/Dict$test_module/UUID_Int": {
|
||||
"title": "Dict",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Dict",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"title": "inner",
|
||||
"$ref": "#/definitions/List$Tuple$ByteArray_Int"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\nvalidator {\n fn mint(redeemer: Data, ctx: Data) {\n True\n }\n}\n// "
|
||||
---
|
||||
{
|
||||
"title": "test_module.mint",
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Data"
|
||||
}
|
||||
},
|
||||
"compiledCode": "583301000032322253330034a22930a9980224811856616c696461746f722072657475726e65642066616c736500136565734ae701",
|
||||
"hash": "9fc33a6ffaa8d1f600c161aa383739d5af37807ed83347cc133521c9",
|
||||
"definitions": {
|
||||
"Data": {
|
||||
"title": "Data",
|
||||
"description": "Any Plutus data."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\nvalidator(utxo_ref: Int) {\n fn mint(redeemer: Data, ctx: Data) {\n True\n }\n}\n// "
|
||||
---
|
||||
{
|
||||
"title": "test_module.mint",
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Data"
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"title": "utxo_ref",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Int"
|
||||
}
|
||||
}
|
||||
],
|
||||
"compiledCode": "583701000032322322253330054a22930a998032491856616c696461746f722072657475726e65642066616c73650013656375a002ae695ce1",
|
||||
"hash": "2837caccfd96d636a07e0da584ebbef94069bd7bfa4447096ecd9b80",
|
||||
"definitions": {
|
||||
"Data": {
|
||||
"title": "Data",
|
||||
"description": "Any Plutus data."
|
||||
},
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\npub type Foo {\n foo: Data\n}\n\nvalidator {\n fn nested_data(datum: Foo, redeemer: Int, ctx: Void) {\n True\n }\n}\n"
|
||||
---
|
||||
{
|
||||
"title": "test_module.nested_data",
|
||||
"datum": {
|
||||
"title": "datum",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1Foo"
|
||||
}
|
||||
},
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Int"
|
||||
}
|
||||
},
|
||||
"compiledCode": "58d801000032323232323232222323253330064a22930a99803a491856616c696461746f722072657475726e65642066616c73650013656375a00664a66600a66e1d200000113232533300b300d002149854cc021241334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e2065787065637465640016300b001300837540082a6600c92128436f6e73747220696e646578206469646e2774206d61746368206120747970652076617269616e74001630063754006ae695ce2ab9d5573caae7d5d0aba201",
|
||||
"hash": "d61d9c4c310ef538d7c4e49b44836251d0c9ac61dad25692ac9bb69a",
|
||||
"definitions": {
|
||||
"Data": {
|
||||
"title": "Data",
|
||||
"description": "Any Plutus data."
|
||||
},
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
},
|
||||
"test_module/Foo": {
|
||||
"title": "Foo",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Foo",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"title": "foo",
|
||||
"$ref": "#/definitions/Data"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\npub opaque type Dict<key, value> {\n inner: List<(ByteArray, value)>\n}\n\ntype UUID { UUID }\n\nvalidator {\n fn opaque_singleton_variants(redeemer: Dict<UUID, Int>, ctx: Void) {\n True\n }\n}\n"
|
||||
---
|
||||
{
|
||||
"title": "test_module.opaque_singleton_variants",
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1Dict$test_module~1UUID_Int"
|
||||
}
|
||||
},
|
||||
"compiledCode": "58700100003232323232323222323253330054a22930a9980324811856616c696461746f722072657475726e65642066616c73650013656323300100100222533300a00114984c8cc00c00cc034008c8c8dd698058011bae3009001300b0013756004ae695ce2ab9d5573caae7d5d0aba201",
|
||||
"hash": "8a89baa6035d083e7d59575b8fa1e8bd3fe485df94d0af356557b224",
|
||||
"definitions": {
|
||||
"ByteArray": {
|
||||
"dataType": "bytes"
|
||||
},
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
},
|
||||
"test_module/Dict$test_module/UUID_Int": {
|
||||
"title": "Dict",
|
||||
"dataType": "map",
|
||||
"keys": {
|
||||
"$ref": "#/definitions/ByteArray"
|
||||
},
|
||||
"values": {
|
||||
"$ref": "#/definitions/Int"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\npub type LinkedList<a> {\n Cons(a, LinkedList<a>)\n Nil\n}\n\npub type Foo {\n Foo {\n foo: LinkedList<Bool>,\n }\n Bar {\n bar: Int,\n baz: (ByteArray, List<LinkedList<Int>>)\n }\n}\n\nvalidator {\n fn recursive_generic_types(datum: Foo, redeemer: LinkedList<Int>, ctx: Void) {\n True\n }\n}\n"
|
||||
---
|
||||
{
|
||||
"title": "test_module.recursive_generic_types",
|
||||
"datum": {
|
||||
"title": "datum",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1Foo"
|
||||
}
|
||||
},
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1LinkedList$Int"
|
||||
}
|
||||
},
|
||||
"compiledCode": "59023601000032323232323232323232323222232323232533300d4a22930a998072491856616c696461746f722072657475726e65642066616c736500136563002005323232533300e3370e900000089919299980a180b00109924c60080022a660220182c602800260160102a66601c66e1d200200113232323253330163018002132498c8c8c8cc004004008894ccc06800452613233003003301d002300c301b0013758602c0046eb8c05000454cc04c03858c8cdd8180b800980b980c0009bac30160013016002375a602800260160102a6601e0122c601600e60020024464a66601c66e1d200000113232323253330163018002132498cc01c01c00454cc04c03858c058004c058008cdc3a400460226ea8c050004c02c00854ccc038cdc3a40040022a66602460160042930a998078068b0a998078048b180580098008009119299980619b87480000044c8c8c8c94ccc050c0580084c92633007007001153301100c1630140013014002375a602400260120042a66601866e1d2002001153330103009002149854cc03402c5854cc03401c58c024005240128436f6e73747220696e646578206469646e2774206d61746368206120747970652076617269616e74004901334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e206578706563746564002300737540024600a6ea800524011d4578706563746564206e6f206669656c647320666f7220436f6e737472005734ae7155ceaab9e5573eae855d11",
|
||||
"hash": "795b1438b585aebb4e296e3ee180d1308718541ceca4225dfdd6d472",
|
||||
"definitions": {
|
||||
"Bool": {
|
||||
"title": "Bool",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "False",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": []
|
||||
},
|
||||
{
|
||||
"title": "True",
|
||||
"dataType": "constructor",
|
||||
"index": 1,
|
||||
"fields": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"ByteArray": {
|
||||
"dataType": "bytes"
|
||||
},
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
},
|
||||
"List$test_module/LinkedList$Int": {
|
||||
"dataType": "list",
|
||||
"items": {
|
||||
"$ref": "#/definitions/test_module~1LinkedList$Int"
|
||||
}
|
||||
},
|
||||
"Tuple$ByteArray_List$test_module/LinkedList$Int": {
|
||||
"title": "Tuple",
|
||||
"dataType": "list",
|
||||
"items": [
|
||||
{
|
||||
"$ref": "#/definitions/ByteArray"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/List$test_module~1LinkedList$Int"
|
||||
}
|
||||
]
|
||||
},
|
||||
"test_module/Foo": {
|
||||
"title": "Foo",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Foo",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"title": "foo",
|
||||
"$ref": "#/definitions/test_module~1LinkedList$Bool"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Bar",
|
||||
"dataType": "constructor",
|
||||
"index": 1,
|
||||
"fields": [
|
||||
{
|
||||
"title": "bar",
|
||||
"$ref": "#/definitions/Int"
|
||||
},
|
||||
{
|
||||
"title": "baz",
|
||||
"$ref": "#/definitions/Tuple$ByteArray_List$test_module~1LinkedList$Int"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"test_module/LinkedList$Bool": {
|
||||
"title": "LinkedList",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Cons",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/Bool"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/test_module~1LinkedList$Bool"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Nil",
|
||||
"dataType": "constructor",
|
||||
"index": 1,
|
||||
"fields": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"test_module/LinkedList$Int": {
|
||||
"title": "LinkedList",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Cons",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/Int"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/test_module~1LinkedList$Int"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Nil",
|
||||
"dataType": "constructor",
|
||||
"index": 1,
|
||||
"fields": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\npub type Expr {\n Val(Int)\n Sum(Expr, Expr)\n Mul(Expr, Expr)\n}\n\nvalidator {\n fn recursive_types(redeemer: Expr, ctx: Void) {\n True\n }\n}\n"
|
||||
---
|
||||
{
|
||||
"title": "test_module.recursive_types",
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1Expr"
|
||||
}
|
||||
},
|
||||
"compiledCode": "590155010000323232323232323232223253330064a22930a99803a4811856616c696461746f722072657475726e65642066616c736500136563323001001223253330083370e900000089919299980718080010a4c2a660160102c6eb4c038004c01c00854ccc020cdc3a4004002264646464a6660206024004264649319804004001198038038018a998068050b18080009808001180700098038010a99980419b87480100044c8c8c8c94ccc040c0480084c8c9263300800800233007007003153300d00a1630100013010002300e0013007002153300949128436f6e73747220696e646578206469646e2774206d61746368206120747970652076617269616e740016300937540020049201334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e20657870656374656400230053754002ae695ce2ab9d5573caae7d5d0aba21",
|
||||
"hash": "32815bdafe7e6e86659e3f73eda8f176fd8ad17aeb2bfa4b1325f6eb",
|
||||
"definitions": {
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
},
|
||||
"test_module/Expr": {
|
||||
"title": "Expr",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "Val",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/Int"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Sum",
|
||||
"dataType": "constructor",
|
||||
"index": 1,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/test_module~1Expr"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/test_module~1Expr"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Mul",
|
||||
"dataType": "constructor",
|
||||
"index": 2,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/test_module~1Expr"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/test_module~1Expr"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\n/// On-chain state\ntype State {\n /// The contestation period as a number of seconds\n contestationPeriod: ContestationPeriod,\n /// List of public key hashes of all participants\n parties: List<Party>,\n utxoHash: Hash<Blake2b_256>,\n}\n\n/// A Hash digest for a given algorithm.\ntype Hash<alg> = ByteArray\n\ntype Blake2b_256 { Blake2b_256 }\n\n/// Whatever\ntype ContestationPeriod {\n /// A positive, non-zero number of seconds.\n ContestationPeriod(Int)\n}\n\ntype Party =\n ByteArray\n\ntype Input {\n CollectCom\n Close\n /// Abort a transaction\n Abort\n}\n\nvalidator {\n fn simplified_hydra(datum: State, redeemer: Input, ctx: Data) {\n True\n }\n}\n"
|
||||
---
|
||||
{
|
||||
"title": "test_module.simplified_hydra",
|
||||
"datum": {
|
||||
"title": "datum",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1State"
|
||||
}
|
||||
},
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/test_module~1Input"
|
||||
}
|
||||
},
|
||||
"compiledCode": "5901be0100003232323232323232323232322223232533300b4a22930a998062491856616c696461746f722072657475726e65642066616c7365001365632533300b3370e90000008a99980798040020a4c2a6601800e2c2a66601666e1d20020011533300f3008004149854cc03001c5854ccc02ccdc3a40080022a66601e60100082930a998060038b0a998060030b180400199299980519b87480000044c8c8c8c8c8c94ccc050c0580084c8c926323300100100522533301700114984c8cc00c00cc068008dd7180c00099299980899b87480000044c8c94ccc05cc064008526153301401216375a602e002601c00c2a660240182c601c00a2a6602201e2c6eb8c050004c050008dd618090009809001180800098038020a998058028b1803801a4928436f6e73747220696e646578206469646e2774206d61746368206120747970652076617269616e740049011d4578706563746564206e6f206669656c647320666f7220436f6e737472002300737540024600a6ea80052401334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e206578706563746564005734ae7155ceaab9e5573eae855d11",
|
||||
"hash": "a2d6e5c1e686ffe47d6ad6d4c17df246d38169545c7d66af32c5aedc",
|
||||
"definitions": {
|
||||
"ByteArray": {
|
||||
"dataType": "bytes"
|
||||
},
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
},
|
||||
"List$ByteArray": {
|
||||
"dataType": "list",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ByteArray"
|
||||
}
|
||||
},
|
||||
"test_module/ContestationPeriod": {
|
||||
"title": "ContestationPeriod",
|
||||
"description": "Whatever",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "ContestationPeriod",
|
||||
"description": "A positive, non-zero number of seconds.",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"$ref": "#/definitions/Int"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"test_module/Input": {
|
||||
"title": "Input",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "CollectCom",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": []
|
||||
},
|
||||
{
|
||||
"title": "Close",
|
||||
"dataType": "constructor",
|
||||
"index": 1,
|
||||
"fields": []
|
||||
},
|
||||
{
|
||||
"title": "Abort",
|
||||
"description": "Abort a transaction",
|
||||
"dataType": "constructor",
|
||||
"index": 2,
|
||||
"fields": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"test_module/State": {
|
||||
"title": "State",
|
||||
"description": "On-chain state",
|
||||
"anyOf": [
|
||||
{
|
||||
"title": "State",
|
||||
"dataType": "constructor",
|
||||
"index": 0,
|
||||
"fields": [
|
||||
{
|
||||
"title": "contestationPeriod",
|
||||
"description": "The contestation period as a number of seconds",
|
||||
"$ref": "#/definitions/test_module~1ContestationPeriod"
|
||||
},
|
||||
{
|
||||
"title": "parties",
|
||||
"description": "List of public key hashes of all participants",
|
||||
"$ref": "#/definitions/List$ByteArray"
|
||||
},
|
||||
{
|
||||
"title": "utxoHash",
|
||||
"$ref": "#/definitions/ByteArray"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
---
|
||||
source: crates/aiken-project/src/blueprint/validator.rs
|
||||
description: "Code:\n\nvalidator {\n fn tuples(datum: (Int, ByteArray), redeemer: (Int, Int, Int), ctx: Void) {\n True\n }\n}\n"
|
||||
---
|
||||
{
|
||||
"title": "test_module.tuples",
|
||||
"datum": {
|
||||
"title": "datum",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Tuple$Int_ByteArray"
|
||||
}
|
||||
},
|
||||
"redeemer": {
|
||||
"title": "redeemer",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Tuple$Int_Int_Int"
|
||||
}
|
||||
},
|
||||
"compiledCode": "58c6010000323232323232322223232323253330084a22930a99804a491856616c696461746f722072657475726e65642066616c73650013656323232323253330103012002149854cc0352401334c6973742f5475706c652f436f6e73747220636f6e7461696e73206d6f7265206974656d73207468616e2065787065637465640016375a602000260200046eb4c038004c038008dd698060009bac00432375c60120046eb4c01c004c8cdd81805000980518058009bac0035734ae7155ceaab9e5573eae855d11",
|
||||
"hash": "4b4cf15504b916aff5ce2cad8cd93a57dd9d124fbdaa88837d255ed4",
|
||||
"definitions": {
|
||||
"ByteArray": {
|
||||
"dataType": "bytes"
|
||||
},
|
||||
"Int": {
|
||||
"dataType": "integer"
|
||||
},
|
||||
"Tuple$Int_ByteArray": {
|
||||
"title": "Tuple",
|
||||
"dataType": "list",
|
||||
"items": [
|
||||
{
|
||||
"$ref": "#/definitions/Int"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/ByteArray"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Tuple$Int_Int_Int": {
|
||||
"title": "Tuple",
|
||||
"dataType": "list",
|
||||
"items": [
|
||||
{
|
||||
"$ref": "#/definitions/Int"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/Int"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/Int"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue