checkDelegateForERC20
Returns the amount of ERC20 tokens the delegate is granted rights to act on the behalf of
checkDelegateForERC20( to
: string, from
: string, contract
: string, rights?
: string ) ⇒ Promise< boolean >
Returns the delegated balance, which will be 0 if the delegation does not exist
to
The delegated address to check
from
The potential address who delegated rights
contract
The address for the contract you're delegating
rights (optional)
Specific rights to check for, pass nothing to ignore subdelegations and check full delegations only
Usage Example
const to = "0x0000000000000000000000000000000000000003";
const from = "0x0000000000000000000000000000000000000001";
const contract = "0x0000000000000000000000000000000000000002";
const isDelegateForToken = await v2.checkDelegateForERC20(to, from, contract);
/* returns example
0
*/
Last updated