Mint(batch) - tx

Mint 𝔉rc20 token

Example of Fixes Inscription data string:

op=mint,tick=fixes,amt=1000.0

Transaction parameters:

KeyRequiredFTypeDescription

tick

t.String

Ticker: identity of the 𝔉rc20 token

amt

t.UFix64

Amount to mint: States the amount of the 𝔉rc20 token to mint. Has to be less or equal to "limit"

repeats

t.UInt64

How many times to repeat the mint action. Better less than or equal to 100 times.

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

Or mint simple inscription

https://github.com/fixes-world/fixes/blob/main/cadence/transactions/mint-frc20.cdc

Last updated