Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "smartcontract/nativevm/ontAssetTxBuilder"

Index

Variables

Const ONG_CONTRACT

ONG_CONTRACT: "0000000000000000000000000000000000000002" = "0000000000000000000000000000000000000002"

Const ONT_CONTRACT

ONT_CONTRACT: "0000000000000000000000000000000000000001" = "0000000000000000000000000000000000000001"

Functions

deserializeTransferTx

  • deserializeTransferTx(str: string): Transfer

getTokenContract

  • getTokenContract(tokenType: string): Address

makeQueryAllowanceTx

makeQueryBalanceTx

makeTransferStateTx

  • makeTransferStateTx(tokenType: string, states: State[], gasPrice: string, gasLimit: string, payer?: Address): Transaction

makeTransferToMany

  • makeTransferToMany(tokenType: string, from: Address, to: Address[], amounts: string | number[], gasPrice: string, gasLimit: string): Transaction

makeTransferTx

  • makeTransferTx(tokenType: string, from: Address, to: Address, amount: number | string, gasPrice: string, gasLimit: string, payer?: Address): Transfer
  • Creates transaction to transfer native assets.

    Parameters

    • tokenType: string

      ONT or ONG

    • from: Address

      sender's address

    • to: Address

      receiver's address

    • amount: number | string

      Amount of amount to transfer

    • gasPrice: string

      Gas price

    • gasLimit: string

      Gas limit

    • Optional payer: Address

      Address to pay for transaction's gas.

    Returns Transfer

makeWithdrawOngTx

  • Withdraw ong from sender's address and send to receiver's address

    Parameters

    • from: Address

      Sender's address

    • to: Address

      Receiver's address

    • amount: number | string

      Amount of ONG to withdraw.The value needs to multiply 1e9 to keep precision

    • payer: Address

      Address to pay for transaction's gas

    • gasPrice: string

      Gas price

    • gasLimit: string

      Gas limit

    Returns Transfer

verifyAmount

  • verifyAmount(amount: number | string): void

Generated using TypeDoc