contracts/handlers/puffer-withdrawal-manager-handler
Classes
PufferWithdrawalManagerHandler
Handler for the PufferWithdrawalsManager
contract exposing methods to
interact with the contract.
Constructors
new PufferWithdrawalManagerHandler()
new PufferWithdrawalManagerHandler(
chain
,walletClient
,publicClient
):PufferWithdrawalManagerHandler
Create the handler for the PufferWithdrawalsManager
contract exposing
methods to interact with the contract.
Parameters
Parameter | Type | Description |
---|---|---|
chain | Chain | Chain to use for the client. |
walletClient | object | The wallet client to use for wallet interactions. |
publicClient | object | The public client to use for public interactions. |
Returns
PufferWithdrawalManagerHandler
Source
lib/contracts/handlers/puffer-withdrawal-manager-handler.ts:32
Properties
Property | Modifier | Type | Description |
---|---|---|---|
chain | private | Chain | Chain to use for the client. |
erc20PermitHandler | private | ERC20PermitHandler | - |
publicClient | private | object | The public client to use for public interactions. |
viemChain | private | Chain | - |
walletClient | private | object | The wallet client to use for wallet interactions. |
Methods
completeQueuedWithdrawal()
completeQueuedWithdrawal(
walletAddress
,withdrawalIdx
):Promise
<object
>
Complete a withdrawal from the queue.
Parameters
Parameter | Type | Description |
---|---|---|
walletAddress | `0x${string}` | - |
withdrawalIdx | bigint | The index of the withdrawal to complete. |
Returns
Promise
<object
>
The transaction hash of the withdrawal.
estimate()
estimate: () =>
Promise
<bigint
>
Returns
Promise
<bigint
>
transact()
transact: () =>
Promise
<`0x${string}`>
Returns
Promise
<`0x${string}`>
Source
lib/contracts/handlers/puffer-withdrawal-manager-handler.ts:142
getContract()
getContract():
object
Get the contract.
Returns
object
The viem contract.
Source
lib/contracts/handlers/puffer-withdrawal-manager-handler.ts:50
getWithdrawal()
getWithdrawal(
withdrawalIdx
):Promise
<object
>
Get the withdrawal at the given index.
Parameters
Parameter | Type | Description |
---|---|---|
withdrawalIdx | bigint | The index of the withdrawal to get. |
Returns
Promise
<object
>
The withdrawal at the given index.
pufETHAmount
pufETHAmount:
bigint
pufETHToETHExchangeRate
pufETHToETHExchangeRate:
bigint
recipient
recipient: `0x${string}`
Source
lib/contracts/handlers/puffer-withdrawal-manager-handler.ts:167
requestWithdrawal()
requestWithdrawal(
walletAddress
,amount
):Promise
<object
>
Request a withdrawal of the given amount to the given address, with a permit.
Parameters
Parameter | Type | Description |
---|---|---|
walletAddress | `0x${string}` | The account address to request the withdrawal for. |
amount | bigint | The pufETH amount to request the withdrawal for. |
Returns
Promise
<object
>
The transaction hash of the withdrawal.
estimate()
estimate: () =>
Promise
<bigint
>
Returns
Promise
<bigint
>
transact()
transact: () =>
Promise
<`0x${string}`>
Returns
Promise
<`0x${string}`>
Source
lib/contracts/handlers/puffer-withdrawal-manager-handler.ts:71
requestWithdrawalWithPermit()
requestWithdrawalWithPermit(
walletAddress
,amount
):Promise
<object
>
Request a withdrawal of the given amount to the given address.
Parameters
Parameter | Type | Description |
---|---|---|
walletAddress | `0x${string}` | The account address to request the withdrawal for. |
amount | bigint | The pufETHamount to request the withdrawal for. |
Returns
Promise
<object
>
The transaction hash of the withdrawal.
estimate()
estimate: () =>
Promise
<bigint
>
Returns
Promise
<bigint
>
transact()
transact: () =>
Promise
<`0x${string}`>
Returns
Promise
<`0x${string}`>
Source
lib/contracts/handlers/puffer-withdrawal-manager-handler.ts:97