Mint(batch) - tx
Mint πrc20 token
Example of Fixes Inscription data string:
op=mint,tick=fixes,amt=1000.0Transaction parameters:
Key
Required
FType
Description
Transaction code example:
import txBatchMintFRC20 from "@fixes/contracts/transactions/batch-mint-frc20.cdc?raw";
import txMintFRC20 from "@fixes/contracts/transactions/mint-frc20.cdc?raw";
async function mint(
tick: string,
amt: number,
repeats: number = 1
) {
let txid: string;
if (repeats > 1) {
txid = await flow.sendTransaction(txBatchMintFRC20, (arg, t) => [
arg(tick, t.String),
arg(amt.toFixed(8), t.UFix64),
arg(repeats, t.UInt64),
]);
} else {
txid = await flow.sendTransaction(txMintFRC20, (arg, t) => [
arg(tick, t.String),
arg(amt.toFixed(8), t.UFix64),
]);
}
return txid;
}Transaction source code
https://github.com/fixes-world/fixes/blob/main/cadence/transactions/batch-mint-frc20.cdc
Related docs
Last updated