network

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: GPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstimateInitializeVotingGas added in v1.8.3

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

Estimate the gas of InitializeVoting

func EstimateInitializeVotingWithDelegateGas added in v1.8.3

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

Estimate the gas of InitializeVotingWithDelegate

func EstimateSetVotingDelegateGas added in v1.8.3

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 added in v1.3.0

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 added in v1.5.0

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

Get the block number which network balances are current for

func GetBalancesSubmissions added in v1.8.3

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 added in v1.8.3

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 added in v1.8.3

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 added in v1.8.3

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 added in v1.8.3

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 added in v1.8.3

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 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 added in v1.8.3

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 added in v1.8.3

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 added in v1.8.3

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 added in v1.8.3

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 added in v1.8.3

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

Initialize on-chain voting for the node

func InitializeVotingWithDelegate added in v1.8.3

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 added in v1.8.3

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 added in v1.3.0

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 added in v1.8.3

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 added in v1.8.3

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

type PriceUpdatedEvent added in v1.8.3

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 added in v1.8.3

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