Request Parameters:
Parameter | Type | Description | Example |
---|---|---|---|
token | address | token address | |
amount | uint256 | The amount to withdraw, in wei | 100000000000000000 |
call pool contract
Note
// Data structure
function withdrawERC20(ERC20 token, uint256 amount) public
Return Parameters
None
ABI
function withdrawERC20(address,uint256) public
Code example:
import { ethers, utils } from 'ethers';
const abi = ['function withdrawERC20(address,uint256) public'];
const signer = new ethers.providers.Web3Provider(window?.ethereum).getSigner();
const contract = new ethers.Contract(poolAddress, abi, signer);
const txResult = await contract.withdrawERC20(
'0x39Ef50bd29Ae125FE10C6a909E42e1C6a94Dde29',
'10000000000000000'
);