trustednode

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemberAddressBatchSize = 50
	MemberDetailsBatchSize = 20
)

Settings

Variables

This section is empty.

Functions

func BootstrapBool

func BootstrapBool(ggp *gogopool.GoGoPool, contractName, settingPath string, value bool, opts *bind.TransactOpts) (common.Hash, error)

Bootstrap a bool setting

func BootstrapMember

func BootstrapMember(ggp *gogopool.GoGoPool, id, url string, nodeAddress common.Address, opts *bind.TransactOpts) (common.Hash, error)

Bootstrap a DAO member

func BootstrapUint

func BootstrapUint(ggp *gogopool.GoGoPool, contractName, settingPath string, value *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Bootstrap a uint256 setting

func BootstrapUpgrade

func BootstrapUpgrade(ggp *gogopool.GoGoPool, upgradeType, contractName, contractAbi string, contractAddress common.Address, opts *bind.TransactOpts) (common.Hash, error)

Bootstrap a contract upgrade

func CancelProposal

func CancelProposal(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.TransactOpts) (common.Hash, error)

Cancel a submitted proposal

func DecideChallenge

func DecideChallenge(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.TransactOpts) (common.Hash, error)

Decide a challenge against a node

func EstimateBootstrapBoolGas

func EstimateBootstrapBoolGas(ggp *gogopool.GoGoPool, contractName, settingPath string, value bool, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of BootstrapBool

func EstimateBootstrapMemberGas

func EstimateBootstrapMemberGas(ggp *gogopool.GoGoPool, id, url string, nodeAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of BootstrapMember

func EstimateBootstrapUintGas

func EstimateBootstrapUintGas(ggp *gogopool.GoGoPool, contractName, settingPath string, value *big.Int, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of BootstrapUint

func EstimateBootstrapUpgradeGas

func EstimateBootstrapUpgradeGas(ggp *gogopool.GoGoPool, upgradeType, contractName, contractAbi string, contractAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of BootstrapUpgrade

func EstimateCancelProposalGas

func EstimateCancelProposalGas(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of CancelProposal

func EstimateDecideChallengeGas

func EstimateDecideChallengeGas(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of DecideChallenge

func EstimateExecuteProposalGas

func EstimateExecuteProposalGas(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of ExecuteProposal

func EstimateJoinGas

func EstimateJoinGas(ggp *gogopool.GoGoPool, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of Join

func EstimateLeaveGas

func EstimateLeaveGas(ggp *gogopool.GoGoPool, ggpBondRefundAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of Leave

func EstimateMakeChallengeGas

func EstimateMakeChallengeGas(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of MakeChallenge

func EstimateProposalGas

func EstimateProposalGas(ggp *gogopool.GoGoPool, message string, payload []byte, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of a proposal submission

func EstimateProposeInviteMemberGas

func EstimateProposeInviteMemberGas(ggp *gogopool.GoGoPool, message string, newMemberAddress common.Address, newMemberId, newMemberUrl string, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of ProposeInviteMember

func EstimateProposeKickMemberGas

func EstimateProposeKickMemberGas(ggp *gogopool.GoGoPool, message string, memberAddress common.Address, ggpFineAmount *big.Int, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of ProposeKickMember

func EstimateProposeMemberLeaveGas

func EstimateProposeMemberLeaveGas(ggp *gogopool.GoGoPool, message string, memberAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of ProposeMemberLeave

func EstimateProposeReplaceMemberGas

func EstimateProposeReplaceMemberGas(ggp *gogopool.GoGoPool, message string, memberAddress, newMemberAddress common.Address, newMemberId, newMemberUrl string, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of ProposeReplaceMember

func EstimateProposeSetBoolGas

func EstimateProposeSetBoolGas(ggp *gogopool.GoGoPool, message, contractName, settingPath string, value bool, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of ProposeSetBool

func EstimateProposeSetUintGas

func EstimateProposeSetUintGas(ggp *gogopool.GoGoPool, message, contractName, settingPath string, value *big.Int, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of ProposeSetUint

func EstimateProposeUpgradeContractGas

func EstimateProposeUpgradeContractGas(ggp *gogopool.GoGoPool, message, upgradeType, contractName, contractAbi string, contractAddress common.Address, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of ProposeUpgradeContract

func EstimateVoteOnProposalGas

func EstimateVoteOnProposalGas(ggp *gogopool.GoGoPool, proposalId uint64, support bool, opts *bind.TransactOpts) (gogopool.GasInfo, error)

Estimate the gas of VoteOnProposal

func ExecuteProposal

func ExecuteProposal(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.TransactOpts) (common.Hash, error)

Execute a submitted proposal

func GetMemberAddresses

func GetMemberAddresses(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]common.Address, error)

Get all member addresses

func GetMemberAt

func GetMemberAt(ggp *gogopool.GoGoPool, index uint64, opts *bind.CallOpts) (common.Address, error)

Get a member address by index

func GetMemberCount

func GetMemberCount(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (uint64, error)

Get the member count

func GetMemberExists

func GetMemberExists(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (bool, error)

Member details

func GetMemberGGPBondAmount

func GetMemberGGPBondAmount(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (*big.Int, error)

func GetMemberID

func GetMemberID(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (string, error)

func GetMemberInviteProposalExecutedTime

func GetMemberInviteProposalExecutedTime(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (uint64, error)

Get the time that a proposal for a member was executed at

func GetMemberIsChallenged

func GetMemberIsChallenged(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (bool, error)

Get whether a member has an active challenge against them

func GetMemberJoinedTime

func GetMemberJoinedTime(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (uint64, error)

func GetMemberLastProposalTime

func GetMemberLastProposalTime(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (uint64, error)

func GetMemberLeaveProposalExecutedTime

func GetMemberLeaveProposalExecutedTime(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (uint64, error)

func GetMemberProposalExecutedTime

func GetMemberProposalExecutedTime(ggp *gogopool.GoGoPool, proposalType string, memberAddress common.Address, opts *bind.CallOpts) (uint64, error)

func GetMemberReplaceProposalExecutedTime

func GetMemberReplaceProposalExecutedTime(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (uint64, error)

func GetMemberReplacementAddress

func GetMemberReplacementAddress(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (common.Address, error)

Get a member's replacement address if being replaced

func GetMemberUnbondedValidatorCount

func GetMemberUnbondedValidatorCount(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (uint64, error)

func GetMemberUrl

func GetMemberUrl(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (string, error)

func GetMinimumMemberCount

func GetMinimumMemberCount(ggp *gogopool.GoGoPool, opts *bind.CallOpts) (uint64, error)

Get the minimum member count

func Join

func Join(ggp *gogopool.GoGoPool, opts *bind.TransactOpts) (common.Hash, error)

Join the trusted node DAO Requires an executed invite proposal

func Leave

func Leave(ggp *gogopool.GoGoPool, ggpBondRefundAddress common.Address, opts *bind.TransactOpts) (common.Hash, error)

Leave the trusted node DAO Requires an executed leave proposal

func MakeChallenge

func MakeChallenge(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.TransactOpts) (common.Hash, error)

Make a challenge against a node

func ProposeInviteMember

func ProposeInviteMember(ggp *gogopool.GoGoPool, message string, newMemberAddress common.Address, newMemberId, newMemberUrl string, opts *bind.TransactOpts) (uint64, common.Hash, error)

Submit a proposal to invite a new member to the trusted node DAO

func ProposeKickMember

func ProposeKickMember(ggp *gogopool.GoGoPool, message string, memberAddress common.Address, ggpFineAmount *big.Int, opts *bind.TransactOpts) (uint64, common.Hash, error)

Submit a proposal to kick a member from the trusted node DAO

func ProposeMemberLeave

func ProposeMemberLeave(ggp *gogopool.GoGoPool, message string, memberAddress common.Address, opts *bind.TransactOpts) (uint64, common.Hash, error)

Submit a proposal for a member to leave the trusted node DAO

func ProposeReplaceMember

func ProposeReplaceMember(ggp *gogopool.GoGoPool, message string, memberAddress, newMemberAddress common.Address, newMemberId, newMemberUrl string, opts *bind.TransactOpts) (uint64, common.Hash, error)

Submit a proposal to replace a member in the trusted node DAO

func ProposeSetBool

func ProposeSetBool(ggp *gogopool.GoGoPool, message, contractName, settingPath string, value bool, opts *bind.TransactOpts) (uint64, common.Hash, error)

Submit a proposal to update a bool trusted node DAO setting

func ProposeSetUint

func ProposeSetUint(ggp *gogopool.GoGoPool, message, contractName, settingPath string, value *big.Int, opts *bind.TransactOpts) (uint64, common.Hash, error)

Submit a proposal to update a uint trusted node DAO setting

func ProposeUpgradeContract

func ProposeUpgradeContract(ggp *gogopool.GoGoPool, message, upgradeType, contractName, contractAbi string, contractAddress common.Address, opts *bind.TransactOpts) (uint64, common.Hash, error)

Submit a proposal to upgrade a contract

func SubmitProposal

func SubmitProposal(ggp *gogopool.GoGoPool, message string, payload []byte, opts *bind.TransactOpts) (uint64, common.Hash, error)

Submit a trusted node DAO proposal Returns the ID of the new proposal

func VoteOnProposal

func VoteOnProposal(ggp *gogopool.GoGoPool, proposalId uint64, support bool, opts *bind.TransactOpts) (common.Hash, error)

Vote on a submitted proposal

Types

type MemberDetails

type MemberDetails struct {
	Address                common.Address `json:"address"`
	Exists                 bool           `json:"exists"`
	ID                     string         `json:"id"`
	Url                    string         `json:"url"`
	JoinedTime             uint64         `json:"joinedTime"`
	LastProposalTime       uint64         `json:"lastProposalTime"`
	GGPBondAmount          *big.Int       `json:"ggpBondAmount"`
	UnbondedValidatorCount uint64         `json:"unbondedValidatorCount"`
}

Proposal details

func GetMemberDetails

func GetMemberDetails(ggp *gogopool.GoGoPool, memberAddress common.Address, opts *bind.CallOpts) (MemberDetails, error)

Get a member's details

func GetMembers

func GetMembers(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]MemberDetails, error)

Get all member details

Jump to

Keyboard shortcuts

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