chore: update gift card example to use new validator syntax
This commit is contained in:
parent
bb820ebdd8
commit
0060d29265
|
@ -8,8 +8,8 @@ type Action {
|
||||||
Burn
|
Burn
|
||||||
}
|
}
|
||||||
|
|
||||||
validator gift_card(token_name: ByteArray, utxo_ref: OutputReference) {
|
validator(token_name: ByteArray, utxo_ref: OutputReference) {
|
||||||
fn(rdmr: Action, ctx: ScriptContext) -> Bool {
|
fn gift_card(rdmr: Action, ctx: ScriptContext) -> Bool {
|
||||||
let ScriptContext { transaction, purpose } = ctx
|
let ScriptContext { transaction, purpose } = ctx
|
||||||
|
|
||||||
expect tx.Mint(policy_id) = purpose
|
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) {
|
validator(token_name: ByteArray, policy_id: ByteArray) {
|
||||||
fn(_d: Data, _r: Data, ctx: ScriptContext) -> Bool {
|
fn redeem(_d: Data, _r: Data, ctx: ScriptContext) -> Bool {
|
||||||
let ScriptContext { transaction, .. } = ctx
|
let ScriptContext { transaction, .. } = ctx
|
||||||
|
|
||||||
let Transaction { mint, .. } = transaction
|
let Transaction { mint, .. } = transaction
|
||||||
|
|
Loading…
Reference in New Issue