21 lines
449 B
Plaintext
21 lines
449 B
Plaintext
use aiken/collection/list
|
|
use cardano/transaction.{Output, Transaction}
|
|
|
|
validator foo {
|
|
spend(
|
|
_datum: Void,
|
|
_redeemer: Void,
|
|
_ref: Data,
|
|
transaction: Transaction,
|
|
) -> Bool {
|
|
expect Some(_) = list.find(transaction.outputs, fn(_) { True })
|
|
let _ = find_stuff(transaction)
|
|
True
|
|
}
|
|
}
|
|
|
|
fn find_stuff(transaction: Transaction) -> Output {
|
|
expect Some(stuff) = list.find(transaction.outputs, fn(_) { True })
|
|
stuff
|
|
}
|