EstimateCost - read

Estimate current inscribing cost

Script parameters

KeyRequiredFTypeDescription

mimeType

t.String

for 𝔉rc20 use "text/plain"

data

t.String

the data string of each inscription

protocol

t.String

for 𝔉rc20 use "frc20"

Code example

import scEstimateCost from "@fixes/contracts/scripts/estimate-cost.cdc?raw";

async function estimateInscriptionCost(data: string) {
  return await flowSrv.executeScript(
      scEstimateCost,
      (arg, t) => [
        arg("text/plain", t.String),
        arg(data, t.String),
        arg("frc20", t.String),
      ],
      "0.001"
    );
}

Script source code

Last updated