getAllowance
Returns allowance of a spender that can spend the token on behalf of the owner.
Usage
example.ts
import { mintclub } from 'mint.club-v2-sdk'
const allowance = await mintclub.network('ethereum').token('SYMBOL').getAllowance({
owner: '0x...',
spender: '0x...'
})
Return Value
Promise<bigint>
Returns a promise that resolves to the allowance of the spender on the token for the owner.
Parameters
owner
- Type:
'0x...${string}'
The address of the owner of the tokens. Usually the user's address.
import { mintclub } from 'mint.club-v2-sdk'
const allowance = await mintclub.network('ethereum').token('SYMBOL').getAllowance({
owner: '0x...',
spender: '0x...'
})
spender
- Type:
'0x...${string}'
The address of the spender of the tokens. Usually the contract that is allowed to spend the tokens on behalf of the owner.
import { mintclub } from 'mint.club-v2-sdk'
const allowance = await mintclub.network('ethereum').token('SYMBOL').getAllowance({
owner: '0x...',
spender: '0x...'
})