chore: update gift card example to use new validator syntax

This commit is contained in:
rvcas 2023-03-27 13:39:34 -04:00
parent bb820ebdd8
commit 0060d29265
No known key found for this signature in database
GPG Key ID: C09B64E263F7D68C
1 changed files with 4 additions and 4 deletions

View File

@ -8,8 +8,8 @@ type Action {
Burn
}
validator gift_card(token_name: ByteArray, utxo_ref: OutputReference) {
fn(rdmr: Action, ctx: ScriptContext) -> Bool {
validator(token_name: ByteArray, utxo_ref: OutputReference) {
fn gift_card(rdmr: Action, ctx: ScriptContext) -> Bool {
let ScriptContext { transaction, purpose } = ctx
expect tx.Mint(policy_id) = purpose
@ -32,8 +32,8 @@ validator gift_card(token_name: ByteArray, utxo_ref: OutputReference) {
}
}
validator redeem(token_name: ByteArray, policy_id: ByteArray) {
fn(_d: Data, _r: Data, ctx: ScriptContext) -> Bool {
validator(token_name: ByteArray, policy_id: ByteArray) {
fn redeem(_d: Data, _r: Data, ctx: ScriptContext) -> Bool {
let ScriptContext { transaction, .. } = ctx
let Transaction { mint, .. } = transaction