Documentation ¶
Index ¶
- func Claim(rp *stader.PermissionlessNodeRegistryContractManager, address common.Address, ...) (common.Hash, error)
- func ClaimAndStake(rp *stader.PermissionlessNodeRegistryContractManager, address common.Address, ...) (common.Hash, error)
- func EstimateClaimAndStakeGas(rp *stader.PermissionlessNodeRegistryContractManager, address common.Address, ...) (stader.GasInfo, error)
- func EstimateClaimGas(rp *stader.PermissionlessNodeRegistryContractManager, address common.Address, ...) (stader.GasInfo, error)
- func EstimateSubmitRewardSnapshotGas(rp *stader.PermissionlessNodeRegistryContractManager, ...) (stader.GasInfo, error)
- func GetClaimIntervalTime(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (time.Duration, error)
- func GetClaimIntervalTimeStart(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (time.Time, error)
- func GetNodeOperatorRewardsPercent(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
- func GetPendingETHRewards(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
- func GetPendingRPLRewards(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
- func GetProtocolDaoRewardsPercent(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
- func GetRewardIndex(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
- func GetTrustedNodeOperatorRewardsPercent(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
- func IsClaimed(rp *stader.PermissionlessNodeRegistryContractManager, index *big.Int, ...) (bool, error)
- func MerkleRoots(rp *stader.PermissionlessNodeRegistryContractManager, interval *big.Int, ...) ([]byte, error)
- func SubmitRewardSnapshot(rp *stader.PermissionlessNodeRegistryContractManager, ...) (common.Hash, error)
- type RewardSubmission
- type RewardsEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Claim ¶
func Claim(rp *stader.PermissionlessNodeRegistryContractManager, address common.Address, indices []*big.Int, amountRPL []*big.Int, amountETH []*big.Int, merkleProofs [][]common.Hash, opts *bind.TransactOpts) (common.Hash, error)
Claim rewards
func ClaimAndStake ¶
func ClaimAndStake(rp *stader.PermissionlessNodeRegistryContractManager, address common.Address, indices []*big.Int, amountRPL []*big.Int, amountETH []*big.Int, merkleProofs [][]common.Hash, stakeAmount *big.Int, opts *bind.TransactOpts) (common.Hash, error)
Claim and restake rewards
func EstimateClaimAndStakeGas ¶
func EstimateClaimAndStakeGas(rp *stader.PermissionlessNodeRegistryContractManager, address common.Address, indices []*big.Int, amountRPL []*big.Int, amountETH []*big.Int, merkleProofs [][]common.Hash, stakeAmount *big.Int, opts *bind.TransactOpts) (stader.GasInfo, error)
Estimate claim and restake rewards gas
func EstimateClaimGas ¶
func EstimateClaimGas(rp *stader.PermissionlessNodeRegistryContractManager, address common.Address, indices []*big.Int, amountRPL []*big.Int, amountETH []*big.Int, merkleProofs [][]common.Hash, opts *bind.TransactOpts) (stader.GasInfo, error)
Estimate claim rewards gas
func EstimateSubmitRewardSnapshotGas ¶
func EstimateSubmitRewardSnapshotGas(rp *stader.PermissionlessNodeRegistryContractManager, submission RewardSubmission, opts *bind.TransactOpts) (stader.GasInfo, error)
Estimate the gas for submiting a Merkle Tree-based snapshot for a rewards interval
func GetClaimIntervalTime ¶
func GetClaimIntervalTime(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (time.Duration, error)
Get the number of seconds in a claim interval
func GetClaimIntervalTimeStart ¶
func GetClaimIntervalTimeStart(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (time.Time, error)
Get the timestamp that the current rewards interval started
func GetNodeOperatorRewardsPercent ¶
func GetNodeOperatorRewardsPercent(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
Get the percent of checkpoint rewards that goes to node operators
func GetPendingETHRewards ¶
func GetPendingETHRewards(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
Get the amount of ETH rewards that will be provided to node operators
func GetPendingRPLRewards ¶
func GetPendingRPLRewards(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
Get the amount of RPL rewards that will be provided to node operators
func GetProtocolDaoRewardsPercent ¶
func GetProtocolDaoRewardsPercent(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
Get the percent of checkpoint rewards that goes to the PDAO
func GetRewardIndex ¶
func GetRewardIndex(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
Get the index of the active rewards period
func GetTrustedNodeOperatorRewardsPercent ¶
func GetTrustedNodeOperatorRewardsPercent(rp *stader.PermissionlessNodeRegistryContractManager, opts *bind.CallOpts) (*big.Int, error)
Get the percent of checkpoint rewards that goes to ODAO members
func IsClaimed ¶
func IsClaimed(rp *stader.PermissionlessNodeRegistryContractManager, index *big.Int, claimerAddress common.Address, opts *bind.CallOpts) (bool, error)
Check if the given node has already claimed rewards for the given interval
func MerkleRoots ¶
func MerkleRoots(rp *stader.PermissionlessNodeRegistryContractManager, interval *big.Int, opts *bind.CallOpts) ([]byte, error)
Get the Merkle root for an interval
func SubmitRewardSnapshot ¶
func SubmitRewardSnapshot(rp *stader.PermissionlessNodeRegistryContractManager, submission RewardSubmission, opts *bind.TransactOpts) (common.Hash, error)
Submit a Merkle Tree-based snapshot for a rewards interval
Types ¶
type RewardSubmission ¶
type RewardSubmission struct { RewardIndex *big.Int `json:"rewardIndex"` ExecutionBlock *big.Int `json:"executionBlock"` ConsensusBlock *big.Int `json:"consensusBlock"` MerkleRoot [32]byte `json:"merkleRoot"` MerkleTreeCID string `json:"merkleTreeCID"` IntervalsPassed *big.Int `json:"intervalsPassed"` TreasuryRPL *big.Int `json:"treasuryRPL"` TrustedNodeRPL []*big.Int `json:"trustedNodeRPL"` NodeRPL []*big.Int `json:"nodeRPL"` NodeETH []*big.Int `json:"nodeETH"` UserETH *big.Int `json:"userETH"` }
Struct for submitting the rewards for a checkpoint
type RewardsEvent ¶
type RewardsEvent struct { Index *big.Int ExecutionBlock *big.Int ConsensusBlock *big.Int MerkleRoot common.Hash MerkleTreeCID string IntervalsPassed *big.Int TreasuryRPL *big.Int TrustedNodeRPL []*big.Int NodeRPL []*big.Int NodeETH []*big.Int UserETH *big.Int IntervalStartTime time.Time IntervalEndTime time.Time SubmissionTime time.Time }
Info for a rewards snapshot event
func GetRewardSnapshotEvent ¶
func GetRewardSnapshotEvent(rp *stader.PermissionlessNodeRegistryContractManager, index uint64, intervalSize *big.Int, startBlock *big.Int, endBlock *big.Int, opts *bind.CallOpts) (RewardsEvent, error)
Get the event info for a rewards snapshot
func GetRewardSnapshotEventWithUpgrades ¶
func GetRewardSnapshotEventWithUpgrades(rp *stader.PermissionlessNodeRegistryContractManager, index uint64, intervalSize *big.Int, startBlock *big.Int, endBlock *big.Int, rocketRewardsPoolAddresses []common.Address, opts *bind.CallOpts) (bool, RewardsEvent, error)
Get the event info for a rewards snapshot