Documentation ¶
Index ¶
- Constants
- func EstimateSubmitMinipoolWithdrawableGas(ggp *gogopool.GoGoPool, minipoolAddress common.Address, ...) (gogopool.GasInfo, error)
- func GetActiveMinipoolCount(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (uint64, error)
- func GetFinalisedMinipoolCount(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (uint64, error)
- func GetMinipoolAddresses(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]common.Address, error)
- func GetMinipoolAt(ggp *gogopool.GoGoPool, index uint64, opts *bind.CallOpts) (common.Address, error)
- func GetMinipoolByPubkey(ggp *gogopool.GoGoPool, pubkey ggptypes.ValidatorPubkey, opts *bind.CallOpts) (common.Address, error)
- func GetMinipoolBytecode(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]byte, error)
- func GetMinipoolCount(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (uint64, error)
- func GetMinipoolExists(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.CallOpts) (bool, error)
- func GetMinipoolPubkey(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.CallOpts) (ggptypes.ValidatorPubkey, error)
- func GetMinipoolWithdrawalCredentials(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.CallOpts) (common.Hash, error)
- func GetNodeActiveMinipoolCount(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
- func GetNodeFinalisedMinipoolCount(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
- func GetNodeMinipoolAddresses(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) ([]common.Address, error)
- func GetNodeMinipoolAt(ggp *gogopool.GoGoPool, nodeAddress common.Address, index uint64, ...) (common.Address, error)
- func GetNodeMinipoolCount(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
- func GetNodeValidatingMinipoolAt(ggp *gogopool.GoGoPool, nodeAddress common.Address, index uint64, ...) (common.Address, error)
- func GetNodeValidatingMinipoolCount(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
- func GetNodeValidatingMinipoolPubkeys(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) ([]ggptypes.ValidatorPubkey, error)
- func GetPrelaunchMinipoolAddresses(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]common.Address, error)
- func GetQueueEffectiveCapacity(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (*big.Int, error)
- func GetQueueLength(ggp *gogopool.GoGoPool, depositType ggptypes.MinipoolDeposit, ...) (uint64, error)
- func GetQueueNextCapacity(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (*big.Int, error)
- func GetQueueTotalCapacity(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (*big.Int, error)
- func GetQueueTotalLength(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (uint64, error)
- func SubmitMinipoolWithdrawable(ggp *gogopool.GoGoPool, minipoolAddress common.Address, ...) (common.Hash, error)
- type Minipool
- func (mp *Minipool) CalculateNodeShare(balance *big.Int, opts *bind.CallOpts) (*big.Int, error)
- func (mp *Minipool) CalculateUserShare(balance *big.Int, opts *bind.CallOpts) (*big.Int, error)
- func (mp *Minipool) Close(opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) DelegateRollback(opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) DelegateUpgrade(opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) Dissolve(opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) DistributeBalance(opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) DistributeBalanceAndFinalise(opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) EstimateCloseGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateDelegateRollbackGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateDelegateUpgradeGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateDissolveGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateDistributeBalanceAndFinaliseGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateDistributeBalanceGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateFinaliseGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateRefundGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateSetUseLatestDelegateGas(setting bool, opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateStakeGas(validatorSignature ggptypes.ValidatorSignature, depositDataRoot common.Hash, ...) (gogopool.GasInfo, error)
- func (mp *Minipool) EstimateVoteScrubGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func (mp *Minipool) Finalise(opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) GetDelegate(opts *bind.CallOpts) (common.Address, error)
- func (mp *Minipool) GetDepositType(opts *bind.CallOpts) (ggptypes.MinipoolDeposit, error)
- func (mp *Minipool) GetEffectiveDelegate(opts *bind.CallOpts) (common.Address, error)
- func (mp *Minipool) GetFinalised(opts *bind.CallOpts) (bool, error)
- func (mp *Minipool) GetNodeAddress(opts *bind.CallOpts) (common.Address, error)
- func (mp *Minipool) GetNodeDepositAssigned(opts *bind.CallOpts) (bool, error)
- func (mp *Minipool) GetNodeDepositBalance(opts *bind.CallOpts) (*big.Int, error)
- func (mp *Minipool) GetNodeDetails(opts *bind.CallOpts) (NodeDetails, error)
- func (mp *Minipool) GetNodeFee(opts *bind.CallOpts) (float64, error)
- func (mp *Minipool) GetNodeRefundBalance(opts *bind.CallOpts) (*big.Int, error)
- func (mp *Minipool) GetPrestakeEvent(intervalSize *big.Int, opts *bind.CallOpts) (PrestakeData, error)
- func (mp *Minipool) GetPreviousDelegate(opts *bind.CallOpts) (common.Address, error)
- func (mp *Minipool) GetStatus(opts *bind.CallOpts) (ggptypes.MinipoolStatus, error)
- func (mp *Minipool) GetStatusBlock(opts *bind.CallOpts) (uint64, error)
- func (mp *Minipool) GetStatusDetails(opts *bind.CallOpts) (StatusDetails, error)
- func (mp *Minipool) GetStatusTime(opts *bind.CallOpts) (time.Time, error)
- func (mp *Minipool) GetUseLatestDelegate(opts *bind.CallOpts) (bool, error)
- func (mp *Minipool) GetUserDepositAssigned(opts *bind.CallOpts) (bool, error)
- func (mp *Minipool) GetUserDepositAssignedTime(opts *bind.CallOpts) (time.Time, error)
- func (mp *Minipool) GetUserDepositBalance(opts *bind.CallOpts) (*big.Int, error)
- func (mp *Minipool) GetUserDetails(opts *bind.CallOpts) (UserDetails, error)
- func (mp *Minipool) Refund(opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) SetUseLatestDelegate(setting bool, opts *bind.TransactOpts) (common.Hash, error)
- func (mp *Minipool) Stake(validatorSignature ggptypes.ValidatorSignature, depositDataRoot common.Hash, ...) (common.Hash, error)
- func (mp *Minipool) VoteScrub(opts *bind.TransactOpts) (common.Hash, error)
- type MinipoolCountsPerStatus
- type MinipoolDetails
- func GetMinipoolDetails(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.CallOpts) (MinipoolDetails, error)
- func GetMinipools(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]MinipoolDetails, error)
- func GetNodeMinipools(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) ([]MinipoolDetails, error)
- type NodeDetails
- type PrestakeData
- type QueueCapacity
- type QueueLengths
- type StatusDetails
- type UserDetails
Constants ¶
const ( MinipoolPrelaunchBatchSize = 750 MinipoolAddressBatchSize = 50 MinipoolDetailsBatchSize = 20 )
Settings
const EventScanInterval = 10000
The number of blocks to look for events in at once when scanning
Variables ¶
This section is empty.
Functions ¶
func EstimateSubmitMinipoolWithdrawableGas ¶
func EstimateSubmitMinipoolWithdrawableGas(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of SubmitMinipoolWithdrawable
func GetActiveMinipoolCount ¶
Get the number of active minipools in the network
func GetFinalisedMinipoolCount ¶
Get the number of finalised minipools in the network
func GetMinipoolAddresses ¶
Get all minipool addresses
func GetMinipoolAt ¶
func GetMinipoolAt(ggp *gogopool.GoGoPool, index uint64, opts *bind.CallOpts) (common.Address, error)
Get a minipool address by index
func GetMinipoolByPubkey ¶
func GetMinipoolByPubkey(ggp *gogopool.GoGoPool, pubkey ggptypes.ValidatorPubkey, opts *bind.CallOpts) (common.Address, error)
Get a minipool address by validator pubkey
func GetMinipoolBytecode ¶
Get the CreationCode binary for the GoGoMinipool contract that will be created by node deposits
func GetMinipoolCount ¶
Get the minipool count
func GetMinipoolExists ¶
func GetMinipoolExists(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.CallOpts) (bool, error)
Check whether a minipool exists
func GetMinipoolPubkey ¶
func GetMinipoolPubkey(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.CallOpts) (ggptypes.ValidatorPubkey, error)
Get a minipool's validator pubkey
func GetMinipoolWithdrawalCredentials ¶
func GetMinipoolWithdrawalCredentials(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.CallOpts) (common.Hash, error)
Get the 0x01-based Beacon Chain withdrawal credentials for a given minipool
func GetNodeActiveMinipoolCount ¶
func GetNodeActiveMinipoolCount(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
Get the number of minipools owned by a node that are not finalised
func GetNodeFinalisedMinipoolCount ¶
func GetNodeFinalisedMinipoolCount(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
Get the number of minipools owned by a node that are finalised
func GetNodeMinipoolAddresses ¶
func GetNodeMinipoolAddresses(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) ([]common.Address, error)
Get a node's minipool addresses
func GetNodeMinipoolAt ¶
func GetNodeMinipoolAt(ggp *gogopool.GoGoPool, nodeAddress common.Address, index uint64, opts *bind.CallOpts) (common.Address, error)
Get a node's minipool address by index
func GetNodeMinipoolCount ¶
func GetNodeMinipoolCount(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
Get a node's minipool count
func GetNodeValidatingMinipoolAt ¶
func GetNodeValidatingMinipoolAt(ggp *gogopool.GoGoPool, nodeAddress common.Address, index uint64, opts *bind.CallOpts) (common.Address, error)
Get a node's validating minipool address by index
func GetNodeValidatingMinipoolCount ¶
func GetNodeValidatingMinipoolCount(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
Get a node's validating minipool count
func GetNodeValidatingMinipoolPubkeys ¶
func GetNodeValidatingMinipoolPubkeys(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) ([]ggptypes.ValidatorPubkey, error)
Get a node's validating minipool pubkeys
func GetPrelaunchMinipoolAddresses ¶
func GetPrelaunchMinipoolAddresses(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]common.Address, error)
Get the addresses of all minipools in prelaunch status
func GetQueueEffectiveCapacity ¶
Get the total effective capacity of the minipool queue (used in node demand calculation)
func GetQueueLength ¶
func GetQueueLength(ggp *gogopool.GoGoPool, depositType ggptypes.MinipoolDeposit, opts *bind.CallOpts) (uint64, error)
Get the length of a single minipool queue
func GetQueueNextCapacity ¶
Get the capacity of the next minipool in the queue
func GetQueueTotalCapacity ¶
Get the total capacity of the minipool queue
func GetQueueTotalLength ¶
Get the total length of the minipool queue
Types ¶
type Minipool ¶
type Minipool struct { Address common.Address Contract *gogopool.Contract GoGoPool *gogopool.GoGoPool }
Minipool contract
func NewMinipool ¶
Create new minipool contract
func (*Minipool) CalculateNodeShare ¶
Given a validator balance, calculates how much belongs to the node taking into consideration rewards and penalties
func (*Minipool) CalculateUserShare ¶
Given a validator balance, calculates how much belongs to rETH users taking into consideration rewards and penalties
func (*Minipool) DelegateRollback ¶
Rollback to previous delegate contract
func (*Minipool) DelegateUpgrade ¶
Upgrade this minipool to the latest network delegate contract
func (*Minipool) DistributeBalance ¶
Distribute 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 (*Minipool) DistributeBalanceAndFinalise ¶
Distribute the minipool's ETH balance to the node operator and rETH staking pool, then finalises 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 (*Minipool) EstimateCloseGas ¶
Estimate the gas of Close
func (*Minipool) EstimateDelegateRollbackGas ¶
Estimate the gas of DelegateRollback
func (*Minipool) EstimateDelegateUpgradeGas ¶
Estimate the gas of DelegateUpgrade
func (*Minipool) EstimateDissolveGas ¶
Estimate the gas of Dissolve
func (*Minipool) EstimateDistributeBalanceAndFinaliseGas ¶
func (mp *Minipool) EstimateDistributeBalanceAndFinaliseGas(opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of DistributeBalanceAndFinalise
func (*Minipool) EstimateDistributeBalanceGas ¶
Estimate the gas of DistributeBalance
func (*Minipool) EstimateFinaliseGas ¶
Estimate the gas of Finalise
func (*Minipool) EstimateRefundGas ¶
Estimate the gas of Refund
func (*Minipool) EstimateSetUseLatestDelegateGas ¶
func (mp *Minipool) EstimateSetUseLatestDelegateGas(setting bool, opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of SetUseLatestDelegate
func (*Minipool) EstimateStakeGas ¶
func (mp *Minipool) EstimateStakeGas(validatorSignature ggptypes.ValidatorSignature, depositDataRoot common.Hash, opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of Stake
func (*Minipool) EstimateVoteScrubGas ¶
Estimate the gas requiired to vote to scrub a minipool
func (*Minipool) GetDelegate ¶
Returns the address of the minipool's stored delegate
func (*Minipool) GetDepositType ¶
Get deposit type
func (*Minipool) GetEffectiveDelegate ¶
Returns the delegate which will be used when calling this minipool taking into account useLatestDelegate setting
func (*Minipool) GetNodeAddress ¶
func (*Minipool) GetNodeDepositAssigned ¶
func (*Minipool) GetNodeDepositBalance ¶
func (*Minipool) GetNodeDetails ¶
func (mp *Minipool) GetNodeDetails(opts *bind.CallOpts) (NodeDetails, error)
Get node details
func (*Minipool) GetNodeRefundBalance ¶
func (*Minipool) GetPrestakeEvent ¶
func (mp *Minipool) GetPrestakeEvent(intervalSize *big.Int, opts *bind.CallOpts) (PrestakeData, error)
Get the data from this minipool's MinipoolPrestaked event
func (*Minipool) GetPreviousDelegate ¶
Returns the address of the minipool's previous delegate (or address(0) if not set)
func (*Minipool) GetStatusBlock ¶
func (*Minipool) GetStatusDetails ¶
func (mp *Minipool) GetStatusDetails(opts *bind.CallOpts) (StatusDetails, error)
Get status details
func (*Minipool) GetStatusTime ¶
func (*Minipool) GetUseLatestDelegate ¶
Getter for useLatestDelegate setting
func (*Minipool) GetUserDepositAssigned ¶
func (*Minipool) GetUserDepositAssignedTime ¶
func (*Minipool) GetUserDepositBalance ¶
func (*Minipool) GetUserDetails ¶
func (mp *Minipool) GetUserDetails(opts *bind.CallOpts) (UserDetails, error)
Get user deposit details
func (*Minipool) SetUseLatestDelegate ¶
func (mp *Minipool) SetUseLatestDelegate(setting bool, opts *bind.TransactOpts) (common.Hash, error)
If set to true, will automatically use the latest delegate contract
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
func GetMinipoolCountPerStatus ¶
func GetMinipoolCountPerStatus(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (MinipoolCountsPerStatus, error)
Get the minipool count by status
type MinipoolDetails ¶
type MinipoolDetails struct { Address common.Address `json:"address"` Exists bool `json:"exists"` Pubkey ggptypes.ValidatorPubkey `json:"pubkey"` }
Minipool details
func GetMinipoolDetails ¶
func GetMinipoolDetails(ggp *gogopool.GoGoPool, minipoolAddress common.Address, opts *bind.CallOpts) (MinipoolDetails, error)
Get a minipool's details
func GetMinipools ¶
Get all minipool details
func GetNodeMinipools ¶
func GetNodeMinipools(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) ([]MinipoolDetails, error)
Get a node's minipool details
type NodeDetails ¶
type PrestakeData ¶
type PrestakeData struct { Pubkey ggptypes.ValidatorPubkey `json:"pubkey"` WithdrawalCredentials common.Hash `json:"withdrawalCredentials"` Amount *big.Int `json:"amount"` Signature ggptypes.ValidatorSignature `json:"signature"` DepositDataRoot common.Hash `json:"depositDataRoot"` Time time.Time `json:"time"` }
Formatted MinipoolPrestaked event data
type StatusDetails ¶
type StatusDetails struct { Status ggptypes.MinipoolStatus `json:"status"` StatusBlock uint64 `json:"statusBlock"` StatusTime time.Time `json:"statusTime"` }
Minipool detail types