Skip to main content

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
ParameterTypeDescription
chainChainChain to use for the client.
walletClientobjectThe wallet client to use for wallet interactions.
publicClientobjectThe public client to use for public interactions.
Returns

PufferWithdrawalManagerHandler

Source

lib/contracts/handlers/puffer-withdrawal-manager-handler.ts:32

Properties

PropertyModifierTypeDescription
chainprivateChainChain to use for the client.
erc20PermitHandlerprivateERC20PermitHandler-
publicClientprivateobjectThe public client to use for public interactions.
viemChainprivateChain-
walletClientprivateobjectThe wallet client to use for wallet interactions.

Methods

completeQueuedWithdrawal()

completeQueuedWithdrawal(walletAddress, withdrawalIdx): Promise<object>

Complete a withdrawal from the queue.

Parameters
ParameterTypeDescription
walletAddress`0x${string}`-
withdrawalIdxbigintThe 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
ParameterTypeDescription
withdrawalIdxbigintThe 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
ParameterTypeDescription
walletAddress`0x${string}`The account address to request the withdrawal for.
amountbigintThe 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
ParameterTypeDescription
walletAddress`0x${string}`The account address to request the withdrawal for.
amountbigintThe 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