diff --git a/aiken.lock b/aiken.lock index 93d069f..cdeb107 100644 --- a/aiken.lock +++ b/aiken.lock @@ -24,4 +24,4 @@ requirements = [] source = "github" [etags] -"aiken-lang/stdlib@v2" = [{ secs_since_epoch = 1725888494, nanos_since_epoch = 181679000 }, "d79382d2b6ecb3aee9b0755c31d8a5bbafe88a7b3706d7fb8a52fd4d05818501"] +"aiken-lang/stdlib@v2" = [{ secs_since_epoch = 1725953256, nanos_since_epoch = 502699000 }, "d79382d2b6ecb3aee9b0755c31d8a5bbafe88a7b3706d7fb8a52fd4d05818501"] diff --git a/plutus.json b/plutus.json index 3706756..98b74d4 100644 --- a/plutus.json +++ b/plutus.json @@ -176,7 +176,7 @@ { "title": "account/user_unlock.account_user_unlock.publish", "redeemer": { - "title": "redeemer", + "title": "_redeemer", "schema": { "$ref": "#/definitions/Data" } diff --git a/validators/account/user_unlock.ak b/validators/account/user_unlock.ak index d7999ce..131247b 100644 --- a/validators/account/user_unlock.ak +++ b/validators/account/user_unlock.ak @@ -1,6 +1,7 @@ use aiken_virtual_dex/types.{AccountOracleDatum} use cardano/address.{Credential} use cardano/assets.{PolicyId} +use cardano/certificate.{Certificate} use cardano/transaction.{Transaction} use vodka_extra_signatories.{all_key_signed} use vodka_inputs.{only_input_datum_with} @@ -13,8 +14,11 @@ validator account_user_unlock(oracle_nft: PolicyId, owner: ByteArray) { all_key_signed(extra_signatories, [owner, operation_key]) } - publish(redeemer: Data, credential: Credential, tx: Transaction) { - account_user_unlock.withdraw(oracle_nft, owner, redeemer, credential, tx) + publish(_redeemer: Data, _certificate: Certificate, tx: Transaction) { + let Transaction { reference_inputs, extra_signatories, .. } = tx + expect AccountOracleDatum { operation_key, .. }: AccountOracleDatum = + only_input_datum_with(reference_inputs, oracle_nft, "") + all_key_signed(extra_signatories, [owner, operation_key]) } else(_) { diff --git a/validators/virtual_dex/take_orders.ak b/validators/virtual_dex/take_orders.ak index b735b54..4f89969 100644 --- a/validators/virtual_dex/take_orders.ak +++ b/validators/virtual_dex/take_orders.ak @@ -53,7 +53,7 @@ validator virtual_dex_take_orders( is_operation_key_signed && is_token_paid_to_makers } - publish(_redeemer: Data, _credential: Certificate, tx: Transaction) { + publish(_redeemer: Data, _certificate: Certificate, tx: Transaction) { let Transaction { reference_inputs, .. } = tx expect DexOracleDatum { operation_key, .. }: DexOracleDatum = only_input_datum_with(reference_inputs, oracle_nft, "")