Skip to main content

contracts/handlers/puffer-oracle-v2-handler

Classes​

PufferOracleV2Handler​

Defined in: lib/contracts/handlers/puffer-oracle-v2-handler.ts:17

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

Constructors​

Constructor​

new PufferOracleV2Handler(chain, walletClient, publicClient): PufferOracleV2Handler

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

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

PufferOracleV2Handler

Methods​

exitValidators()​

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

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

Exit validators.

Parameters​
ParameterTypeDescription
numberOfExitsbigintThe number of validators to exit.
Returns​

Promise<`0x${string}`>

The transaction.

getContract()​

getContract(): object

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

Get the contract.

Returns​

object

The viem contract.

getLockedEthAmount()​

getLockedEthAmount(): Promise<bigint>

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

Get the locked ETH amount.

Returns​

Promise<bigint>

The locked ETH amount.

getTotalNumberOfValidators()​

getTotalNumberOfValidators(): Promise<bigint>

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

Get the total number of validators.

Returns​

Promise<bigint>

The total number of validators.

getValidatorTicketPrice()​

getValidatorTicketPrice(): Promise<bigint>

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

Get the validator ticket price.

Returns​

Promise<bigint>

The validator ticket price.

isOverBurstThreshold()​

isOverBurstThreshold(): Promise<boolean>

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

Check if the system is over burst threshold.

Returns​

Promise<boolean>

True if over burst threshold.

provisionNode()​

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

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

Provision a new node.

Returns​

Promise<`0x${string}`>

The transaction.

setMintPrice()​

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

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

Set the mint price for validator tickets.

Parameters​
ParameterTypeDescription
newPricebigintThe new mint price.
Returns​

Promise<`0x${string}`>

The transaction.

setTotalNumberOfValidators()​

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

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

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.