proposals

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: 14 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaoProposalManager

type DaoProposalManager struct {
	// The total number of DAO proposals
	// NOTE: Proposals are 1-indexed
	ProposalCount *core.FormattedUint256Field[uint64]
	// contains filtered or unexported fields
}

Binding for RocketDAOProposal

func NewDaoProposalManager

func NewDaoProposalManager(rp *rocketpool.RocketPool) (*DaoProposalManager, error)

Creates a new DaoProposalManager contract binding

func (*DaoProposalManager) CreateProposalFromID

func (c *DaoProposalManager) CreateProposalFromID(id uint64, opts *bind.CallOpts) (IProposal, error)

Create a proposal binding by ID

func (*DaoProposalManager) GetProposals

func (c *DaoProposalManager) GetProposals(proposalCount uint64, includeDetails bool, opts *bind.CallOpts) ([]*OracleDaoProposal, []*SecurityCouncilProposal, error)

Get all of the Oracle DAO and security council proposals NOTE: Proposals are 1-indexed

func (*DaoProposalManager) NewProposalFromDao

func (c *DaoProposalManager) NewProposalFromDao(id uint64, dao rocketpool.ContractName) (IProposal, error)

Create a proposal binding from an explicit DAO ID if you already know what it is

type IProposal

type IProposal interface {
	// Get all of the proposal's details
	QueryAllFields(mc *batch.MultiCaller)

	// Get the binding common across each type of proposal
	Common() *ProposalCommon
}

type OracleDaoProposal

type OracleDaoProposal struct {
	*ProposalCommon
	// contains filtered or unexported fields
}

Binding for Oracle DAO proposals

func GetProposalAsOracle

func GetProposalAsOracle(proposal IProposal) (*OracleDaoProposal, bool)

Get a proposal as an Oracle DAO propsal

func (*OracleDaoProposal) Cancel

Get info for cancelling a proposal

func (*OracleDaoProposal) Common

func (c *OracleDaoProposal) Common() *ProposalCommon

Get the common fields

func (*OracleDaoProposal) Execute

Get info for executing a proposal

func (*OracleDaoProposal) GetPayloadAsString

func (c *OracleDaoProposal) GetPayloadAsString() (string, error)

Get the proposal's payload as a string

func (*OracleDaoProposal) QueryAllFields

func (c *OracleDaoProposal) QueryAllFields(mc *batch.MultiCaller)

Get the basic details

func (*OracleDaoProposal) VoteOn

func (c *OracleDaoProposal) VoteOn(support bool, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for voting on a proposal

type ProposalCommon

type ProposalCommon struct {
	// The proposal's ID
	ID uint64

	// The address of the node that created the proposal
	ProposerAddress *core.SimpleField[common.Address]

	// The message provided with the proposal
	Message *core.SimpleField[string]

	// The time the proposal was created
	CreatedTime *core.FormattedUint256Field[time.Time]

	// The time the voting window on the proposal started
	StartTime *core.FormattedUint256Field[time.Time]

	// The time the voting window on the proposal ended
	EndTime *core.FormattedUint256Field[time.Time]

	// The time the proposal expires
	ExpiryTime *core.FormattedUint256Field[time.Time]

	// The number of votes required for the proposal to pass
	VotesRequired *core.FormattedUint256Field[float64]

	// The number of votes in favor of the proposal
	VotesFor *core.FormattedUint256Field[float64]

	// The number of votes against the proposal
	VotesAgainst *core.FormattedUint256Field[float64]

	// True if the proposal has been cancelled
	IsCancelled *core.SimpleField[bool]

	// True if the proposal has been executed
	IsExecuted *core.SimpleField[bool]

	// The proposal's payload
	Payload *core.SimpleField[[]byte]

	// The proposal's state
	State *core.FormattedUint8Field[types.ProposalState]
	// contains filtered or unexported fields
}

Binding for proposals

func (*ProposalCommon) GetMemberHasVoted

func (c *ProposalCommon) GetMemberHasVoted(mc *batch.MultiCaller, out *bool, address common.Address)

Check if a node has voted on the proposal

func (*ProposalCommon) GetMemberSupported

func (c *ProposalCommon) GetMemberSupported(mc *batch.MultiCaller, out *bool, address common.Address)

Check if a node has voted in favor of the proposal

type SecurityCouncilProposal

type SecurityCouncilProposal struct {
	*ProposalCommon
	// contains filtered or unexported fields
}

Binding for security council proposals

func GetProposalAsSecurity

func GetProposalAsSecurity(proposal IProposal) (*SecurityCouncilProposal, bool)

Get a proposal as a security council propsal

func (*SecurityCouncilProposal) Cancel

Get info for cancelling a proposal

func (*SecurityCouncilProposal) Common

Get the common fields

func (*SecurityCouncilProposal) Execute

Get info for executing a proposal

func (*SecurityCouncilProposal) GetPayloadAsString

func (c *SecurityCouncilProposal) GetPayloadAsString() (string, error)

Get the proposal's payload as a string

func (*SecurityCouncilProposal) QueryAllFields

func (c *SecurityCouncilProposal) QueryAllFields(mc *batch.MultiCaller)

Get the basic details

func (*SecurityCouncilProposal) VoteOn

func (c *SecurityCouncilProposal) VoteOn(support bool, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for voting on a proposal

Jump to

Keyboard shortcuts

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