description |
---|
Mint 𝔉rc20 token |
op=mint,tick=fixes,amt=1000.0
Key | Required | FType | Description |
---|---|---|---|
tick | true | t.String | Ticker: identity of the 𝔉rc20 token |
amt | true | t.UFix64 | Amount to mint: States the amount of the 𝔉rc20 token to mint. Has to be less or equal to "limit" |
repeats | true | t.UInt64 | How many times to repeat the mint action. Better less than or equal to 100 times. |
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;
}
{% @github-files/github-code-block url="https://github.com/fixes-world/fixes/blob/main/cadence/transactions/batch-mint-frc20.cdc" %}
Or mint simple inscription
https://github.com/fixes-world/fixes/blob/main/cadence/transactions/mint-frc20.cdc