fix: fixing tests to account for the new stdlib main. Also added test 75 but commented out for now until a fix is merged
This commit is contained in:
@@ -14,11 +14,11 @@ validator(token_name: ByteArray, utxo_ref: OutputReference) {
|
||||
let ScriptContext { transaction, purpose } = ctx
|
||||
expect tx.Mint(policy_id) = purpose
|
||||
let Transaction { inputs, mint, .. } = transaction
|
||||
expect [(asset_name, amount)] =
|
||||
expect [Pair(asset_name, amount)] =
|
||||
mint
|
||||
|> value.from_minted_value
|
||||
|> value.tokens(policy_id)
|
||||
|> dict.to_list()
|
||||
|> dict.to_alist()
|
||||
when rdmr is {
|
||||
Mint -> {
|
||||
expect
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
// use aiken/list
|
||||
// use aiken/transaction.{Output, ScriptContext}
|
||||
use aiken/list
|
||||
use aiken/transaction.{Output, ScriptContext}
|
||||
|
||||
// validator {
|
||||
// fn backtrace(_datum: Void, _redeemer: Void, context: ScriptContext) -> Bool {
|
||||
// expect Some(_) =
|
||||
// list.find(context.transaction.outputs, fn(_) { True })
|
||||
// let _ =
|
||||
// find_stuff(context)
|
||||
// True
|
||||
// }
|
||||
// }
|
||||
validator {
|
||||
fn backtrace(_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
|
||||
// }
|
||||
fn find_stuff(context) -> Output {
|
||||
expect Some(stuff) = list.find(context.transaction.outputs, fn(_) { True })
|
||||
stuff
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user