diff --git a/examples/acceptance_tests/036/plutus.json b/examples/acceptance_tests/036/plutus.json index 74c30a90..2cd51ef2 100644 --- a/examples/acceptance_tests/036/plutus.json +++ b/examples/acceptance_tests/036/plutus.json @@ -8,14 +8,16 @@ { "title": "spend.spend", "datum": { - "title": "Data", - "description": "Any Plutus data.", - "schema": {} + "title": "_datum", + "schema": { + "$ref": "#/definitions/Data" + } }, "redeemer": { - "title": "Data", - "description": "Any Plutus data.", - "schema": {} + "title": "_redeemer", + "schema": { + "$ref": "#/definitions/Data" + } }, "compiledCode": "59015f010000323232323232323232322225333006323232323233001003232323322323232323330140014a0944004c94ccc05c0045288a5000133223233223253330173370e00290010801099190009bab301e00130110033018375400400297adef6c6033223300800200100200100100237566601260140049001001a441050000000000003001001222533301300213374a900125eb804c8c8c8c94ccc04ccdc7802800899ba548000cc060dd300125eb804ccc01c01c00c014dd7180a0019bab3014002301700330150023001001222533301000214a026464a66601c600600429444ccc01401400400cc05000cc048008dd6198009801198009801001a400090021119199800800a4000006444666601866e1c0100080488ccc010010cdc0001a40046028002002460146ea8004526163001001222533300800214984cc014c004c028008ccc00c00cc02c0080055cd2b9b5573aaae7955cfaba05742ae89", "hash": "3f46b921ead33594e1da4afa1f1ba31807c0d8deca029f96fe9fe394" @@ -23,58 +25,79 @@ { "title": "spend.mint", "redeemer": { - "title": "Unit", - "description": "The nullary constructor.", + "title": "_redeemer", "schema": { - "anyOf": [ - { - "dataType": "constructor", - "index": 0, - "fields": [] - } - ] + "$ref": "#/definitions/Void" } }, "parameters": [ { - "title": "OutputReference", - "description": "An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output", + "title": "output_reference", "schema": { - "anyOf": [ - { - "title": "OutputReference", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "transaction_id", - "description": "A unique transaction identifier, as the hash of a transaction body. Note that the transaction id\n isn't a direct hash of the `Transaction` as visible on-chain. Rather, they correspond to hash\n digests of transaction body as they are serialized on the network.", - "anyOf": [ - { - "title": "TransactionId", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "hash", - "dataType": "bytes" - } - ] - } - ] - }, - { - "title": "output_index", - "dataType": "integer" - } - ] - } - ] + "$ref": "#/definitions/aiken~1transaction~1OutputReference" } } ], "compiledCode": "58e301000032323232323232323232222533300632323232533300a3370e0029000099251300400214a060166ea8004c8c8cc004dd6198019802198019802002a40009000119baf33004300500148000020c0040048894ccc03c0084cdd2a400497ae013232533300d300300213374a90001980900125eb804ccc01401400400cc04c00cc04400888c8ccc0040052000003222333300c3370e008004024466600800866e0000d200230140010012300a37540022930b180080091129998040010a4c26600a600260140046660060066016004002ae695cdaab9d5573caae7d5d02ba157441", "hash": "5a5aef5525783c007ee817dd5869ee67000ae5fd730815af7d87ec97" } - ] + ], + "definitions": { + "ByteArray": { + "dataType": "bytes" + }, + "Data": { + "title": "Data", + "description": "Any Plutus data." + }, + "Int": { + "dataType": "integer" + }, + "Void": { + "title": "Unit", + "description": "The nullary constructor.", + "anyOf": [ + { + "dataType": "constructor", + "index": 0, + "fields": [] + } + ] + }, + "aiken/transaction/OutputReference": { + "title": "OutputReference", + "description": "An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output", + "anyOf": [ + { + "title": "OutputReference", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/aiken~1transaction~1TransactionId" + }, + { + "$ref": "#/definitions/Int" + } + ] + } + ] + }, + "aiken/transaction/TransactionId": { + "title": "TransactionId", + "description": "A unique transaction identifier, as the hash of a transaction body. Note that the transaction id\n isn't a direct hash of the `Transaction` as visible on-chain. Rather, they correspond to hash\n digests of transaction body as they are serialized on the network.", + "anyOf": [ + { + "title": "TransactionId", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/ByteArray" + } + ] + } + ] + } + } } \ No newline at end of file diff --git a/examples/acceptance_tests/047/plutus.json b/examples/acceptance_tests/047/plutus.json index d2bd969f..3cc88a92 100644 --- a/examples/acceptance_tests/047/plutus.json +++ b/examples/acceptance_tests/047/plutus.json @@ -8,33 +8,32 @@ { "title": "foo.spend", "datum": { - "title": "Unit", - "description": "The nullary constructor.", + "title": "_datum", "schema": { - "anyOf": [ - { - "dataType": "constructor", - "index": 0, - "fields": [] - } - ] + "$ref": "#/definitions/Void" } }, "redeemer": { - "title": "Unit", - "description": "The nullary constructor.", + "title": "_redeemer", "schema": { - "anyOf": [ - { - "dataType": "constructor", - "index": 0, - "fields": [] - } - ] + "$ref": "#/definitions/Void" } }, "compiledCode": "583b0100003232323232323222253330064a22930b180080091129998030010a4c26600a6002600e0046660060066010004002ae695cdaab9f5742ae89", "hash": "e37db487fbd58c45d059bcbf5cd6b1604d3bec16cf888f1395a4ebc4" } - ] + ], + "definitions": { + "Void": { + "title": "Unit", + "description": "The nullary constructor.", + "anyOf": [ + { + "dataType": "constructor", + "index": 0, + "fields": [] + } + ] + } + } } \ No newline at end of file diff --git a/examples/acceptance_tests/048/plutus.json b/examples/acceptance_tests/048/plutus.json index 12f2de8d..afd7d127 100644 --- a/examples/acceptance_tests/048/plutus.json +++ b/examples/acceptance_tests/048/plutus.json @@ -8,17 +8,25 @@ { "title": "foo.spend", "datum": { - "title": "Data", - "description": "Any Plutus data.", - "schema": {} + "title": "a", + "schema": { + "$ref": "#/definitions/Data" + } }, "redeemer": { - "title": "Data", - "description": "Any Plutus data.", - "schema": {} + "title": "b", + "schema": { + "$ref": "#/definitions/Data" + } }, "compiledCode": "586001000032323232323232323222253330063370e6464640046eb4c02c008dd69804800a5ef6c6010104000101010048020526163001001222533300800214984cc014c004c024008ccc00c00cc0280080055cd2b9b5573aaae7955cfaba157441", "hash": "7ecbfc3ae91c4d5ba3799b4d283e385d457c860cd22034d825379ae2" } - ] + ], + "definitions": { + "Data": { + "title": "Data", + "description": "Any Plutus data." + } + } } \ No newline at end of file diff --git a/examples/acceptance_tests/071/plutus.json b/examples/acceptance_tests/071/plutus.json index 0cd2e1b3..8021b4b9 100644 --- a/examples/acceptance_tests/071/plutus.json +++ b/examples/acceptance_tests/071/plutus.json @@ -8,164 +8,152 @@ { "title": "spend.pool_contract", "datum": { - "title": "PoolDatum", + "title": "datum", "schema": { - "anyOf": [ - { - "title": "PoolDatum", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "currency_symbol", - "anyOf": [ - { - "title": "CurrencySymbol", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "policy_id", - "dataType": "bytes" - }, - { - "title": "asset_name", - "dataType": "bytes" - } - ] - } - ] - }, - { - "title": "balance", - "dataType": "integer" - }, - { - "title": "lent_out", - "dataType": "integer" - } - ] - } - ] + "$ref": "#/definitions/spend~1PoolDatum" } }, "redeemer": { - "title": "PoolRedeemer", + "title": "redeemer", "schema": { - "anyOf": [ - { - "title": "PoolRedeemer", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "action", - "anyOf": [ - { - "title": "PoolWithdraw", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "dataType": "integer" - } - ] - }, - { - "title": "PoolDeposit", - "dataType": "constructor", - "index": 1, - "fields": [ - { - "title": "PoolDepositRedeemer", - "anyOf": [ - { - "title": "PoolDepositRedeemer", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "input_cs", - "anyOf": [ - { - "title": "CurrencySymbol", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "policy_id", - "dataType": "bytes" - }, - { - "title": "asset_name", - "dataType": "bytes" - } - ] - } - ] - }, - { - "title": "input_amount", - "dataType": "integer" - } - ] - } - ] - } - ] - }, - { - "title": "PoolBorrow", - "dataType": "constructor", - "index": 2, - "fields": [ - { - "title": "PoolBorrowRedeemer", - "anyOf": [ - { - "title": "PoolBorrowRedeemer", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "input_cs", - "anyOf": [ - { - "title": "CurrencySymbol", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "policy_id", - "dataType": "bytes" - }, - { - "title": "asset_name", - "dataType": "bytes" - } - ] - } - ] - }, - { - "title": "input_amount", - "dataType": "integer" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] + "$ref": "#/definitions/spend~1PoolRedeemer" } }, "compiledCode": "59030501000032323232323232323232322225333006323232323232323232533300f3370e002900009925130090021533300f3370e0029001099191919299980999b87001480084c8c8cccc8888c8c8c8c8c9289812000980b19299980e99b8748000c080dd500088008a9980fa492a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e0016330120070033022001301432533301b3370e9000180f1baa0011001153301d49012a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e00163300f005001300d48901ff00010001012005301b001300d00214a0602a6ea8004cc028c02c03120023017001300900213232323253330133370e0029001099191999911119191919192513024001301632533301d3370e900018101baa0011001153301f49012a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e0016330120070033022001301432533301b3370e9000180f1baa0011001153301d49012a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e00163300f005001300d48901ff00010001012005301b001300d00214a0602a6ea8004cc028c02c031200230170013009002301137540026600c600e0129000119ba548000cc04ccdd2a4004660266ea40052f5c06602666e9520024bd7025eb8088cc010dd6198031803998031803801240009002119baf3300730080014800000888cc00cdd6198029803198029803001240009000119baf3300630073300630070014800920000023001001222533301000213374a900125eb804c8c94ccc034c00c0084cdd2a40006602600497ae013330050050010033014003301200222323330010014800000c888cccc030cdc3802001009919980200219b8000348008c0540040048c02cdd50008a4c2c6002002444a666012004293099802980098058011998018019806001000ab9a5736ae7155ceaab9e5573eae815d0aba201", "hash": "b79dffa847f2b9a55cb6cee2bd6057251f45e6a252587c7f6f3545d0" } - ] + ], + "definitions": { + "ByteArray": { + "dataType": "bytes" + }, + "Int": { + "dataType": "integer" + }, + "spend/CurrencySymbol": { + "title": "CurrencySymbol", + "anyOf": [ + { + "title": "CurrencySymbol", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/ByteArray" + }, + { + "$ref": "#/definitions/ByteArray" + } + ] + } + ] + }, + "spend/PoolBorrowRedeemer": { + "title": "PoolBorrowRedeemer", + "anyOf": [ + { + "title": "PoolBorrowRedeemer", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/spend~1CurrencySymbol" + }, + { + "$ref": "#/definitions/Int" + } + ] + } + ] + }, + "spend/PoolDatum": { + "title": "PoolDatum", + "anyOf": [ + { + "title": "PoolDatum", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/spend~1CurrencySymbol" + }, + { + "$ref": "#/definitions/Int" + }, + { + "$ref": "#/definitions/Int" + } + ] + } + ] + }, + "spend/PoolDepositRedeemer": { + "title": "PoolDepositRedeemer", + "anyOf": [ + { + "title": "PoolDepositRedeemer", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/spend~1CurrencySymbol" + }, + { + "$ref": "#/definitions/Int" + } + ] + } + ] + }, + "spend/PoolRedeemer": { + "title": "PoolRedeemer", + "anyOf": [ + { + "title": "PoolRedeemer", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/spend~1PoolRedeemerType" + } + ] + } + ] + }, + "spend/PoolRedeemerType": { + "title": "PoolRedeemerType", + "anyOf": [ + { + "title": "PoolWithdraw", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/Int" + } + ] + }, + { + "title": "PoolDeposit", + "dataType": "constructor", + "index": 1, + "fields": [ + { + "$ref": "#/definitions/spend~1PoolDepositRedeemer" + } + ] + }, + { + "title": "PoolBorrow", + "dataType": "constructor", + "index": 2, + "fields": [ + { + "$ref": "#/definitions/spend~1PoolBorrowRedeemer" + } + ] + } + ] + } + } } \ No newline at end of file diff --git a/examples/hello_world/plutus.json b/examples/hello_world/plutus.json index 93cf9e9c..b56c587f 100644 --- a/examples/hello_world/plutus.json +++ b/examples/hello_world/plutus.json @@ -9,43 +9,54 @@ { "title": "hello_world.spend", "datum": { - "title": "Datum", + "title": "datum", "schema": { - "anyOf": [ - { - "title": "Datum", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "owner", - "dataType": "bytes" - } - ] - } - ] + "$ref": "#/definitions/hello_world~1Datum" } }, "redeemer": { - "title": "Redeemer", + "title": "redeemer", "schema": { - "anyOf": [ - { - "title": "Redeemer", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "msg", - "dataType": "bytes" - } - ] - } - ] + "$ref": "#/definitions/hello_world~1Redeemer" } }, "compiledCode": "58dd0100003232323232323232222533300632323232533300a002100114a06464660026eb0cc010c014cc010c014019200048040dd7198021802804240006002002444a66601e00429404c8c94ccc038cdc78010018a5113330050050010033012003375c602000466e3cdd71980098010022400091010d48656c6c6f2c20576f726c64210022323330010014800000c888cccc030cdc3802001008119980200219b8000348008c0480040048c024dd50008a4c2c6002002444a66600e004293099802980098040011998018019804801000ab9a5736aae7955cfaba15745", "hash": "46872294cadbacb2c3214086c0129ede75cf9f767e95a449f996685f" } - ] + ], + "definitions": { + "ByteArray": { + "dataType": "bytes" + }, + "hello_world/Datum": { + "title": "Datum", + "anyOf": [ + { + "title": "Datum", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/ByteArray" + } + ] + } + ] + }, + "hello_world/Redeemer": { + "title": "Redeemer", + "anyOf": [ + { + "title": "Redeemer", + "dataType": "constructor", + "index": 0, + "fields": [ + { + "$ref": "#/definitions/ByteArray" + } + ] + } + ] + } + } } \ No newline at end of file