Build
Frontend Tutorials
toolkit
Function.evmdeposit

Function.evmdeposit

@zetachain/toolkit / evmDeposit

evmDeposit(this, args): Promise<ContractTransaction>

this: ZetaChainClient

The instance of the ZetaChain client that contains the signer information.

args

The function arguments.

args.amount: string

The amount of ERC20 tokens or native currency to deposit.

args.erc20?: string

The address of the ERC20 token contract. If depositing native currency (e.g., ETH), this can be left empty or undefined.

args.gatewayEvm?: string

The address of the ZetaChain gateway contract on the EVM-compatible blockchain.

args.receiver: string

The address of the receiver or target contract for the deposit.

args.revertOptions: RevertOptions

Options to handle call reversion, including revert address, message, and gas limit for the revert scenario.

args.txOptions: TxOptions

Transaction options, including gasLimit, gasPrice, etc.

Promise<ContractTransaction>

  • Returns the transaction object.

evmDeposit

Deposits a specified amount of ERC-20 or native gas tokens to a receiver on ZetaChain.

evmDeposit.ts:30 (opens in a new tab)

Continue Learning

Continue with the next part or try a related tutorial

Feedback
How has your developer experience been?
Share your feedback and help improve it for everyone.