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
| Parameter | Type | Description |
|---|---|---|
chain | Chain | Chain to use for the client. |
walletClient | { } | The wallet client to use for wallet interactions. |
publicClient | { } | The public client to use for public interactions. |
Returns
Methods
exitValidators()
exitValidators(
numberOfExits):Promise<`0x${string}`>
Defined in: lib/contracts/handlers/puffer-oracle-v2-handler.ts:109
Exit validators.
Parameters
| Parameter | Type | Description |
|---|---|---|
numberOfExits | bigint | The 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
| Parameter | Type | Description |
|---|---|---|
newPrice | bigint | The 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
| Parameter | Type | Description |
|---|---|---|
newTotalNumberOfValidators | bigint | The new total number of validators. |
epochNumber | bigint | The epoch number. |
guardianEOASignatures | `0x${string}`[] | The guardian EOA signatures. |
Returns
Promise<`0x${string}`>
The transaction.