evmGetBalance

Function using for get balance token at address

This function using web3.js Library only

Input parameters

// JavaScript

const tx = {
     from: '0x8c32D410c843A41db54408099ab3fd92C8434aa8', // required
     to: '0x8c32D410c843A41db54408099ab3fd92C8434aa8', // option
     rpc: '', // required
     decimals: 18, // option
}

To get the balance of a native network token, simply don't specify the field "to".

Using

// JavaScript

const balance = await evmGetBalance(tx)

Return

Return balance in Wei.

Last updated