For the complete documentation index, see llms.txt. This page is also available as Markdown.

ONT 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.

ONT has 9 decimals.

Transfer

Initiate a transaction.

Emit a corresponding contract event. For example:

TransferV2

Initiate a transaction.

ONT has 9 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 123.4567 ONT, 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.

ONT has 9 decimals.

Approve

Approve tokens to be withdrawn as allowance.

ApproveV2

Approve tokens to be withdrawn as allowance.

ONT has 9 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.

ONT has 9 decimals.

TransferFrom

Allow tokens to be transferred from allowance.

TransferFromV2

Allow tokens to be transferred from allowance.

ONT has 9 decimals.

Last updated