Documentation ¶
Index ¶
- type IMinipool
- type MinipoolCommon
- func (c *MinipoolCommon) CalculateNodeShare(mc *batch.MultiCaller, share_Out **big.Int, balance *big.Int)
- func (c *MinipoolCommon) CalculateUserShare(mc *batch.MultiCaller, share_Out **big.Int, balance *big.Int)
- func (c *MinipoolCommon) Close(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolCommon) Common() *MinipoolCommon
- func (c *MinipoolCommon) DelegateRollback(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolCommon) DelegateUpgrade(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolCommon) Dissolve(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolCommon) Finalise(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolCommon) GetContract() *core.Contract
- func (c *MinipoolCommon) GetPrestakeEvent(intervalSize *big.Int, opts *bind.CallOpts) (PrestakeData, error)
- func (c *MinipoolCommon) Refund(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolCommon) SetUseLatestDelegate(setting bool, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolCommon) Stake(validatorSignature beacon.ValidatorSignature, depositDataRoot common.Hash, ...) (*eth.TransactionInfo, error)
- func (c *MinipoolCommon) VoteScrub(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- type MinipoolCountsPerStatus
- type MinipoolManager
- func (c *MinipoolManager) CreateMinipoolFromAddress(address common.Address, includeDetails bool, opts *bind.CallOpts) (IMinipool, error)
- func (c *MinipoolManager) CreateMinipoolsFromAddresses(addresses []common.Address, includeDetails bool, opts *bind.CallOpts) ([]IMinipool, error)
- func (c *MinipoolManager) GetMinipoolAddress(mc *batch.MultiCaller, address_Out *common.Address, index uint64)
- func (c *MinipoolManager) GetMinipoolAddressByPubkey(mc *batch.MultiCaller, address_Out *common.Address, ...)
- func (c *MinipoolManager) GetMinipoolAddresses(mc *batch.MultiCaller, minipoolCount uint64, opts *bind.CallOpts) ([]common.Address, error)
- func (c *MinipoolManager) GetMinipoolAtQueuePosition(mc *batch.MultiCaller, address_Out *common.Address, position uint64)
- func (c *MinipoolManager) GetMinipoolCountPerStatus(minipoolCount uint64, opts *bind.CallOpts) (MinipoolCountsPerStatus, error)
- func (c *MinipoolManager) GetMinipoolWithdrawalCredentials(mc *batch.MultiCaller, credentials_Out *common.Hash, address common.Address)
- func (c *MinipoolManager) GetPrelaunchMinipoolAddresses(minipoolCount uint64, opts *bind.CallOpts) ([]common.Address, error)
- func (c *MinipoolManager) GetVacantMinipoolAddress(mc *batch.MultiCaller, address_Out *common.Address, index uint64)
- func (c *MinipoolManager) GetVacantMinipoolAddresses(mc *batch.MultiCaller, minipoolCount uint64, opts *bind.CallOpts) ([]common.Address, error)
- func (c *MinipoolManager) NewMinipoolFromVersion(address common.Address, version uint8) (IMinipool, error)
- type MinipoolPrestakeEvent
- type MinipoolV2
- type MinipoolV3
- func (c *MinipoolV3) BeginReduceBondAmount(newBondAmount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolV3) DistributeBalance(opts *bind.TransactOpts, rewardsOnly bool) (*eth.TransactionInfo, error)
- func (c *MinipoolV3) Promote(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolV3) QueryAllFields(mc *batch.MultiCaller)
- func (c *MinipoolV3) ReduceBondAmount(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- func (c *MinipoolV3) VoteCancelReduction(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
- type PrestakeData
- type QueueDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMinipool ¶
type IMinipool interface { // Get all of the minipool's details QueryAllFields(mc *batch.MultiCaller) // Gets the underlying minipool's contract GetContract() *core.Contract // Gets the common binding for all minipool types Common() *MinipoolCommon }
type MinipoolCommon ¶
type MinipoolCommon struct { // The address of the minipool contract Address common.Address // The version of the minipool Version uint8 // The address of the node that owns this minipool NodeAddress *core.SimpleField[common.Address] // The minipool's status Status *core.FormattedUint8Field[types.MinipoolStatus] // The block that the minipool's status last changed StatusBlock *core.FormattedUint256Field[uint64] // The time that the minipool's status last changed StatusTime *core.FormattedUint256Field[time.Time] // True if the minipool has been finalised IsFinalised *core.SimpleField[bool] // The minipool's commission rate NodeFee *core.FormattedUint256Field[float64] // The balance the node has deposited to the minipool NodeDepositBalance *core.SimpleField[*big.Int] // The amount of ETH ready to be refunded to the node NodeRefundBalance *core.SimpleField[*big.Int] // True if the node deposit has been assigned to the minipool NodeDepositAssigned *core.SimpleField[bool] // The balance the pool stakers have deposited to the minipool UserDepositBalance *core.SimpleField[*big.Int] // True if the pool staker deposits has been assigned to the minipool UserDepositAssigned *core.SimpleField[bool] // The time at which the pool stakers were assigned to the minipool UserDepositAssignedTime *core.FormattedUint256Field[time.Time] // True if the "use latest delegate" flag is enabled IsUseLatestDelegateEnabled *core.SimpleField[bool] // The address of the current delegate the minipool has recorded DelegateAddress *core.SimpleField[common.Address] // The address of the previous delegate the minipool will use after a rollback PreviousDelegateAddress *core.SimpleField[common.Address] // The address of the delegate the minipool will use (may be different than DelegateAddress if UseLatestDelegate is enabled) EffectiveDelegateAddress *core.SimpleField[common.Address] // The minipool's penalty count PenaltyCount *core.FormattedUint256Field[uint64] // True if a minipool exists (i.e. there is a minipool with this contract address) Exists *core.SimpleField[bool] // The pubkey of the validator on the Beacon Chain managed by this minipool Pubkey *core.SimpleField[beacon.ValidatorPubkey] // The minipool's 0x01-based withdrawal credentials WithdrawalCredentials *core.SimpleField[common.Hash] // True if the minipool's RPL has been slashed RplSlashed *core.SimpleField[bool] // The minipool's deposit type DepositType *core.FormattedUint8Field[types.MinipoolDeposit] // The queue position of the minipool (-1 means not in the queue, otherwise 0-indexed) QueuePosition *core.FormattedUint256Field[int64] // contains filtered or unexported fields }
Basic binding for version-agnostic RocketMinipool contracts
func (*MinipoolCommon) CalculateNodeShare ¶
func (c *MinipoolCommon) CalculateNodeShare(mc *batch.MultiCaller, share_Out **big.Int, balance *big.Int)
Given a validator balance, calculates how much belongs to the node (taking into consideration rewards and penalties)
func (*MinipoolCommon) CalculateUserShare ¶
func (c *MinipoolCommon) CalculateUserShare(mc *batch.MultiCaller, share_Out **big.Int, balance *big.Int)
Given a validator balance, calculates how much belongs to rETH pool stakers (taking into consideration rewards and penalties)
func (*MinipoolCommon) Close ¶
func (c *MinipoolCommon) Close(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for withdrawing node balances from the dissolved minipool and closing it
func (*MinipoolCommon) Common ¶
func (c *MinipoolCommon) Common() *MinipoolCommon
Gets the common binding for all minipool types
func (*MinipoolCommon) DelegateRollback ¶
func (c *MinipoolCommon) DelegateRollback(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for rolling back to the previous delegate contract
func (*MinipoolCommon) DelegateUpgrade ¶
func (c *MinipoolCommon) DelegateUpgrade(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for upgrading this minipool to the latest network delegate contract
func (*MinipoolCommon) Dissolve ¶
func (c *MinipoolCommon) Dissolve(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for dissolving the initialized or prelaunch minipool
func (*MinipoolCommon) Finalise ¶
func (c *MinipoolCommon) Finalise(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for finalising a minipool to get the RPL stake back
func (*MinipoolCommon) GetContract ¶
func (c *MinipoolCommon) GetContract() *core.Contract
Gets the underlying minipool's contract
func (*MinipoolCommon) GetPrestakeEvent ¶
func (c *MinipoolCommon) GetPrestakeEvent(intervalSize *big.Int, opts *bind.CallOpts) (PrestakeData, error)
Get the data from this minipool's MinipoolPrestaked event
func (*MinipoolCommon) Refund ¶
func (c *MinipoolCommon) Refund(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for refunding node ETH from the minipool
func (*MinipoolCommon) SetUseLatestDelegate ¶
func (c *MinipoolCommon) SetUseLatestDelegate(setting bool, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for setting the UseLatestDelegate flag (if set to true, will automatically use the latest delegate contract)
func (*MinipoolCommon) Stake ¶
func (c *MinipoolCommon) Stake(validatorSignature beacon.ValidatorSignature, depositDataRoot common.Hash, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for progressing the prelaunch minipool to staking
func (*MinipoolCommon) VoteScrub ¶
func (c *MinipoolCommon) VoteScrub(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for voting to scrub a minipool
type MinipoolCountsPerStatus ¶
type MinipoolCountsPerStatus struct { Initialized *big.Int `abi:"initialisedCount"` Prelaunch *big.Int `abi:"prelaunchCount"` Staking *big.Int `abi:"stakingCount"` Withdrawable *big.Int `abi:"withdrawableCount"` Dissolved *big.Int `abi:"dissolvedCount"` }
The counts of minipools per status
type MinipoolManager ¶
type MinipoolManager struct { // The number of minipools in the Rocket Pool network MinipoolCount *core.FormattedUint256Field[uint64] // The number of staking minipools in the network StakingMinipoolCount *core.FormattedUint256Field[uint64] // The number of finalised minipools in the network FinalisedMinipoolCount *core.FormattedUint256Field[uint64] // The number of active minipools in the network ActiveMinipoolCount *core.FormattedUint256Field[uint64] // The number of vacant minipools in the network VacantMinipoolCount *core.FormattedUint256Field[uint64] // The total length of the minipool queue TotalQueueLength *core.FormattedUint256Field[uint64] // The total capacity of the minipool queue TotalQueueCapacity *core.SimpleField[*big.Int] // The effective capacity of the minipool queue (used in node demand calculation) EffectiveQueueCapacity *core.SimpleField[*big.Int] // contains filtered or unexported fields }
Binding for RocketMinipoolManager
func NewMinipoolManager ¶
func NewMinipoolManager(rp *rocketpool.RocketPool) (*MinipoolManager, error)
Creates a new MinipoolManager contract binding
func (*MinipoolManager) CreateMinipoolFromAddress ¶
func (c *MinipoolManager) CreateMinipoolFromAddress(address common.Address, includeDetails bool, opts *bind.CallOpts) (IMinipool, error)
Create a minipool binding from its address
func (*MinipoolManager) CreateMinipoolsFromAddresses ¶
func (c *MinipoolManager) CreateMinipoolsFromAddresses(addresses []common.Address, includeDetails bool, opts *bind.CallOpts) ([]IMinipool, error)
Create bindings for all minipools from the provided addresses in a standalone call. This will use an internal batched multicall invocation to build all of them quickly.
func (*MinipoolManager) GetMinipoolAddress ¶
func (c *MinipoolManager) GetMinipoolAddress(mc *batch.MultiCaller, address_Out *common.Address, index uint64)
Get a minipool address by index
func (*MinipoolManager) GetMinipoolAddressByPubkey ¶
func (c *MinipoolManager) GetMinipoolAddressByPubkey(mc *batch.MultiCaller, address_Out *common.Address, pubkey beacon.ValidatorPubkey)
Get a minipool address by pubkey
func (*MinipoolManager) GetMinipoolAddresses ¶
func (c *MinipoolManager) GetMinipoolAddresses(mc *batch.MultiCaller, minipoolCount uint64, opts *bind.CallOpts) ([]common.Address, error)
Get all minipool addresses in a standalone call. This will use an internal batched multicall invocation to retrieve all of them. Provide the value returned from GetMinipoolCount() in minipoolCount.
func (*MinipoolManager) GetMinipoolAtQueuePosition ¶
func (c *MinipoolManager) GetMinipoolAtQueuePosition(mc *batch.MultiCaller, address_Out *common.Address, position uint64)
Get the minipool at the specified position in queue (0-indexed).
func (*MinipoolManager) GetMinipoolCountPerStatus ¶
func (c *MinipoolManager) GetMinipoolCountPerStatus(minipoolCount uint64, opts *bind.CallOpts) (MinipoolCountsPerStatus, error)
Get the minipool count by status
func (*MinipoolManager) GetMinipoolWithdrawalCredentials ¶
func (c *MinipoolManager) GetMinipoolWithdrawalCredentials(mc *batch.MultiCaller, credentials_Out *common.Hash, address common.Address)
Get the 0x01-based withdrawal credentials for a minipool address (even if it doesn't exist yet)
func (*MinipoolManager) GetPrelaunchMinipoolAddresses ¶
func (c *MinipoolManager) GetPrelaunchMinipoolAddresses(minipoolCount uint64, opts *bind.CallOpts) ([]common.Address, error)
Get all prelaunch minipool addresses in a standalone call. This will use an internal batched multicall invocation to retrieve all of them. Provide the value returned from GetMinipoolCount() in minipoolCount.
func (*MinipoolManager) GetVacantMinipoolAddress ¶
func (c *MinipoolManager) GetVacantMinipoolAddress(mc *batch.MultiCaller, address_Out *common.Address, index uint64)
Get a vacant minipool address by index
func (*MinipoolManager) GetVacantMinipoolAddresses ¶
func (c *MinipoolManager) GetVacantMinipoolAddresses(mc *batch.MultiCaller, minipoolCount uint64, opts *bind.CallOpts) ([]common.Address, error)
Get all minipool addresses in a standalone call. This will use an internal batched multicall invocation to retrieve all of them. Provide the value returned from GetVacantMinipoolCount() in minipoolCount.
func (*MinipoolManager) NewMinipoolFromVersion ¶
func (c *MinipoolManager) NewMinipoolFromVersion(address common.Address, version uint8) (IMinipool, error)
Create a minipool binding from an explicit version number
type MinipoolPrestakeEvent ¶
type MinipoolPrestakeEvent struct { Pubkey []byte `abi:"validatorPubkey"` Signature []byte `abi:"validatorSignature"` DepositDataRoot [32]byte `abi:"depositDataRoot"` Amount *big.Int `abi:"amount"` WithdrawalCredentials []byte `abi:"withdrawalCredentials"` Time *big.Int `abi:"time"` }
The data from a minipool's MinipoolPrestaked event
type MinipoolV2 ¶
type MinipoolV2 struct {
*MinipoolCommon
}
func GetMinipoolAsV2 ¶
func GetMinipoolAsV2(mp IMinipool) (*MinipoolV2, bool)
Get the minipool as a v2 minipool if it implements the required methods
func (*MinipoolV2) DistributeBalance ¶
func (c *MinipoolV2) DistributeBalance(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for distributing the minipool's ETH balance to the node operator and rETH staking pool. !!! WARNING !!! DO NOT CALL THIS until the minipool's validator has exited from the Beacon Chain and the balance has been deposited into the minipool!
func (*MinipoolV2) DistributeBalanceAndFinalise ¶
func (c *MinipoolV2) DistributeBalanceAndFinalise(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for distributing the minipool's ETH balance to the node operator and rETH staking pool, then finalising the minipool !!! WARNING !!! DO NOT CALL THIS until the minipool's validator has exited from the Beacon Chain and the balance has been deposited into the minipool!
func (*MinipoolV2) QueryAllFields ¶
func (c *MinipoolV2) QueryAllFields(mc *batch.MultiCaller)
Query all of the minipool details
type MinipoolV3 ¶
type MinipoolV3 struct { *MinipoolCommon // True if this is a vacant minipool (pre-staking solo migration) IsVacant *core.SimpleField[bool] // The node deposit balance of this minipool before its last bond reduction PreMigrationBalance *core.SimpleField[*big.Int] // True if the minipool's balance has already been distributed by someone other than the node operator HasUserDistributed *core.SimpleField[bool] // True if the bond reduction process for the minipool has been cancelled IsBondReduceCancelled *core.SimpleField[bool] // The time at which the MP owner started the bond reduction process ReduceBondTime *core.FormattedUint256Field[time.Time] // The amount of ETH the minipool is reducing its bond to ReduceBondValue *core.SimpleField[*big.Int] // The timestamp at which the bond was last reduced LastBondReductionTime *core.FormattedUint256Field[time.Time] // The previous bond amount of the minipool prior to its last reduction LastBondReductionPrevValue *core.SimpleField[*big.Int] // The previous node fee (commission) of the minipool prior to its last reduction LastBondReductionPrevNodeFee *core.FormattedUint256Field[float64] // contains filtered or unexported fields }
func GetMinipoolAsV3 ¶
func GetMinipoolAsV3(mp IMinipool) (*MinipoolV3, bool)
Get the minipool as a v3 minipool if it implements the required methods
func (*MinipoolV3) BeginReduceBondAmount ¶
func (c *MinipoolV3) BeginReduceBondAmount(newBondAmount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for beginning a minipool bond reduction
func (*MinipoolV3) DistributeBalance ¶
func (c *MinipoolV3) DistributeBalance(opts *bind.TransactOpts, rewardsOnly bool) (*eth.TransactionInfo, error)
Get info for distributing the minipool's ETH balance to the node operator and rETH staking pool
func (*MinipoolV3) Promote ¶
func (c *MinipoolV3) Promote(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for promoting a vacant minipool
func (*MinipoolV3) QueryAllFields ¶
func (c *MinipoolV3) QueryAllFields(mc *batch.MultiCaller)
Get the basic details
func (*MinipoolV3) ReduceBondAmount ¶
func (c *MinipoolV3) ReduceBondAmount(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for reducing a minipool's bond
func (*MinipoolV3) VoteCancelReduction ¶
func (c *MinipoolV3) VoteCancelReduction(opts *bind.TransactOpts) (*eth.TransactionInfo, error)
Get info for voting to cancel a minipool's bond reduction
type PrestakeData ¶
type PrestakeData struct { Pubkey beacon.ValidatorPubkey `json:"pubkey"` WithdrawalCredentials common.Hash `json:"withdrawalCredentials"` Amount *big.Int `json:"amount"` Signature beacon.ValidatorSignature `json:"signature"` DepositDataRoot common.Hash `json:"depositDataRoot"` Time time.Time `json:"time"` }
Formatted MinipoolPrestaked event data