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

@@ -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
}