Smart Contracts
Minting Tokens
Mint and burn native tokens with minting policies
Minting Tokens
Minting creates new native tokens on Cardano. Every mint requires a minting policy — either a Plutus script or a native script — that authorizes which tokens can be created and under what conditions.
How It Works
- Define the tokens to mint (policy ID + asset name + quantity)
- Attach the minting policy script
- Provide a redeemer (for Plutus policies)
- Build, sign, submit — the builder handles the rest
Positive quantities mint tokens. Negative quantities burn them.
Mint with a Plutus Policy
import { , , , } from "@evolution-sdk/evolution"
const = .()
.({
: "https://cardano-preprod.blockfrost.io/api/v0",
: ..!
})
.({ : ..!, : 0 })
declare const : any // compiled Plutus minting policy (from Aiken build or Blueprint codegen)
// Mint 1000 tokens
const = "7edb7a2d9fbc4d2a68e4c9e9d3d7a5c8f2d1e9f8a7b6c5d4e3f2a1b0"
const = "4d79546f6b656e" // "MyToken" in hex
let = .(0n)
= .(, , , 1000n)
const = await
.()
.({
,
: .(0n, []), // Minting action
: "mint-my-token"
})
.({ : })
.()
const = await .()
await .()Mint and Send in One Transaction
Mint tokens and immediately send them to a recipient:
import { , , , , } from "@evolution-sdk/evolution"
const = .()
.({
: "https://cardano-preprod.blockfrost.io/api/v0",
: ..!
})
.({ : ..!, : 0 })
declare const : any // compiled Plutus minting policy (from Aiken build or Blueprint codegen)
const = "7edb7a2d9fbc4d2a68e4c9e9d3d7a5c8f2d1e9f8a7b6c5d4e3f2a1b0"
const = "4d79546f6b656e"
let = .(0n)
= .(, , , 1n)
let = .(2_000_000n) // Min ADA for UTxO
= .(, , , 1n)
const = await
.()
.({
: ,
: .(0n, []),
})
.({ : })
.({
: .("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
:
})
.()
const = await .()
await .()Burn Tokens
Use negative quantities to burn tokens you hold:
import { , , , } from "@evolution-sdk/evolution"
const = .()
.({
: "https://cardano-preprod.blockfrost.io/api/v0",
: ..!
})
.({ : ..!, : 0 })
declare const : any // compiled Plutus minting policy (from Aiken build or Blueprint codegen)
const = "7edb7a2d9fbc4d2a68e4c9e9d3d7a5c8f2d1e9f8a7b6c5d4e3f2a1b0"
const = "4d79546f6b656e"
// Negative quantity = burn
let = .(0n)
= .(, , , -500n)
const = await
.()
.({
: ,
: .(1n, []), // Burn action
: "burn-tokens"
})
.({ : })
.()
const = await .()
await .()What the Builder Handles
When minting, Evolution SDK automatically:
- Tracks the minting policy via its policy ID
- Indexes mint redeemers correctly after coin selection
- Includes the minting policy in the script data hash
- Evaluates the minting policy to compute execution units
- Calculates fees including script execution costs
Next Steps
- Locking to Script — Lock minted tokens to a script address
- Asset Units — Understanding policy IDs and asset names
- Asset Metadata — Attach CIP-25 NFT metadata
- Reference Scripts — Store minting policies on-chain