## Index

### Variables

- ONG_CONTRACT
- ONT_CONTRACT

### Functions

- getTokenContract
- makeQueryAllowanceTx
- makeQueryBalanceTx
- makeTransferTx
- makeWithdrawOngTx
- verifyAmount

## Variables

### Const ONG_CONTRACT

ONG_CONTRACT: "0000000000000000000000000000000000000002" = "0000000000000000000000000000000000000002"

- Defined in smartcontract/nativevm/ontAssetTxBuilder.ts:29

### Const ONT_CONTRACT

ONT_CONTRACT: "0000000000000000000000000000000000000001" = "0000000000000000000000000000000000000001"

- Defined in smartcontract/nativevm/ontAssetTxBuilder.ts:28

## Functions

### getTokenContract

- getTokenContract(tokenType: string): Address

- - Defined in smartcontract/nativevm/ontAssetTxBuilder.ts:35

  Get the address of native asset contract

  #### Parameters

  - ##### tokenType: string

    Token type. Can only be ONT or ONG

  #### Returns Address

### makeQueryAllowanceTx

- makeQueryAllowanceTx(asset: string, from: Address, to: Address): Transaction

- - Defined in smartcontract/nativevm/ontAssetTxBuilder.ts:199

  Creates transaction to query allowance that can be sent from sender to receiver

  #### Parameters

  - ##### asset: string

    Asset type. Only ONT or ONg.

  - ##### from: Address

    Sender's address

  - ##### to: Address

    Receiver's address

  #### Returns Transaction

### makeQueryBalanceTx

- makeQueryBalanceTx(asset: string, address: Address): Transaction

- - Defined in smartcontract/nativevm/ontAssetTxBuilder.ts:225

  Creates transaction to query balance.

  #### Parameters

  - ##### asset: string

    Token type,ont or ong

  - ##### address: Address

    Address to query balance

  #### Returns Transaction

### makeTransferTx

- makeTransferTx(tokenType: string, from: Address, to: Address, amount: number | string, gasPrice: string, gasLimit: string, payer?: Address): Transaction

- - Defined in smartcontract/nativevm/ontAssetTxBuilder.ts:67

  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

- makeWithdrawOngTx(from: Address, to: Address, amount: number | string, payer: Address, gasPrice: string, gasLimit: string): Transaction

- - Defined in smartcontract/nativevm/ontAssetTxBuilder.ts:176

  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

- - Defined in smartcontract/nativevm/ontAssetTxBuilder.ts:49

  Verify amount

  #### Parameters

  - ##### amount: number | string

    Amount

  #### Returns void

Generated using TypeDoc