Scheduled Withdrawals
Who does what
Step
Actor
Action
Step 1 — Request shares
const vaultErc20Abi = [{
type: 'function', stateMutability: 'nonpayable', name: 'approve',
inputs: [{type: 'address'}, {type: 'uint256'}],
outputs: [{type: 'bool'}],
}] as const
// Shares are ERC-20 on the vault itself — approve the vault
await walletClient.writeContract({
address: vault, abi: vaultErc20Abi, functionName: 'approve',
args: [vault, shares],
})
const withdrawManagerAbi = [{
type: 'function', stateMutability: 'nonpayable', name: 'requestShares',
inputs: [{name: 'shares', type: 'uint256'}], outputs: [],
}] as const
await walletClient.writeContract({
address: withdrawManager,
abi: withdrawManagerAbi,
functionName: 'requestShares',
args: [shares],
})Step 2 — Wait for release
Step 3 — Redeem from request
If the window expires
Partial claims
Last updated
Was this helpful?
