Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 2 KB

deploy-tx.md

File metadata and controls

47 lines (34 loc) · 2 KB
description
Deploy a new 𝔉rc20 token

Deploy - tx

Example of Fixes Inscription data string:

op=deploy,tick=fixes,max=1000000000.0,limit=1000.0,burnable=1

Transaction parameters:

KeyRequiredFTypeDescription
ticktruet.StringTicker: identity of the 𝔉rc20 token
maxtruet.UFix64Max supply: Set max supply of the 𝔉rc20 token
limittruet.UFix64Mint limit: limit per inscription
burnabletruet.Bool

Is this 𝔉rc20 a burnable inscription.

Recommended to set it as true.

Transaction code example:

import txDeployFRC20 from "@fixes/contracts/transactions/deploy-frc20.cdc?raw";

interface TokenMetaDto {
  tick: string;
  max: number;
  limit: number;
  burnable: boolean;
}

async function deploy(token: TokenMetaDto) {
  return await flow.sendTransaction(txDeployFRC20, (arg, t) => [
      arg(token.tick, t.String),
      arg(token.max.toFixed(8), t.UFix64),
      arg(token.limit.toFixed(8), t.UFix64),
      arg(token.burnable, t.Bool),
  ]);
}

Transaction source code

{% @github-files/github-code-block url="https://github.com/fixes-world/fixes/blob/main/cadence/transactions/deploy-frc20.cdc" %}

Related docs