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

getTokenContract

  • getTokenContract(tokenType: string): Address

makeQueryAllowanceTx

makeQueryBalanceTx

makeTransferTx

  • 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 Transaction

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 Transaction

verifyAmount

  • verifyAmount(amount: number | string): void

Generated using TypeDoc