rewards

package
v2.0.0-b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MerkleDistributorMainnet

type MerkleDistributorMainnet struct {
	// contains filtered or unexported fields
}

Binding for RocketMerkleDistributorMainnet

func NewMerkleDistributorMainnet

func NewMerkleDistributorMainnet(rp *rocketpool.RocketPool) (*MerkleDistributorMainnet, error)

Creates a new MerkleDistributorMainnet contract binding

func (*MerkleDistributorMainnet) Claim

func (c *MerkleDistributorMainnet) Claim(address common.Address, indices []*big.Int, amountRPL []*big.Int, amountETH []*big.Int, merkleProofs [][]common.Hash, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for claiming rewards

func (*MerkleDistributorMainnet) ClaimAndStake

func (c *MerkleDistributorMainnet) ClaimAndStake(address common.Address, indices []*big.Int, amountRPL []*big.Int, amountETH []*big.Int, merkleProofs [][]common.Hash, stakeAmount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for claiming and restaking rewards

func (*MerkleDistributorMainnet) GetMerkleRoot

func (c *MerkleDistributorMainnet) GetMerkleRoot(interval *big.Int, root_Out *common.Hash, mc *batch.MultiCaller)

Get the Merkle root for an interval

func (*MerkleDistributorMainnet) HasNodeClaimedRewards

func (c *MerkleDistributorMainnet) HasNodeClaimedRewards(index *big.Int, claimerAddress common.Address, claimed_Out *bool, mc *batch.MultiCaller)

Check if the given node has already claimed rewards for the given interval

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

type RewardsPool

type RewardsPool struct {
	// The index of the active rewards period
	RewardIndex *core.FormattedUint256Field[uint64]

	// The timestamp that the current rewards interval started
	IntervalStart *core.FormattedUint256Field[time.Time]

	// The number of seconds in a claim interval
	IntervalDuration *core.FormattedUint256Field[time.Duration]

	// The amount of RPL rewards that are currently pending distribution
	PendingRplRewards *core.SimpleField[*big.Int]

	// The amount of ETH rewards that are currently pending distribution
	PendingEthRewards *core.SimpleField[*big.Int]
	// contains filtered or unexported fields
}

Binding for RocketRewardsPool

func NewRewardsPool

func NewRewardsPool(rp *rocketpool.RocketPool) (*RewardsPool, error)

Creates a new RewardsPool contract binding

func (*RewardsPool) GetRewardsEvent

func (c *RewardsPool) GetRewardsEvent(rp *rocketpool.RocketPool, index uint64, rocketRewardsPoolAddresses []common.Address, opts *bind.CallOpts) (bool, RewardsEvent, error)

Get the event info for a rewards snapshot using the Atlas getter

func (*RewardsPool) GetTrustedNodeSubmitted

func (c *RewardsPool) GetTrustedNodeSubmitted(mc *batch.MultiCaller, hasSubmitted_Out *bool, nodeAddress common.Address, rewardsIndex uint64)

Check whether or not the given address has submitted for the given rewards interval

func (*RewardsPool) GetTrustedNodeSubmittedSpecificRewards

func (c *RewardsPool) GetTrustedNodeSubmittedSpecificRewards(mc *batch.MultiCaller, hasSubmitted_Out *bool, nodeAddress common.Address, submission RewardSubmission) error

Check whether or not the given address has submitted specific rewards info

func (*RewardsPool) SubmitRewardSnapshot

func (c *RewardsPool) SubmitRewardSnapshot(submission RewardSubmission, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for submitting a Merkle Tree-based snapshot for a rewards interval

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL