network

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstimateInitializeVotingGas

func EstimateInitializeVotingGas(rp *rocketpool.RocketPool, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of InitializeVoting

func EstimateInitializeVotingWithDelegateGas

func EstimateInitializeVotingWithDelegateGas(rp *rocketpool.RocketPool, delegateAddress common.Address, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of InitializeVotingWithDelegate

func EstimateSetVotingDelegateGas

func EstimateSetVotingDelegateGas(rp *rocketpool.RocketPool, newDelegate common.Address, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of SetVotingDelegate

func EstimateSubmitBalancesGas

func EstimateSubmitBalancesGas(rp *rocketpool.RocketPool, block uint64, slotTimestamp uint64, totalEth, stakingEth, rethSupply *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of SubmitBalances

func EstimateSubmitPenaltyGas

func EstimateSubmitPenaltyGas(rp *rocketpool.RocketPool, minipoolAddress common.Address, block *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of SubmitPenalty

func EstimateSubmitPricesGas

func EstimateSubmitPricesGas(rp *rocketpool.RocketPool, block uint64, slotTimestamp uint64, rplPrice *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of SubmitPrices

func GetBalancesBlock

func GetBalancesBlock(rp *rocketpool.RocketPool, opts *bind.CallOpts) (uint64, error)

Get the block number which network balances are current for

func GetBalancesBlockRaw

func GetBalancesBlockRaw(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the block number which network balances are current for

func GetBalancesSubmissions

func GetBalancesSubmissions(rp *rocketpool.RocketPool, nodeAddress common.Address, fromBlock uint64, intervalSize *big.Int, opts *bind.CallOpts) (*[]uint64, error)

Returns an array of block numbers for balances submissions the given trusted node has submitted since fromBlock

func GetCurrentVotingDelegate

func GetCurrentVotingDelegate(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (common.Address, error)

Get the address that the provided node has currently delegated voting power to

func GetETHUtilizationRate

func GetETHUtilizationRate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (float64, error)

Get the current network ETH utilization rate

func GetLatestBalancesSubmissions

func GetLatestBalancesSubmissions(rp *rocketpool.RocketPool, fromBlock uint64, intervalSize *big.Int, opts *bind.CallOpts) ([]common.Address, error)

Returns an array of members who submitted a balance since fromBlock

func GetLatestPricesSubmissions

func GetLatestPricesSubmissions(rp *rocketpool.RocketPool, fromBlock uint64, intervalSize *big.Int, opts *bind.CallOpts) ([]common.Address, error)

Returns an array of members who submitted prices since fromBlock

func GetNodeDemand

func GetNodeDemand(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the current network node demand in ETH

func GetNodeFee

func GetNodeFee(rp *rocketpool.RocketPool, opts *bind.CallOpts) (float64, error)

Get the current network node commission rate

func GetNodeFeeByDemand

func GetNodeFeeByDemand(rp *rocketpool.RocketPool, nodeDemand *big.Int, opts *bind.CallOpts) (float64, error)

Get the network node fee for a node demand value

func GetNodeInfoSnapshotFast

func GetNodeInfoSnapshotFast(rp *rocketpool.RocketPool, blockNumber uint32, multicallAddress common.Address, opts *bind.CallOpts) ([]types.NodeVotingInfo, error)

Gets the voting power and delegation info for every node at the specified block using multicall

func GetPricesBlock

func GetPricesBlock(rp *rocketpool.RocketPool, opts *bind.CallOpts) (uint64, error)

Get the block number which network prices are current for

func GetPricesSubmissions

func GetPricesSubmissions(rp *rocketpool.RocketPool, nodeAddress common.Address, fromBlock uint64, intervalSize *big.Int, opts *bind.CallOpts) (*[]uint64, error)

Returns an array of block numbers for prices submissions the given trusted node has submitted since fromBlock

func GetRPLPrice

func GetRPLPrice(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the current network RPL price in ETH

func GetRocketNetworkVotingVersion

func GetRocketNetworkVotingVersion(rp *rocketpool.RocketPool, opts *bind.CallOpts) (uint8, error)

Get the version of the Rocket Network Voting Contract

func GetStakingETHBalance

func GetStakingETHBalance(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the current network staking ETH balance

func GetTotalETHBalance

func GetTotalETHBalance(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the current network total ETH balance

func GetTotalRETHSupply

func GetTotalRETHSupply(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the current network total rETH supply

func GetVotingDelegate

func GetVotingDelegate(rp *rocketpool.RocketPool, address common.Address, blockNumber uint32, opts *bind.CallOpts) (common.Address, error)

Get the address that the provided node has delegated voting power to on the given block

func GetVotingInitialized

func GetVotingInitialized(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (bool, error)

Check whether or not on-chain voting has been initialized for the given node

func GetVotingNodeCount

func GetVotingNodeCount(rp *rocketpool.RocketPool, blockNumber uint32, opts *bind.CallOpts) (*big.Int, error)

Get the number of nodes that were present in the network at the provided block

func GetVotingPower

func GetVotingPower(rp *rocketpool.RocketPool, address common.Address, blockNumber uint32, opts *bind.CallOpts) (*big.Int, error)

Get the voting power of the given node on the provided block

func InitializeVoting

func InitializeVoting(rp *rocketpool.RocketPool, opts *bind.TransactOpts) (common.Hash, error)

Initialize on-chain voting for the node

func InitializeVotingWithDelegate

func InitializeVotingWithDelegate(rp *rocketpool.RocketPool, delegateAddress common.Address, opts *bind.TransactOpts) (common.Hash, error)

Initialize on-chain voting for the node and delegate voting power at the same transaction

func SetVotingDelegate

func SetVotingDelegate(rp *rocketpool.RocketPool, newDelegate common.Address, opts *bind.TransactOpts) (common.Hash, error)

Set the voting delegate for the node

func SubmitBalances

func SubmitBalances(rp *rocketpool.RocketPool, block uint64, slotTimestamp uint64, totalEth, stakingEth, rethSupply *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Submit network balances for an epoch

func SubmitPenalty

func SubmitPenalty(rp *rocketpool.RocketPool, minipoolAddress common.Address, block *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Submit penalty for given minipool

func SubmitPrices

func SubmitPrices(rp *rocketpool.RocketPool, block uint64, slotTimestamp uint64, rplPrice *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Submit network prices and total effective RPL stake for an epoch

Types

type BalancesUpdatedEvent

type BalancesUpdatedEvent struct {
	BlockNumber    *big.Int `json:"blockNumber"`
	SlotTimestamp  *big.Int `json:"slotTimestamp"`
	TotalEth       *big.Int `json:"totalEth"`
	StakingEth     *big.Int `json:"stakingEth"`
	RethSupply     *big.Int `json:"rethSupply"`
	BlockTimestamp *big.Int `json:"blockTimestamp"`
}

Info for a balances updated event

func GetBalancesUpdatedEvent

func GetBalancesUpdatedEvent(rp *rocketpool.RocketPool, blockNumber uint64, opts *bind.CallOpts) (bool, BalancesUpdatedEvent, error)

type PriceUpdatedEvent

type PriceUpdatedEvent struct {
	BlockNumber   *big.Int `json:"blockNumber"`
	SlotTimestamp *big.Int `json:"slotTimestamp"`
	RplPrice      *big.Int `json:"rplPrice"`
	Time          *big.Int `json:"time"`
}

Info for a price updated event

func GetPriceUpdatedEvent

func GetPriceUpdatedEvent(rp *rocketpool.RocketPool, blockNumber uint64, opts *bind.CallOpts) (bool, PriceUpdatedEvent, error)

Get the event info for a price update

Jump to

Keyboard shortcuts

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