Withdraw from a Prize Pool
How to Withdraw Funds from a Prize Pool
Withdrawing Your Funds With a Timelock
uint256 unlockTimestamp = PRIZE_POOL.withdrawWithTimelockFrom(
fromAddress,
amount,
controlledToken
);const ethers = require('ethers')
const signer = ethers.Wallet.createRandom()
const daiPrizePool = new ethers.Contract(
DAI_PRIZE_POOL_ADDRESS,
PRIZE_POOL_ABI,
signer
)
const controlledTokens = await daiPrizePool.tokens();
await daiPrizePool.withdrawWithTimelockFrom(
signer._address,
ethers.utils.parseEther('1'),
controlledTokens[0]
)
const unlockTimestamp = await daiPrizePool.balanceAvailableAt(signer._address) Withdrawing Funds Instantly
Getting Approval
Last updated