Documentation
¶
Index ¶
- func CalculateAverageFeeAndDistributorShares(rp *rocketpool.RocketPool, contracts *NetworkContracts, node NativeNodeDetails, ...) error
- func CalculateCompleteMinipoolShares(rp *rocketpool.RocketPool, contracts *NetworkContracts, ...) error
- func GetAllProtocolDaoProposalDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts) ([]protocol.ProtocolDaoProposalDetails, error)
- func GetProtocolDaoProposalDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, proposalID uint64) (protocol.ProtocolDaoProposalDetails, error)
- func GetTotalEffectiveRplStake(rp *rocketpool.RocketPool, contracts *NetworkContracts) (*big.Int, error)
- type NativeMinipoolDetails
- func GetAllNativeMinipoolDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts) ([]NativeMinipoolDetails, error)
- func GetNativeMinipoolDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, ...) (NativeMinipoolDetails, error)
- func GetNodeNativeMinipoolDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, ...) ([]NativeMinipoolDetails, error)
- type NativeNodeDetails
- type NetworkContracts
- type NetworkDetails
- type OracleDaoMemberDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateAverageFeeAndDistributorShares ¶
func CalculateAverageFeeAndDistributorShares(rp *rocketpool.RocketPool, contracts *NetworkContracts, node NativeNodeDetails, minipoolDetails []*NativeMinipoolDetails) error
Calculate the average node fee and user/node shares of the distributor's balance
func CalculateCompleteMinipoolShares ¶
func CalculateCompleteMinipoolShares(rp *rocketpool.RocketPool, contracts *NetworkContracts, minipoolDetails []*NativeMinipoolDetails, beaconBalances []*big.Int) error
Calculate the node and user shares of the total minipool balance, including the portion on the Beacon chain
func GetAllProtocolDaoProposalDetails ¶ added in v1.8.3
func GetAllProtocolDaoProposalDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts) ([]protocol.ProtocolDaoProposalDetails, error)
Gets all Protocol DAO proposal details using the efficient multicall contract
func GetProtocolDaoProposalDetails ¶ added in v1.8.3
func GetProtocolDaoProposalDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, proposalID uint64) (protocol.ProtocolDaoProposalDetails, error)
Gets a Protocol DAO proposal's details using the efficient multicall contract
func GetTotalEffectiveRplStake ¶
func GetTotalEffectiveRplStake(rp *rocketpool.RocketPool, contracts *NetworkContracts) (*big.Int, error)
Gets the details for a node using the efficient multicall contract
Types ¶
type NativeMinipoolDetails ¶
type NativeMinipoolDetails struct {
// Redstone
Exists bool
MinipoolAddress common.Address
Pubkey types.ValidatorPubkey
StatusRaw uint8
StatusBlock *big.Int
StatusTime *big.Int
Finalised bool
DepositTypeRaw uint8
NodeFee *big.Int
NodeDepositBalance *big.Int
NodeDepositAssigned bool
UserDepositBalance *big.Int
UserDepositAssigned bool
UserDepositAssignedTime *big.Int
UseLatestDelegate bool
Delegate common.Address
PreviousDelegate common.Address
EffectiveDelegate common.Address
PenaltyCount *big.Int
PenaltyRate *big.Int
NodeAddress common.Address
Version uint8
Balance *big.Int // Contract balance
DistributableBalance *big.Int // Contract balance minus node op refund
NodeRefundBalance *big.Int
WithdrawalCredentials common.Hash
Status types.MinipoolStatus
DepositType types.MinipoolDeposit
// Atlas
UserDistributed bool
Slashed bool
IsVacant bool
LastBondReductionTime *big.Int
LastBondReductionPrevValue *big.Int
LastBondReductionPrevNodeFee *big.Int
ReduceBondTime *big.Int
ReduceBondCancelled bool
ReduceBondValue *big.Int
PreMigrationBalance *big.Int
}
Complete details for a minipool
func GetAllNativeMinipoolDetails ¶
func GetAllNativeMinipoolDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts) ([]NativeMinipoolDetails, error)
Gets all minpool details using the efficient multicall contract
func GetNativeMinipoolDetails ¶
func GetNativeMinipoolDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, minipoolAddress common.Address) (NativeMinipoolDetails, error)
Gets the details for a minipool using the efficient multicall contract
func GetNodeNativeMinipoolDetails ¶
func GetNodeNativeMinipoolDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, nodeAddress common.Address) ([]NativeMinipoolDetails, error)
Gets the minpool details for a node using the efficient multicall contract
type NativeNodeDetails ¶
type NativeNodeDetails struct {
Exists bool
RegistrationTime *big.Int
TimezoneLocation string
FeeDistributorInitialised bool
FeeDistributorAddress common.Address
RewardNetwork *big.Int
RplStake *big.Int
EffectiveRPLStake *big.Int
MinimumRPLStake *big.Int
MaximumRPLStake *big.Int
EthMatched *big.Int
EthMatchedLimit *big.Int
MinipoolCount *big.Int
BalanceETH *big.Int
BalanceRETH *big.Int
BalanceRPL *big.Int
BalanceOldRPL *big.Int
DepositCreditBalance *big.Int
DistributorBalanceUserETH *big.Int // Must call CalculateAverageFeeAndDistributorShares to get this
DistributorBalanceNodeETH *big.Int // Must call CalculateAverageFeeAndDistributorShares to get this
WithdrawalAddress common.Address
PendingWithdrawalAddress common.Address
SmoothingPoolRegistrationState bool
SmoothingPoolRegistrationChanged *big.Int
NodeAddress common.Address
AverageNodeFee *big.Int // Must call CalculateAverageFeeAndDistributorShares to get this
CollateralisationRatio *big.Int
DistributorBalance *big.Int
}
Complete details for a node
func GetAllNativeNodeDetails ¶
func GetAllNativeNodeDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts) ([]NativeNodeDetails, error)
Gets the details for all nodes using the efficient multicall contract
func GetNativeNodeDetails ¶
func GetNativeNodeDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, nodeAddress common.Address) (NativeNodeDetails, error)
Gets the details for a node using the efficient multicall contract
type NetworkContracts ¶
type NetworkContracts struct {
// Non-RP Utility
BalanceBatcher *multicall.BalanceBatcher
Multicaller *multicall.MultiCaller
ElBlockNumber *big.Int
// Network version
Version *version.Version
// Redstone
RocketDAONodeTrusted *rocketpool.Contract
RocketDAONodeTrustedSettingsMinipool *rocketpool.Contract
RocketDAOProtocolSettingsMinipool *rocketpool.Contract
RocketDAOProtocolSettingsNetwork *rocketpool.Contract
RocketDAOProtocolSettingsNode *rocketpool.Contract
RocketDepositPool *rocketpool.Contract
RocketMinipoolManager *rocketpool.Contract
RocketMinipoolQueue *rocketpool.Contract
RocketNetworkBalances *rocketpool.Contract
RocketNetworkFees *rocketpool.Contract
RocketNetworkPrices *rocketpool.Contract
RocketNodeDeposit *rocketpool.Contract
RocketNodeDistributorFactory *rocketpool.Contract
RocketNodeManager *rocketpool.Contract
RocketNodeStaking *rocketpool.Contract
RocketRewardsPool *rocketpool.Contract
RocketSmoothingPool *rocketpool.Contract
RocketStorage *rocketpool.Contract
RocketTokenRETH *rocketpool.Contract
RocketTokenRPL *rocketpool.Contract
RocketTokenRPLFixedSupply *rocketpool.Contract
// Atlas
RocketMinipoolBondReducer *rocketpool.Contract
// Houston
RocketDAOProtocolProposal *rocketpool.Contract
RocketDAOProtocolVerifier *rocketpool.Contract
}
Container for network contracts
func NewNetworkContracts ¶
func NewNetworkContracts(rp *rocketpool.RocketPool, multicallerAddress common.Address, balanceBatcherAddress common.Address, isHoustonDeployed bool, opts *bind.CallOpts) (*NetworkContracts, error)
Get a new network contracts container
type NetworkDetails ¶
type NetworkDetails struct {
// Redstone
RplPrice *big.Int
MinCollateralFraction *big.Int
MaxCollateralFraction *big.Int
IntervalDuration time.Duration
IntervalStart time.Time
NodeOperatorRewardsPercent *big.Int
TrustedNodeOperatorRewardsPercent *big.Int
ProtocolDaoRewardsPercent *big.Int
PendingRPLRewards *big.Int
RewardIndex uint64
ScrubPeriod time.Duration
SmoothingPoolAddress common.Address
DepositPoolBalance *big.Int
DepositPoolExcess *big.Int
QueueCapacity minipool.QueueCapacity
QueueLength *big.Int
RPLInflationIntervalRate *big.Int
RPLTotalSupply *big.Int
PricesBlock uint64
LatestReportablePricesBlock uint64
ETHUtilizationRate float64
StakingETHBalance *big.Int
RETHExchangeRate float64
TotalETHBalance *big.Int
RETHBalance *big.Int
TotalRETHSupply *big.Int
TotalRPLStake *big.Int
SmoothingPoolBalance *big.Int
NodeFee float64
BalancesBlock *big.Int
LatestReportableBalancesBlock uint64
SubmitBalancesEnabled bool
SubmitPricesEnabled bool
MinipoolLaunchTimeout *big.Int
// Atlas
PromotionScrubPeriod time.Duration
BondReductionWindowStart time.Duration
BondReductionWindowLength time.Duration
DepositPoolUserBalance *big.Int
// Houston
PricesSubmissionFrequency uint64
BalancesSubmissionFrequency uint64
}
func NewNetworkDetails ¶
func NewNetworkDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, isHoustonDeployed bool) (*NetworkDetails, error)
Create a snapshot of all of the network's details
type OracleDaoMemberDetails ¶ added in v1.7.0
type OracleDaoMemberDetails struct {
Address common.Address `json:"address"`
Exists bool `json:"exists"`
ID string `json:"id"`
Url string `json:"url"`
JoinedTime time.Time `json:"joinedTime"`
LastProposalTime time.Time `json:"lastProposalTime"`
RPLBondAmount *big.Int `json:"rplBondAmount"`
ReplacementAddress common.Address `json:"replacementAddress"`
IsChallenged bool `json:"isChallenged"`
// contains filtered or unexported fields
}
func GetAllOracleDaoMemberDetails ¶ added in v1.7.0
func GetAllOracleDaoMemberDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts) ([]OracleDaoMemberDetails, error)
Gets all Oracle DAO member details using the efficient multicall contract
func GetOracleDaoMemberDetails ¶ added in v1.7.0
func GetOracleDaoMemberDetails(rp *rocketpool.RocketPool, contracts *NetworkContracts, memberAddress common.Address) (OracleDaoMemberDetails, error)
Gets the details for an Oracle DAO member using the efficient multicall contract