Skip to main content

contracts/handlers/puffer-oracle-v2-handler

Classes

PufferOracleV2Handler

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

Constructors

new PufferOracleV2Handler()

new PufferOracleV2Handler(chain, walletClient, publicClient): PufferOracleV2Handler

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

PufferOracleV2Handler

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:30

Properties

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

Methods

exitValidators()

exitValidators(numberOfExits): Promise<`0x${string}`>

Exit validators.

Parameters
ParameterTypeDescription
numberOfExitsbigintThe number of validators to exit.
Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:109

getContract()

getContract(): object

Get the contract.

Returns

object

The viem contract.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:43

getLockedEthAmount()

getLockedEthAmount(): Promise<bigint>

Get the locked ETH amount.

Returns

Promise<bigint>

The locked ETH amount.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:78

getTotalNumberOfValidators()

getTotalNumberOfValidators(): Promise<bigint>

Get the total number of validators.

Returns

Promise<bigint>

The total number of validators.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:69

getValidatorTicketPrice()

getValidatorTicketPrice(): Promise<bigint>

Get the validator ticket price.

Returns

Promise<bigint>

The validator ticket price.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:60

isOverBurstThreshold()

isOverBurstThreshold(): Promise<boolean>

Check if the system is over burst threshold.

Returns

Promise<boolean>

True if over burst threshold.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:87

provisionNode()

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

Provision a new node.

Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:96

setMintPrice()

setMintPrice(newPrice): Promise<`0x${string}`>

Set the mint price for validator tickets.

Parameters
ParameterTypeDescription
newPricebigintThe new mint price.
Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:122

setTotalNumberOfValidators()

setTotalNumberOfValidators(newTotalNumberOfValidators, epochNumber, guardianEOASignatures): Promise<`0x${string}`>

Set the total number of validators.

Parameters
ParameterTypeDescription
newTotalNumberOfValidatorsbigintThe new total number of validators.
epochNumberbigintThe epoch number.
guardianEOASignatures`0x${string}`[]The guardian EOA signatures.
Returns

Promise<`0x${string}`>

The transaction.

Source

lib/contracts/handlers/puffer-oracle-v2-handler.ts:137