add another validator

This commit is contained in:
Kasey White 2023-03-12 00:17:00 -05:00 committed by Kasey
parent 4a7bbc23df
commit 31c280552d
2 changed files with 48 additions and 2 deletions

View File

@ -5,6 +5,37 @@
"plutusVersion": "v2"
},
"validators": [
{
"title": "spend2.backtrace",
"datum": {
"title": "Unit",
"description": "The nullary constructor.",
"schema": {
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
}
},
"redeemer": {
"title": "Unit",
"description": "The nullary constructor.",
"schema": {
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
}
},
"compiledCode": "59016e010000323232323232323232323222253330063232323232324a26464640026028002600c64a66601a66e1d20003010375400220022a6601e9212a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e00163300337586600a600c6600a600c0029000240084944018c010c94ccc02ccdc3a4000601c6ea8004400454cc03524012a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e001633001375866006600866006600800a9000240084944c0040048894ccc0400084cdd2a400497ae013232533300d300300213374a90001980980125eb804ccc01401400400cc05000cc04800888c8ccc0040052000003222333300c3370e008004026466600800866e0000d200230150010012300b37540022930b180080091129998048010a4c26600a600260160046660060066018004002ae695cdab9c5573aaae7955cfaba05742ae881",
"hash": "546dac827307d09062352c0f50a35bfd5bcfe64233ea06d791f754ea"
},
{
"title": "spend.staking",
"datum": {
@ -33,8 +64,8 @@
]
}
},
"compiledCode": "5905ab010000323232323232323232323222253330063232323232323232323232323375e6e98004dd319191919191999111919000999991111999805002001801000a5eb7bdb18001000404ccccc8888cccc02c01000c0080052f5bded8c00040020249110048810000148202a35ae41cc004004888894ccc0780104cc07ccdd81ba9003374c00497adef6c60132323232533301d3375e6600a00e00266e9520004bd7009981199bb0375200e6e9801802054ccc074cdc780380089981199bb0375200e6e9801800c4cc08ccdd81ba9001374c0046666601201200600e00c00a6eb8c07c00cdd5980f80118110029810002180080091111299980e00209980e99bb037520066ea00092f5bded8c0264646464a66603666ebccc01401c004cdd2a400097ae0133021337606ea401cdd40030040a99980d99b8f007001133021337606ea401cdd400300189981099bb037520026ea0008ccccc02402400c01c018014dd7180e8019bad301d0023020005301e0043232333001375866018601a66018601a01c90002400044a66602a66ebccc038c03ccc038c03c0092002480000144c8c8c8c8c8c8c8c8cc88c8004cccc8888cccc02c01000c008004008004888c94ccc08cc94ccc0a40045288a5000113374a900125eb804cdd2a4000660526e980052f5c066664444666601400800600400200400244464a66604c66e1c005200013374a900125eb804cdd2a4000660586ea00052f5c066e0000800406805cdd59980b180b9980b180b8052400490010049800800911112999812802080189919191919999804804801999998050038008010030028030029bae3026003375a604c004605200a604e0086002002444444a66604800a26604a66ec0dd48021ba80034bd6f7b630099191919299981199baf330050080013374a900025eb804cc0a4cdd81ba9008375000e0122a66604666e3c0200044c8c94ccc094cdc3800a4000264646605a66ec0dd48061ba8001007375a605a002603e004200a604e6ea8004ccc01802001c0084cc0a4cdd81ba9001375000466666601401400601000e00c00a6eb8c09400cdd69812801181400318130029800800911112999810802080189919191919999804804801999998050038008010030028030029bae302200337566044004604a00a60460086002002444444a66604000a26604266ec0dd48021ba60034bd6f7b630099191919299980f99baf330050080013374a900025eb804cc094cdd81ba9008374c00e0122a66603e66e3c0200044c8c94ccc084cdc3800a4000264646605266ec0dd48061ba6001007375660520026036004200a60466ea8004ccc01802001c0084cc094cdd81ba9001374c00466666601401400601000e00c00a6eb8c08400cdd59810801181200318110028800a5eb7bdb180c00400488894ccc06800c40044c8c8cc010008cccc01801800401000cc078010c07000ccc024c02800520003016001301600130070013013001300532533300c3370e900018079baa0011001153300e4912a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e001632323300137586600c600e6600c600e010900024000466ebccc01cc02000520000043001001222533301300213374a900125eb804c8c94ccc040c00c0084cdd2a40006602c00497ae01333005005001003301700330150023011001300332533300a3370e900118069baa0011001153300c4912a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e001633002300300448008894ccc028cdc8001000899ba5480012f5c02a66601466e3c0080044cdd2a400497ae013374a900225eb8088c8ccc0040052000003222333300c3370e008004026466600800866e0000d200230150010012300b37540022930b180080091129998048010a4c26600a600260160046660060066018004002ae695cdab9c5573aaae7955cfaba05742ae89",
"hash": "260e1cb890a9bc9dac6cb2d843cc8093b4f4ad81c11455ae6411dd8f"
"compiledCode": "5904a1010000323232323232323232323222253330063232323232323232323232323232323232323232323232323375e6e98008dd300099980a1bac33016301733016301701848001200422533301f3375e66030603200490000020998061bab3301830190024800800440052f5bded8c06660266eb0cc054c058cc054c05805d200048000894ccc078cdd79980b980c1980b980c0012400490000018998059bab33017301833017301800248009200200110014bd6f7b6301980a180a800a4000604200260420026024002603c002602064a66602e66e1d2000301a375400220022a660329212a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e00163232330013758660226024660226024026900024000466ebccc048c04c00520000043001001222533301e00213374a900125eb804c8c94ccc06cc00c0084cdd2a40006604200497ae0133300500500100330220033020002301c001300e3253330153370e9001180c1baa001100115330174912a4578706563746564206f6e20696e636f727265637420636f6e7374727563746f722076617269616e742e00163300d300e00f4800888c8004cccc8888cccc03001000c008004008004888c94ccc064c94ccc07c0045288a5000113374a900125eb804cdd2a40006603e6e980052f5c066664444666601600800600400200400244464a66603866e1c005200013374a900125eb804cdd2a4000660446ea00052f5c066e0000800401800c894ccc050cdc8001000899ba5480012f5c02a66602866e3c0080044cdd2a400497ae013374a900225eb80c004004888894ccc068010400c4c8c8c8c8ccccc02402400cccccc02801c004008018014018014dd7180d8019bad301b002301e005301c0043001001222222533301900513301a337606ea4010dd4001a5eb7bdb1804c8c8c8c94ccc060cdd79980280400099ba5480012f5c026603c66ec0dd48041ba8007009153330183371e01000226464a66603466e1c00520001323233022337606ea4030dd40008039bad302200130140021005301c375400266600c01000e00426603c66ec0dd48009ba800233333300a00a003008007006005375c60340066eb4c068008c074018c06c014c004004888894ccc058010400c4c8c8c8c8ccccc02402400cccccc02801c004008018014018014dd7180b8019bab3017002301a005301800430010012222225333015005133016337606ea4010dd3001a5eb7bdb1804c8c8c8c94ccc050cdd79980280400099ba5480012f5c026603466ec0dd48041ba6007009153330143371e01000226464a66602c66e1c0052000132323301e337606ea4030dd30008039bab301e001301000210053018375400266600c01000e00426603466ec0dd48009ba600233333300a00a003008007006005375c602c0066eacc058008c064018c05c014c00400488894ccc04400c40044c8c8cc010008cccc01801800401000cc054010c04c00c88c8ccc0040052000003222333300c3370e008004026466600800866e0000d200230150010012300b37540022930b180080091129998048010a4c26600a600260160046660060066018004002ae695cdab9c5573aaae7955cfaba05742ae881",
"hash": "f6448fb18db20c4da7590f743682d806a7e1ab9cccee75848885b22a"
}
]
}

View File

@ -0,0 +1,15 @@
use aiken/list
use aiken/transaction.{Output, ScriptContext}
validator backtrace {
fn(_datum: Void, _redeemer: Void, context: ScriptContext) -> Bool {
expect Some(_) = list.find(context.transaction.outputs, fn(_) { True })
let _ = find_stuff(context)
True
}
}
fn find_stuff(context) -> Output {
expect Some(stuff) = list.find(context.transaction.outputs, fn(_) { True })
stuff
}