add another validator
This commit is contained in:
15
examples/acceptance_tests/077/validators/spend2.ak
Normal file
15
examples/acceptance_tests/077/validators/spend2.ak
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user