Erc20.allowance() method
Get Token Allowance
Example
// Address of the wallet to check token allowance
const spenderAddress = "0x...";
const allowance = await contract.erc20.allowance(spenderAddress);
Signature:
allowance(spender: string): Promise<CurrencyValue>;
Parameters
Parameter | Type | Description |
---|---|---|
spender | string |
Returns:
Promise<CurrencyValue>
The allowance of one wallet over anothers funds.
Remarks
Get the allowance of a 'spender' wallet over the connected wallet's funds - the allowance of a different address for a token is the amount of tokens that the spender
wallet is allowed to spend on behalf of the connected wallet.