Update blueprint outputs to reflect latest specification.

Schemas of datums, redeemers and parameters are now nested under a field 'schema'. This allows to define a field 'purpose' at the same level.
This commit is contained in:
KtorZ
2023-03-02 17:17:27 +01:00
parent 433af4638b
commit 65c336cb82
6 changed files with 456 additions and 378 deletions

View File

@@ -9,11 +9,13 @@
"title": "spend.spend",
"datum": {
"title": "Data",
"description": "Any Plutus data."
"description": "Any Plutus data.",
"schema": {}
},
"redeemer": {
"title": "Data",
"description": "Any Plutus data."
"description": "Any Plutus data.",
"schema": {}
},
"compiledCode": "59015f010000323232323232323232322225333006323232323233001003232323322323232323330140014a0944004c94ccc05c0045288a5000133223233223253330173370e00290010801099190009bab301e00130110033018375400400297adef6c6033223300800200100200100100237566601260140049001001a441050000000000003001001222533301300213374a900125eb804c8c8c8c94ccc04ccdc7802800899ba548000cc060dd300125eb804ccc01c01c00c014dd7180a0019bab3014002301700330150023001001222533301000214a026464a66601c600600429444ccc01401400400cc05000cc048008dd6198009801198009801001a400090021119199800800a4000006444666601866e1c0100080488ccc010010cdc0001a40046028002002460146ea8004526163001001222533300800214984cc014c004c028008ccc00c00cc02c0080055cd2b9b5573aaae7955cfaba05742ae89",
"hash": "3f46b921ead33594e1da4afa1f1ba31807c0d8deca029f96fe9fe394"
@@ -23,48 +25,52 @@
"redeemer": {
"title": "Unit",
"description": "The nullary constructor.",
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
"schema": {
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
}
},
"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",
"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"
}
]
}
]
"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"
}
]
}
]
}
}
],
"compiledCode": "58e301000032323232323232323232222533300632323232533300a3370e0029000099251300400214a060166ea8004c8c8cc004dd6198019802198019802002a40009000119baf33004300500148000020c0040048894ccc03c0084cdd2a400497ae013232533300d300300213374a90001980900125eb804ccc01401400400cc04c00cc04400888c8ccc0040052000003222333300c3370e008004024466600800866e0000d200230140010012300a37540022930b180080091129998040010a4c26600a600260140046660060066016004002ae695cdaab9d5573caae7d5d02ba157441",

View File

@@ -10,24 +10,28 @@
"datum": {
"title": "Unit",
"description": "The nullary constructor.",
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
"schema": {
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
}
},
"redeemer": {
"title": "Unit",
"description": "The nullary constructor.",
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
"schema": {
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
}
},
"compiledCode": "583b0100003232323232323222253330064a22930b180080091129998030010a4c26600a6002600e0046660060066010004002ae695cdaab9f5742ae89",
"hash": "e37db487fbd58c45d059bcbf5cd6b1604d3bec16cf888f1395a4ebc4"

View File

@@ -9,11 +9,13 @@
"title": "foo.spend",
"datum": {
"title": "Data",
"description": "Any Plutus data."
"description": "Any Plutus data.",
"schema": {}
},
"redeemer": {
"title": "Data",
"description": "Any Plutus data."
"description": "Any Plutus data.",
"schema": {}
},
"compiledCode": "586001000032323232323232323222253330063370e6464640046eb4c02c008dd69804800a5ef6c6010104000101010048020526163001001222533300800214984cc014c004c024008ccc00c00cc0280080055cd2b9b5573aaae7955cfaba157441",
"hash": "7ecbfc3ae91c4d5ba3799b4d283e385d457c860cd22034d825379ae2"

View File

@@ -9,156 +9,160 @@
"title": "spend.pool_contract",
"datum": {
"title": "PoolDatum",
"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"
}
]
}
]
"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"
}
]
}
]
}
},
"redeemer": {
"title": "PoolRedeemer",
"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"
}
]
}
]
}
]
}
]
}
]
}
]
"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"
}
]
}
]
}
]
}
]
}
]
}
]
}
},
"compiledCode": "59030501000032323232323232323232322225333006323232323232323232533300f3370e002900009925130090021533300f3370e0029001099191919299980999b87001480084c8c8cccc8888c8c8c8c8c9289812000980b19299980e99b8748000c080dd500088008a9980fa492a4173736572746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e0016330120070033022001301432533301b3370e9000180f1baa0011001153301d49012a4173736572746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e00163300f005001300d48901ff00010001012005301b001300d00214a0602a6ea8004cc028c02c03120023017001300900213232323253330133370e0029001099191999911119191919192513024001301632533301d3370e900018101baa0011001153301f49012a4173736572746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e0016330120070033022001301432533301b3370e9000180f1baa0011001153301d49012a4173736572746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e00163300f005001300d48901ff00010001012005301b001300d00214a0602a6ea8004cc028c02c031200230170013009002301137540026600c600e0129000119ba548000cc04ccdd2a4004660266ea40052f5c06602666e9520024bd7025eb8088cc010dd6198031803998031803801240009002119baf3300730080014800000888cc00cdd6198029803198029803001240009000119baf3300630073300630070014800920000023001001222533301000213374a900125eb804c8c94ccc034c00c0084cdd2a40006602600497ae013330050050010033014003301200222323330010014800000c888cccc030cdc3802001009919980200219b8000348008c0540040048c02cdd50008a4c2c6002002444a666012004293099802980098058011998018019806001000ab9a5736ae7155ceaab9e5573eae815d0aba201",
"hash": "c95b3842362b77afec21773b7c0b1f09e61bf5e4c58b685533e6d342"