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
Parameter | Type | Description |
---|---|---|
chain | Chain | Chain to use for the client. |
walletClient | object | The wallet client to use for wallet interactions. |
publicClient | object | The public client to use for public interactions. |
Returns
Source
lib/contracts/handlers/puffer-oracle-v2-handler.ts:30
Properties
Property | Modifier | Type | Description |
---|---|---|---|
chain | private | Chain | Chain to use for the client. |
publicClient | private | object | The public client to use for public interactions. |
viemChain | private | Chain | - |
walletClient | private | object | The wallet client to use for wallet interactions. |
Methods
exitValidators()
exitValidators(
numberOfExits
):Promise
<`0x${string}`>
Exit validators.
Parameters
Parameter | Type | Description |
---|---|---|
numberOfExits | bigint | The 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
Parameter | Type | Description |
---|---|---|
newPrice | bigint | The 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
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.