Skip to main content

contracts/handlers/puffer-depositor-handler

Classes

PufferDepositorHandler

Defined in: lib/contracts/handlers/puffer-depositor-handler.ts:18

Handler for the PufferDepositor contract exposing methods to interact with the contract.

Constructors

Constructor

new PufferDepositorHandler(chain, walletClient, publicClient): PufferDepositorHandler

Defined in: lib/contracts/handlers/puffer-depositor-handler.ts:32

Create the handler for the PufferDepositor contract exposing methods to interact with the contract.

Parameters
ParameterTypeDescription
chainChainChain to use for the client.
walletClient{ }The wallet client to use for wallet interactions.
publicClient{ }The public client to use for public interactions.
Returns

PufferDepositorHandler

Methods

depositStETH()

depositStETH(walletAddress, value): Promise<{ estimate: () => Promise<bigint>; transact: () => Promise<`0x${string}`>; }>

Defined in: lib/contracts/handlers/puffer-depositor-handler.ts:76

Deposit stETH in exchange for pufETH. This doesn't make the transaction but returns two methods namely transact and estimate.

Parameters
ParameterTypeDescription
walletAddress`0x${string}`Wallet address to get the stETH from.
valuebigintValue in wei of the stETH to deposit.
Returns

Promise<{ estimate: () => Promise<bigint>; transact: () => Promise<`0x${string}`>; }>

transact: () => Promise<Address> - Used to make the transaction.

estimate: () => Promise<bigint> - Gas estimate of the transaction.

depositWstETH()

depositWstETH(walletAddress, value): Promise<{ estimate: () => Promise<bigint>; transact: () => Promise<`0x${string}`>; }>

Defined in: lib/contracts/handlers/puffer-depositor-handler.ts:112

Deposit wstETH in exchange for pufETH. This doesn't make the transaction but returns two methods namely transact and estimate.

Parameters
ParameterTypeDescription
walletAddress`0x${string}`Wallet address to get the stETH from.
valuebigintValue in wei of the wstETH to deposit.
Returns

Promise<{ estimate: () => Promise<bigint>; transact: () => Promise<`0x${string}`>; }>

transact: () => Promise<Address> - Used to make the transaction.

estimate: () => Promise<bigint> - Gas estimate of the transaction.

getContract()

getContract(): object

Defined in: lib/contracts/handlers/puffer-depositor-handler.ts:51

Get the contract. This is a method because the typings are complex and lost when trying to make it a member.

Returns

object

The viem contract.