contracts/handlers/puffer-protocol-handler
Classes
PufferProtocolHandler
Handler for the PufferProtocol
contract exposing methods to interact
with the contract.
Constructors
new PufferProtocolHandler()
new PufferProtocolHandler(
chain
,walletClient
,publicClient
):PufferProtocolHandler
Create the handler for the PufferProtocol
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-protocol-handler.ts:57
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
batchHandleWithdrawals()
batchHandleWithdrawals(
validatorInfos
,guardianEOASignatures
):Promise
<`0x${string}`>
Batch handle withdrawals.
Parameters
Parameter | Type | Description |
---|---|---|
validatorInfos | StoppedValidatorInfo [] | The validator infos. |
guardianEOASignatures | `0x${string}`[] | The guardian EOA signatures. |
Returns
Promise
<`0x${string}`>
The transaction.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:312
createPufferModule()
createPufferModule(
moduleName
):Promise
<`0x${string}`>
Create a new puffer module.
Parameters
Parameter | Type | Description |
---|---|---|
moduleName | `0x${string}` | The module name. |
Returns
Promise
<`0x${string}`>
The transaction.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:221
depositValidatorTickets()
depositValidatorTickets(
permit
,node
):Promise
<`0x${string}`>
Deposit validator tickets.
Parameters
Parameter | Type | Description |
---|---|---|
permit | PermitData | The permit data. |
node | `0x${string}` | The node address. |
Returns
Promise
<`0x${string}`>
The transaction.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:281
getContract()
getContract():
object
Get the contract.
Returns
object
The viem contract.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:70
getDepositDataRoot()
getDepositDataRoot(
pubKey
,signature
,withdrawalCredentials
):Promise
<`0x${string}`>
Get deposit data root.
Parameters
Parameter | Type | Description |
---|---|---|
pubKey | `0x${string}` | The public key. |
signature | `0x${string}` | The signature. |
withdrawalCredentials | `0x${string}` | The withdrawal credentials. |
Returns
Promise
<`0x${string}`>
The deposit data root.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:203
getMinimumVtAmount()
getMinimumVtAmount():
Promise
<bigint
>
Get the minimum VT amount required.
Returns
Promise
<bigint
>
The minimum VT amount.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:87
getModuleAddress()
getModuleAddress(
moduleName
):Promise
<`0x${string}`>
Get module address by name.
Parameters
Parameter | Type | Description |
---|---|---|
moduleName | `0x${string}` | The module name. |
Returns
Promise
<`0x${string}`>
The module address.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:116
getModuleLimitInformation()
getModuleLimitInformation(
moduleName
):Promise
<object
>
Get module limit information.
Parameters
Parameter | Type | Description |
---|---|---|
moduleName | `0x${string}` | The module name. |
Returns
Promise
<object
>
The module limit information.
allowedLimit
allowedLimit:
bigint
numberOfRegisteredValidators
numberOfRegisteredValidators:
bigint
Source
lib/contracts/handlers/puffer-protocol-handler.ts:181
getModuleWeights()
getModuleWeights():
Promise
<readonly `0x${string}`[]>
Get module weights.
Returns
Promise
<readonly `0x${string}`[]>
The module weights.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:125
getNextValidatorToProvision()
getNextValidatorToProvision():
Promise
<readonly [`0x${string}`,bigint
]>
Get the next validator to be provisioned.
Returns
Promise
<readonly [`0x${string}`, bigint
]>
Tuple of module name and index.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:134
getNodeInfo()
getNodeInfo(
node
):Promise
<object
>
Get node information.
Parameters
Parameter | Type | Description |
---|---|---|
node | `0x${string}` | The node address. |
Returns
Promise
<object
>
The node information.
activeValidatorCount
activeValidatorCount:
bigint
pendingValidatorCount
pendingValidatorCount:
bigint
vtBalance
vtBalance:
bigint
Source
lib/contracts/handlers/puffer-protocol-handler.ts:144
getVTPenalty()
getVTPenalty():
Promise
<bigint
>
Get the VT penalty amount.
Returns
Promise
<bigint
>
The VT penalty amount.
Source
lib/contracts/handlers/puffer-protocol-handler.ts:96
getValidatorInfo()
getValidatorInfo(
moduleName
,pufferModuleIndex
):Promise
<object
>
Get validator information.
Parameters
Parameter | Type | Description |
---|---|---|
moduleName | `0x${string}` | The module name. |
pufferModuleIndex | bigint | The puffer module index. |
Returns
Promise
<object
>
The validator information.
bond
bond:
bigint
module
module: `0x${string}`
node
node: `0x${string}`
pubKey
pubKey: `0x${string}`
status
status:
number
Source
lib/contracts/handlers/puffer-protocol-handler.ts:165