Start adjusting acceptance tests to the new Plutus V3 syntax.
This commit is contained in:
parent
af9a785d65
commit
3521a8c921
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158433, nanos_since_epoch = 380614000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596650, nanos_since_epoch = 294733000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158435, nanos_since_epoch = 363713000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596651, nanos_since_epoch = 984539000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158434, nanos_since_epoch = 837171000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596658, nanos_since_epoch = 893017000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158435, nanos_since_epoch = 367316000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596651, nanos_since_epoch = 968695000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158436, nanos_since_epoch = 571367000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596660, nanos_since_epoch = 748574000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158436, nanos_since_epoch = 551807000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596659, nanos_since_epoch = 760789000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158435, nanos_since_epoch = 941669000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596660, nanos_since_epoch = 681097000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158437, nanos_since_epoch = 43333000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596647, nanos_since_epoch = 155791000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
name = "aiken-lang/acceptance_test_071"
|
name = "aiken-lang/acceptance_test_071"
|
||||||
|
plutusVersion = "v3"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
|
||||||
[[dependencies]]
|
[[dependencies]]
|
||||||
name = 'aiken-lang/stdlib'
|
name = 'aiken-lang/stdlib'
|
||||||
version = 'main'
|
version = 'v2'
|
||||||
source = 'github'
|
source = 'github'
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
use aiken/hash.{Blake2b_224, Hash}
|
|
||||||
use aiken/interval.{Finite}
|
use aiken/interval.{Finite}
|
||||||
use aiken/list
|
use aiken/list
|
||||||
use aiken/option
|
use aiken/option
|
||||||
use aiken/transaction.{
|
use cardano/assets.{
|
||||||
Datum, InlineDatum, Input, Mint, Output, OutputReference, ScriptContext, Spend,
|
AssetName, PolicyId, Value, add, flatten, from_asset, negate, quantity_of,
|
||||||
Transaction, TransactionId, ValidityRange,
|
|
||||||
}
|
}
|
||||||
use aiken/transaction/credential.{
|
use cardano/credential.{
|
||||||
Address, Script, ScriptCredential, VerificationKey, VerificationKeyCredential,
|
Address, Script, ScriptCredential, VerificationKey, VerificationKeyCredential,
|
||||||
}
|
}
|
||||||
use aiken/transaction/value.{
|
use cardano/hash.{Blake2b_224, Hash}
|
||||||
AssetName, PolicyId, Value, add, flatten, from_asset, negate, quantity_of,
|
use cardano/transaction.{
|
||||||
|
Datum, InlineDatum, Input, Output, OutputReference, Transaction,
|
||||||
|
TransactionId, ValidityRange,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Datum/Redeemer pool
|
// Datum/Redeemer pool
|
||||||
|
@ -45,13 +45,13 @@ pub type CurrencySymbol {
|
||||||
asset_name: AssetName,
|
asset_name: AssetName,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_output(ctx: ScriptContext, address: Address) -> Option<Output> {
|
pub fn get_output(transaction: Transaction, address: Address) -> Option<Output> {
|
||||||
list.find(ctx.transaction.outputs, fn(output) { output.address == address })
|
list.find(transaction.outputs, fn(output) { output.address == address })
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_input(ctx: ScriptContext, address: Address) -> Option<Input> {
|
pub fn get_input(transaction: Transaction, address: Address) -> Option<Input> {
|
||||||
list.find(
|
list.find(
|
||||||
ctx.transaction.inputs,
|
transaction.inputs,
|
||||||
fn(input) { input.output.address == address },
|
fn(input) { input.output.address == address },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -64,48 +64,40 @@ pub fn scripthash_address(scripthash: ByteArray) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn validate_pool_deposit(
|
pub fn validate_pool_deposit(
|
||||||
ctx: ScriptContext,
|
transaction: Transaction,
|
||||||
output_reference: OutputReference,
|
output_reference: OutputReference,
|
||||||
datum: PoolDatum,
|
datum: PoolDatum,
|
||||||
redeemer: PoolDepositRedeemer,
|
redeemer: PoolDepositRedeemer,
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
let validator_address = scripthash_address(#"ff")
|
let validator_address = scripthash_address(#"ff")
|
||||||
|
|
||||||
expect Some(pool_output) = get_output(ctx, validator_address)
|
expect Some(pool_output) = get_output(transaction, validator_address)
|
||||||
expect Some(pool_input) = get_input(ctx, validator_address)
|
expect Some(pool_input) = get_input(transaction, validator_address)
|
||||||
|
|
||||||
True
|
True
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn validate_pool_borrow(
|
pub fn validate_pool_borrow(
|
||||||
ctx: ScriptContext,
|
transaction: Transaction,
|
||||||
output_reference: OutputReference,
|
output_reference: OutputReference,
|
||||||
datum: PoolDatum,
|
datum: PoolDatum,
|
||||||
redeemer: PoolBorrowRedeemer,
|
redeemer: PoolBorrowRedeemer,
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
let validator_address = scripthash_address(#"ff")
|
let validator_address = scripthash_address(#"ff")
|
||||||
|
|
||||||
expect Some(pool_output) = get_output(ctx, validator_address)
|
expect Some(pool_output) = get_output(transaction, validator_address)
|
||||||
expect Some(pool_input) = get_input(ctx, validator_address)
|
expect Some(pool_input) = get_input(transaction, validator_address)
|
||||||
True
|
True
|
||||||
}
|
}
|
||||||
|
|
||||||
validator {
|
validator {
|
||||||
fn pool_contract(datum: PoolDatum, redeemer: PoolRedeemer, ctx: ScriptContext) {
|
spend(datum: PoolDatum, redeemer: PoolRedeemer, output_ref: OutputReference, transaction: Transaction) {
|
||||||
when redeemer.action is {
|
when redeemer.action is {
|
||||||
PoolWithdraw(_) -> True
|
PoolWithdraw(_) -> True
|
||||||
PoolDeposit(pool_deposit_redeemer) ->
|
PoolDeposit(pool_deposit_redeemer) ->
|
||||||
when ctx.purpose is {
|
validate_pool_deposit(transaction, output_ref, datum, pool_deposit_redeemer)
|
||||||
Spend(output_ref) ->
|
|
||||||
validate_pool_deposit(ctx, output_ref, datum, pool_deposit_redeemer)
|
|
||||||
_ -> False
|
|
||||||
}
|
|
||||||
PoolBorrow(pool_borrow_redeemer) ->
|
PoolBorrow(pool_borrow_redeemer) ->
|
||||||
when ctx.purpose is {
|
validate_pool_borrow(transaction, output_ref, datum, pool_borrow_redeemer)
|
||||||
Spend(output_ref) ->
|
|
||||||
validate_pool_borrow(ctx, output_ref, datum, pool_borrow_redeemer)
|
|
||||||
_ -> False
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158434, nanos_since_epoch = 466737000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596656, nanos_since_epoch = 683898000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158432, nanos_since_epoch = 54533000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596654, nanos_since_epoch = 513356000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158437, nanos_since_epoch = 127361000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596654, nanos_since_epoch = 519690000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
name = "aiken-lang/acceptance_test_077"
|
name = "aiken-lang/acceptance_test_077"
|
||||||
|
plutusVersion = "v3"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
|
||||||
[[dependencies]]
|
[[dependencies]]
|
||||||
name = 'aiken-lang/stdlib'
|
name = 'aiken-lang/stdlib'
|
||||||
version = 'main'
|
version = 'v2'
|
||||||
source = 'github'
|
source = 'github'
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
use aiken/dict
|
use aiken/collection/dict
|
||||||
use aiken/list.{find, foldr}
|
use aiken/collection/list.{find, foldr}
|
||||||
use aiken/transaction.{Input,
|
use cardano/transaction.{Input, OutputReference, Transaction} as tx
|
||||||
OutputReference, ScriptContext, Spend, Transaction} as tx
|
use cardano/transaction/assets.{add, zero}
|
||||||
use aiken/transaction/value.{add, zero}
|
|
||||||
|
|
||||||
type Action {
|
type Action {
|
||||||
Mint
|
Mint
|
||||||
|
@ -10,14 +9,11 @@ type Action {
|
||||||
}
|
}
|
||||||
|
|
||||||
validator(token_name: ByteArray, utxo_ref: OutputReference) {
|
validator(token_name: ByteArray, utxo_ref: OutputReference) {
|
||||||
fn gift_card(rdmr: Action, ctx: ScriptContext) -> Bool {
|
mint(rdmr: Action, policy_id: PolicyId, transaction: Transaction) -> Bool {
|
||||||
let ScriptContext { transaction, purpose } = ctx
|
|
||||||
expect tx.Mint(policy_id) = purpose
|
|
||||||
let Transaction { inputs, mint, .. } = transaction
|
let Transaction { inputs, mint, .. } = transaction
|
||||||
expect [Pair(asset_name, amount)] =
|
expect [Pair(asset_name, amount)] =
|
||||||
mint
|
mint
|
||||||
|> value.from_minted_value
|
|> assets.tokens(policy_id)
|
||||||
|> value.tokens(policy_id)
|
|
||||||
|> dict.to_pairs()
|
|> dict.to_pairs()
|
||||||
when rdmr is {
|
when rdmr is {
|
||||||
Mint -> {
|
Mint -> {
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
use aiken/list
|
use aiken/collection/list
|
||||||
use aiken/transaction.{Output, ScriptContext}
|
use cardano/transaction.{Output, Transaction}
|
||||||
|
|
||||||
validator {
|
validator {
|
||||||
fn backtrace(_datum: Void, _redeemer: Void, context: ScriptContext) -> Bool {
|
spend(
|
||||||
expect Some(_) = list.find(context.transaction.outputs, fn(_) { True })
|
_datum: Void,
|
||||||
let _ = find_stuff(context)
|
_redeemer: Void,
|
||||||
|
_ref: Data,
|
||||||
|
transaction: Transaction,
|
||||||
|
) -> Bool {
|
||||||
|
expect Some(_) = list.find(transaction.outputs, fn(_) { True })
|
||||||
|
let _ = find_stuff(transaction)
|
||||||
True
|
True
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn find_stuff(context: ScriptContext) -> Output {
|
fn find_stuff(transaction: Transaction) -> Output {
|
||||||
expect Some(stuff) = list.find(context.transaction.outputs, fn(_) { True })
|
expect Some(stuff) = list.find(transaction.outputs, fn(_) { True })
|
||||||
stuff
|
stuff
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
validator {
|
validator {
|
||||||
fn spend(datum: Int, redeemer: Int, _context: Data) {
|
fn spend(datum: Int, redeemer: Int, _ref: Data, _transaction: Data) {
|
||||||
datum + redeemer == 42
|
datum + redeemer == 42
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mint(redeemer: Int, _context: Data) {
|
fn mint(redeemer: Int, _policy: ByteArray, _transaction: Data) {
|
||||||
redeemer == 42
|
redeemer == 42
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158431, nanos_since_epoch = 785683000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596649, nanos_since_epoch = 139799000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158433, nanos_since_epoch = 377116000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596646, nanos_since_epoch = 924702000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158433, nanos_since_epoch = 339674000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596647, nanos_since_epoch = 226716000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158435, nanos_since_epoch = 341686000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596654, nanos_since_epoch = 519706000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158431, nanos_since_epoch = 948979000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596656, nanos_since_epoch = 683917000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158436, nanos_since_epoch = 95704000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596652, nanos_since_epoch = 132897000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -24,5 +24,5 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/fuzz@main" = [{ secs_since_epoch = 1723158434, nanos_since_epoch = 581622000 }, "24d601fa19a2002318495bbb8562b9677563ca1b5c03126d6b093a65df076bef"]
|
"aiken-lang/fuzz@main" = [{ secs_since_epoch = 1724596654, nanos_since_epoch = 381692000 }, "24d601fa19a2002318495bbb8562b9677563ca1b5c03126d6b093a65df076bef"]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158434, nanos_since_epoch = 474753000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596653, nanos_since_epoch = 898649000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -13,4 +13,4 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158431, nanos_since_epoch = 792706000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596646, nanos_since_epoch = 86095000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -24,5 +24,5 @@ requirements = []
|
||||||
source = "github"
|
source = "github"
|
||||||
|
|
||||||
[etags]
|
[etags]
|
||||||
"aiken-lang/fuzz@main" = [{ secs_since_epoch = 1723158432, nanos_since_epoch = 675720000 }, "24d601fa19a2002318495bbb8562b9677563ca1b5c03126d6b093a65df076bef"]
|
"aiken-lang/fuzz@main" = [{ secs_since_epoch = 1724597285, nanos_since_epoch = 266243000 }, "24d601fa19a2002318495bbb8562b9677563ca1b5c03126d6b093a65df076bef"]
|
||||||
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158432, nanos_since_epoch = 474723000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724597284, nanos_since_epoch = 808906000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
|
||||||
|
|
|
@ -6,15 +6,15 @@
|
||||||
"plutusVersion": "v2",
|
"plutusVersion": "v2",
|
||||||
"compiler": {
|
"compiler": {
|
||||||
"name": "Aiken",
|
"name": "Aiken",
|
||||||
"version": "v1.0.31-alpha+6e4a16d"
|
"version": "v1.0.31-alpha+0c9ea19"
|
||||||
},
|
},
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0"
|
||||||
},
|
},
|
||||||
"validators": [
|
"validators": [
|
||||||
{
|
{
|
||||||
"title": "tests.foo_3",
|
"title": "tests.foo_3.mint",
|
||||||
"redeemer": {
|
"redeemer": {
|
||||||
"title": "_data",
|
"title": "_redeemer",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/Data"
|
"$ref": "#/definitions/Data"
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"compiledCode": "582401000032323222253330043370e6eb4c018c014dd5001a400429309b2b2b9a5573cae841",
|
"compiledCode": "58670100003232323232225333003323232323253330083370e900018049baa0011323370e6eb4c030c02cdd5004240046eb8c02cc028dd500089931bad300b300a375400e6014601600460120026012004600e002600a6ea8004526136565734aae7555cf2ba15745",
|
||||||
"hash": "047dafbc61fb4a550a28398bde3680c48ff2000cf1022efc883124cd"
|
"hash": "8d14659c82f8f0a1281c561b563283c30c43546d4215c9acafa78edf"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "tests.foo_3.else",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"title": "th_arg",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/tests~1Foo"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"compiledCode": "58670100003232323232225333003323232323253330083370e900018049baa0011323370e6eb4c030c02cdd5004240046eb8c02cc028dd500089931bad300b300a375400e6014601600460120026012004600e002600a6ea8004526136565734aae7555cf2ba15745",
|
||||||
|
"hash": "8d14659c82f8f0a1281c561b563283c30c43546d4215c9acafa78edf"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use aiken/fuzz
|
use aiken/fuzz
|
||||||
|
|
||||||
type Foo {
|
pub type Foo {
|
||||||
a0: Int,
|
a0: Int,
|
||||||
a1: Bool,
|
a1: Bool,
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ fn foo_2(Foo { a0, a1 } as foo) -> Int {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
validator(Foo { a0, .. }: Foo) {
|
validator foo_3(Foo { a0, .. }: Foo) {
|
||||||
fn foo_3(_data, _redeemer) {
|
mint(_redeemer, _policy_, _tx) {
|
||||||
a0 == 1
|
a0 == 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ test example_2() {
|
||||||
}
|
}
|
||||||
|
|
||||||
test example_3() {
|
test example_3() {
|
||||||
foo_3(Foo { a0: 1, a1: False }, "", "")
|
foo_3_mint(Foo { a0: 1, a1: False }, "", "", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
test example_4() {
|
test example_4() {
|
||||||
|
|
Loading…
Reference in New Issue