updateCurrency(currency, data)

Feature

Return raw operation for creating a new currency policy. Signature of nodes is required, not a general account signature.

Parameters

string currency ID, object currencyPolicyData

Return Value

object operation to update currency policy

// [ parameter for currencyPolicyData structure ]

type currencyPolicyData = {
        initialSupply: string | number | Big
        minBalance: string | number | Big
        feeType: "nil" | "fixed" | "ratio"
        feeReceiver: string | Address         // receiver address
        fee?: string | number | Big           // need to assign when feeType is "fixed" or “ratio”
        ratio?: number
        minFee?: string | number | Big
        maxFee?: string | number | Big
}
  • feeType is optional and can be one of "none", "fixed", or "ratio".

    • "none" means no transaction fee is collected.

    • "fixed" collects a fixed fee, so you must enter a fee receiver address "feeReceiver" and a fixed fee "fee".

    • "ratio" collects a percentage of the transaction volume, so you must provide the address "feeReceiver", the fee ratio "fee", the minimum fee "minFee", and the maximum fee "maxFee".

example

Last updated