Documentation ¶
Index ¶
- Constants
- func CalculateTotalEffectiveGGPStake(ggp *gogopool.GoGoPool, offset, limit, ggpPrice *big.Int, opts *bind.CallOpts) (*big.Int, error)
- func Deposit(ggp *gogopool.GoGoPool, minimumNodeFee float64, ...) (common.Hash, error)
- func EstimateDepositGas(ggp *gogopool.GoGoPool, minimumNodeFee float64, ...) (gogopool.GasInfo, error)
- func EstimateRegisterNodeGas(ggp *gogopool.GoGoPool, timezoneLocation string, opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func EstimateSetTimezoneLocationGas(ggp *gogopool.GoGoPool, timezoneLocation string, opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func EstimateStakeGas(ggp *gogopool.GoGoPool, ggpAmount *big.Int, opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func EstimateWithdrawGGPGas(ggp *gogopool.GoGoPool, ggpAmount *big.Int, opts *bind.TransactOpts) (gogopool.GasInfo, error)
- func GetBalancesSubmissions(ggp *gogopool.GoGoPool, nodeAddress common.Address, fromBlock uint64, ...) (*[]uint64, error)
- func GetDepositType(ggp *gogopool.GoGoPool, amount *big.Int, opts *bind.CallOpts) (ggptypes.MinipoolDeposit, error)
- func GetLatestBalancesSubmissions(ggp *gogopool.GoGoPool, fromBlock uint64, intervalSize *big.Int) ([]common.Address, error)
- func GetLatestPricesSubmissions(ggp *gogopool.GoGoPool, fromBlock uint64, intervalSize *big.Int) ([]common.Address, error)
- func GetNodeAddresses(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]common.Address, error)
- func GetNodeAt(ggp *gogopool.GoGoPool, index uint64, opts *bind.CallOpts) (common.Address, error)
- func GetNodeCount(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (uint64, error)
- func GetNodeEffectiveGGPStake(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error)
- func GetNodeExists(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (bool, error)
- func GetNodeGGPStake(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error)
- func GetNodeGGPStakedTime(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
- func GetNodeMaximumGGPStake(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error)
- func GetNodeMinimumGGPStake(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error)
- func GetNodeMinipoolLimit(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
- func GetNodeTimezoneLocation(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (string, error)
- func GetPricesSubmissions(ggp *gogopool.GoGoPool, nodeAddress common.Address, fromBlock uint64, ...) (*[]uint64, error)
- func GetTotalEffectiveGGPStake(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (*big.Int, error)
- func GetTotalGGPStake(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (*big.Int, error)
- func GetTrustedNodeLatestBalancesParticipation(ggp *gogopool.GoGoPool, intervalSize *big.Int, opts *bind.CallOpts) (map[common.Address]bool, error)
- func GetTrustedNodeLatestPricesParticipation(ggp *gogopool.GoGoPool, intervalSize *big.Int, opts *bind.CallOpts) (map[common.Address]bool, error)
- func RegisterNode(ggp *gogopool.GoGoPool, timezoneLocation string, opts *bind.TransactOpts) (common.Hash, error)
- func SetTimezoneLocation(ggp *gogopool.GoGoPool, timezoneLocation string, opts *bind.TransactOpts) (common.Hash, error)
- func StakeGGP(ggp *gogopool.GoGoPool, ggpAmount *big.Int, opts *bind.TransactOpts) (common.Hash, error)
- func WithdrawGGP(ggp *gogopool.GoGoPool, ggpAmount *big.Int, opts *bind.TransactOpts) (common.Hash, error)
- type NodeDetails
- type TimezoneCount
- type TrustedNodeParticipation
Constants ¶
const ( NodeAddressBatchSize = 50 NodeDetailsBatchSize = 20 )
Settings
Variables ¶
This section is empty.
Functions ¶
func CalculateTotalEffectiveGGPStake ¶
func CalculateTotalEffectiveGGPStake(ggp *gogopool.GoGoPool, offset, limit, ggpPrice *big.Int, opts *bind.CallOpts) (*big.Int, error)
Calculate total effective GGP stake
func Deposit ¶
func Deposit(ggp *gogopool.GoGoPool, minimumNodeFee float64, validatorPubkey ggptypes.ValidatorPubkey, validatorSignature ggptypes.ValidatorSignature, depositDataRoot common.Hash, salt *big.Int, expectedMinipoolAddress common.Address, opts *bind.TransactOpts) (common.Hash, error)
Make a node deposit
func EstimateDepositGas ¶
func EstimateDepositGas(ggp *gogopool.GoGoPool, minimumNodeFee float64, validatorPubkey ggptypes.ValidatorPubkey, validatorSignature ggptypes.ValidatorSignature, depositDataRoot common.Hash, salt *big.Int, expectedMinipoolAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of Deposit
func EstimateRegisterNodeGas ¶
func EstimateRegisterNodeGas(ggp *gogopool.GoGoPool, timezoneLocation string, opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of RegisterNode
func EstimateSetTimezoneLocationGas ¶
func EstimateSetTimezoneLocationGas(ggp *gogopool.GoGoPool, timezoneLocation string, opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of SetTimezoneLocation
func EstimateStakeGas ¶
func EstimateStakeGas(ggp *gogopool.GoGoPool, ggpAmount *big.Int, opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of Stake
func EstimateWithdrawGGPGas ¶
func EstimateWithdrawGGPGas(ggp *gogopool.GoGoPool, ggpAmount *big.Int, opts *bind.TransactOpts) (gogopool.GasInfo, error)
Estimate the gas of WithdrawGGP
func GetBalancesSubmissions ¶
func GetBalancesSubmissions(ggp *gogopool.GoGoPool, nodeAddress common.Address, fromBlock uint64, intervalSize *big.Int) (*[]uint64, error)
Returns an array of block numbers for balances submissions the given trusted node has submitted since fromBlock
func GetDepositType ¶
func GetDepositType(ggp *gogopool.GoGoPool, amount *big.Int, opts *bind.CallOpts) (ggptypes.MinipoolDeposit, error)
Get the type of a deposit based on the amount
func GetLatestBalancesSubmissions ¶
func GetLatestBalancesSubmissions(ggp *gogopool.GoGoPool, fromBlock uint64, intervalSize *big.Int) ([]common.Address, error)
Returns an array of members who submitted a balance since fromBlock
func GetLatestPricesSubmissions ¶
func GetLatestPricesSubmissions(ggp *gogopool.GoGoPool, fromBlock uint64, intervalSize *big.Int) ([]common.Address, error)
Returns an array of members who submitted prices since fromBlock
func GetNodeAddresses ¶
Get all node addresses
func GetNodeCount ¶
Get the number of nodes in the network
func GetNodeEffectiveGGPStake ¶
func GetNodeEffectiveGGPStake(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error)
Get a node's effective GGP stake
func GetNodeExists ¶
func GetNodeExists(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (bool, error)
Check whether a node exists
func GetNodeGGPStake ¶
func GetNodeGGPStake(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error)
Get a node's GGP stake
func GetNodeGGPStakedTime ¶
func GetNodeGGPStakedTime(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
Get the time a node last staked GGP
func GetNodeMaximumGGPStake ¶
func GetNodeMaximumGGPStake(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error)
Get a node's maximum GGP stake to collateralize their minipools
func GetNodeMinimumGGPStake ¶
func GetNodeMinimumGGPStake(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error)
Get a node's minimum GGP stake to collateralize their minipools
func GetNodeMinipoolLimit ¶
func GetNodeMinipoolLimit(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (uint64, error)
Get a node's minipool limit based on GGP stake
func GetNodeTimezoneLocation ¶
func GetNodeTimezoneLocation(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (string, error)
Get a node's timezone location
func GetPricesSubmissions ¶
func GetPricesSubmissions(ggp *gogopool.GoGoPool, nodeAddress common.Address, fromBlock uint64, intervalSize *big.Int) (*[]uint64, error)
Returns an array of block numbers for prices submissions the given trusted node has submitted since fromBlock
func GetTotalEffectiveGGPStake ¶
Get the effective GGP staked in the network
func GetTotalGGPStake ¶
Get the total GGP staked in the network
func GetTrustedNodeLatestBalancesParticipation ¶
func GetTrustedNodeLatestBalancesParticipation(ggp *gogopool.GoGoPool, intervalSize *big.Int, opts *bind.CallOpts) (map[common.Address]bool, error)
Returns a mapping of members and whether they have submitted balances this interval or not
func GetTrustedNodeLatestPricesParticipation ¶
func GetTrustedNodeLatestPricesParticipation(ggp *gogopool.GoGoPool, intervalSize *big.Int, opts *bind.CallOpts) (map[common.Address]bool, error)
Returns a mapping of members and whether they have submitted prices this interval or not
func RegisterNode ¶
func RegisterNode(ggp *gogopool.GoGoPool, timezoneLocation string, opts *bind.TransactOpts) (common.Hash, error)
Register a node
func SetTimezoneLocation ¶
func SetTimezoneLocation(ggp *gogopool.GoGoPool, timezoneLocation string, opts *bind.TransactOpts) (common.Hash, error)
Set a node's timezone location
Types ¶
type NodeDetails ¶
type NodeDetails struct { Address common.Address `json:"address"` Exists bool `json:"exists"` WithdrawalAddress common.Address `json:"withdrawalAddress"` PendingWithdrawalAddress common.Address `json:"pendingWithdrawalAddress"` TimezoneLocation string `json:"timezoneLocation"` }
Node details
func GetNodeDetails ¶
func GetNodeDetails(ggp *gogopool.GoGoPool, nodeAddress common.Address, opts *bind.CallOpts) (NodeDetails, error)
Get a node's details
type TimezoneCount ¶
Count of nodes belonging to a timezone
func GetNodeCountPerTimezone ¶
func GetNodeCountPerTimezone(ggp *gogopool.GoGoPool, offset, limit *big.Int, opts *bind.CallOpts) ([]TimezoneCount, error)
Get a breakdown of the number of nodes per timezone
type TrustedNodeParticipation ¶
type TrustedNodeParticipation struct { StartBlock uint64 UpdateFrequency uint64 UpdateCount uint64 Probability float64 ExpectedSubmissions float64 ActualSubmissions map[common.Address]float64 Participation map[common.Address][]bool }
The results of the trusted node participation calculation
func CalculateTrustedNodeBalancesParticipation ¶
func CalculateTrustedNodeBalancesParticipation(ggp *gogopool.GoGoPool, intervalSize *big.Int, opts *bind.CallOpts) (*TrustedNodeParticipation, error)
Calculates the participation rate of every trusted node on balance submission since the last block that member count changed
func CalculateTrustedNodePricesParticipation ¶
func CalculateTrustedNodePricesParticipation(ggp *gogopool.GoGoPool, intervalSize *big.Int, opts *bind.CallOpts) (*TrustedNodeParticipation, error)
Calculates the participation rate of every trusted node on price submission since the last block that member count changed