Skip to main content

contracts/handlers/puffer-depositor-handler

Classes

PufferDepositorHandler

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

Constructors

new PufferDepositorHandler()

new PufferDepositorHandler(chain, walletClient, publicClient): PufferDepositorHandler

Create the handler for the PufferDepositor 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

PufferDepositorHandler

Source

lib/contracts/handlers/puffer-depositor-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

depositStETH()

depositStETH(walletAddress, value): Promise<object>

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<object>

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

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

estimate()

estimate: () => Promise<bigint>

Returns

Promise<bigint>

transact()

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

Returns

Promise<`0x${string}`>

Source

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

depositWstETH()

depositWstETH(walletAddress, value): Promise<object>

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<object>

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

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

estimate()

estimate: () => Promise<bigint>

Returns

Promise<bigint>

transact()

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

Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/puffer-depositor-handler.ts:120

getContract()

getContract(): object

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.

Source

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