ERC20

Functionality available for contracts that implement the IERC20 interface.

Allowance

Get the allowance of another wallet address over the connected wallet's funds.

"Allowance" refers to the number of tokens that another wallet is allowed to spend on behalf of the connected wallet.

var data = await contract.ERC20.Allowance("{{spender_address}}");

AllowanceOf

The same as allowance, but allows you to specify the owner wallet to check, instead of using the connected wallet.

var data = await contract.ERC20.AllowanceOf("{{owner_address}}", "{{spender_address}}");

Balance

View the balance (i.e. number of tokens) the connected wallet has in their wallet from this contract.

var data = await contract.ERC20.Balance();

BalanceOf

The same as balance, but allows you to specify the wallet address to check, instead of using the connected wallet.

var data = await contract.ERC20.BalanceOf("{{wallet_address}}");

Get

Get the metadata of the token smart contract, such as the name, symbol, and decimals.

var data = await contract.ERC20.Get();

SetAllowance

Grant allowance to another wallet address to spend the connected wallet's funds (of this token).

var data = await contract.ERC20.SetAllowance("{{spender_address}}", 1);

TotalSupply

Get the number of tokens in circulation for this contract.

var data = await contract.ERC20.TotalSupply();

Transfer

Transfer tokens from the connected wallet to another wallet.

var data = await contract.ERC20.Transfer("{{wallet_address}}", "{{amount}}");