Get Token Balance

Need to check if the user has enough funds to execute a transaction? Have a look here how you can!

This function will return the wallet balance of a certain token.

const balance = await getTokenBalance({
                chainId: '137',
                tokenAddress: '0x0000000000000000000000000000000000000000',
                walletAddress: '0x...',
                tokenDecimals: 18, //optional
                tokenType: 0, //optional, use interfaces.EPeanutLinkType
            })

Last updated