ONG Contract API

Please install Ontology SDKs before using the APIs introduced below.

Index

Methods

BalanceOf

Fetch the balance of a specific address.

BalanceOfV2

Fetch the balance of a specific address.

ONG has 18 decimals.

Transfer

Initiate a transaction.

Emit a corresponding contract event. For example:

TransferV2

Initiate a transaction.

ONG has 18 decimals.

If the transfer amount is divisible by 10^9, the event emitted will be the same as the one by Transfer.

Otherwise, the amount consists of two integers. The first one represents amount/10^9, and the second one represents amount%10^9. For example, if the transaction amount is 0.050000000123456789 ONG, the event looks like:

MultiTransfer

Initiate a batch transfer from one address to multiple addresses.

MultiTransferV2

Initiate a batch transfer from one address to multiple addresses.

ONG has 18 decimals.

Approve

Approve tokens to be withdrawn as allowance.

ApproveV2

Approve tokens to be withdrawn as allowance.

ONG has 18 decimals.

Allowance

Return the allowance from the from account to the to account.

AllowanceV2

Return the allowance from the from account to the to account.

ONG has 18 decimals.

TransferFrom

Allow tokens to be transferred from allowance.

TransferFromV2

Allow tokens to be transferred from allowance.

ONG has 18 decimals.

WithdrawONG

Withdraw generated ONG.

UnboundONG

Calculate the amount of ONG generated.

Last updated