Skip to content

Commit

Permalink
Add Trivial Example for Tx Level Minting Policy
Browse files Browse the repository at this point in the history
  • Loading branch information
keyan-m committed Feb 20, 2024
1 parent ee9ee37 commit 6bfeef1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions validators/tx-level-minter-example.ak
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use aiken/transaction.{ScriptContext}
use aiken_design_patterns/tx_level_minter as tx_level_minter

validator {
fn spend(_datum, _redeemer, ctx: ScriptContext) {
tx_level_minter.spend("BEACON", ctx)
}

fn mint(redeemer: Data, ctx: ScriptContext) {
tx_level_minter.mint(
fn(_r, _own_policy, _tx) { True },
redeemer,
ctx,
)
}
}

0 comments on commit 6bfeef1

Please sign in to comment.