getAllowanceEth()
Gets ERC-20 token spend allowance for contract
Method Parameters
tokenBridgeAddress: string
Ethereum bridge contract address
tokenAddress: string
Ethereum token address
signer: ethers.Signer
ethers js Signer
Returns
Returns allowance as ethers.BigNumber
from ethers js
Usage
import { ethers } from "ethers";
import { getAllowanceEth } from "@algo-foundry/messina-sdk";
const provider = new ethers.providers.WebSocketProvider(<ETH_NODE_URL>) as any;
const signer = new ethers.Wallet(<ETH_PRIVATE_KEY>, provider);
const allowance: ethers.BigNumber = await getAllowanceEth("0xf72a04B891bA46819D83c75687d31f22f6d646c1","0xbF0482884043B7ea1eB55516770C217C77CC7A48", signer);
Last updated