dao

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProposalDAONamesBatchSize = 50
	ProposalDetailsBatchSize  = 10
)

Settings

Variables

This section is empty.

Functions

func GetDAOProposalIDs

func GetDAOProposalIDs(ggp *gogopool.GoGoPool, daoName string, opts *bind.CallOpts) ([]uint64, error)

Get the IDs of proposals filtered by a DAO

func GetProposalCount

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

Get the proposal count

func GetProposalCreatedTime

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

func GetProposalDAO

func GetProposalDAO(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (string, error)

Proposal details

func GetProposalEndTime

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

func GetProposalExpiryTime

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

func GetProposalIsCancelled

func GetProposalIsCancelled(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (bool, error)

func GetProposalIsExecuted

func GetProposalIsExecuted(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (bool, error)

func GetProposalMemberSupported

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

Get whether a member has voted in support of a proposal

func GetProposalMemberVoted

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

Get whether a member has voted on a proposal

func GetProposalMessage

func GetProposalMessage(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (string, error)

func GetProposalPayload

func GetProposalPayload(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) ([]byte, error)

func GetProposalPayloadStr

func GetProposalPayloadStr(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (string, error)

func GetProposalPayloadString

func GetProposalPayloadString(ggp *gogopool.GoGoPool, daoName string, payload []byte) (string, error)

func GetProposalProposerAddress

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

func GetProposalStartTime

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

func GetProposalState

func GetProposalState(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (ggptypes.ProposalState, error)

func GetProposalVotesAgainst

func GetProposalVotesAgainst(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (float64, error)

func GetProposalVotesFor

func GetProposalVotesFor(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (float64, error)

func GetProposalVotesRequired

func GetProposalVotesRequired(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (float64, error)

Types

type ProposalDetails

type ProposalDetails struct {
	ID              uint64                 `json:"id"`
	DAO             string                 `json:"dao"`
	ProposerAddress common.Address         `json:"proposerAddress"`
	Message         string                 `json:"message"`
	CreatedTime     uint64                 `json:"createdTime"`
	StartTime       uint64                 `json:"startTime"`
	EndTime         uint64                 `json:"endTime"`
	ExpiryTime      uint64                 `json:"expiryTime"`
	VotesRequired   float64                `json:"votesRequired"`
	VotesFor        float64                `json:"votesFor"`
	VotesAgainst    float64                `json:"votesAgainst"`
	MemberVoted     bool                   `json:"memberVoted"`
	MemberSupported bool                   `json:"memberSupported"`
	IsCancelled     bool                   `json:"isCancelled"`
	IsExecuted      bool                   `json:"isExecuted"`
	Payload         []byte                 `json:"payload"`
	PayloadStr      string                 `json:"payloadStr"`
	State           ggptypes.ProposalState `json:"state"`
}

Proposal details

func GetDAOProposals

func GetDAOProposals(ggp *gogopool.GoGoPool, daoName string, opts *bind.CallOpts) ([]ProposalDetails, error)

Get DAO proposal details

func GetDAOProposalsWithMember

func GetDAOProposalsWithMember(ggp *gogopool.GoGoPool, daoName string, memberAddress common.Address, opts *bind.CallOpts) ([]ProposalDetails, error)

Get DAO proposal details with member data

func GetProposalDetails

func GetProposalDetails(ggp *gogopool.GoGoPool, proposalId uint64, opts *bind.CallOpts) (ProposalDetails, error)

Get a proposal's details

func GetProposalDetailsWithMember

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

Get a proposal's details with member data

func GetProposals

func GetProposals(ggp *gogopool.GoGoPool, opts *bind.CallOpts) ([]ProposalDetails, error)

Get all proposal details

func GetProposalsWithMember

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

Get all proposal details with member data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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