Documentation
¶
Index ¶
- func Deposit(bin *utils.Binary, args []string) (int, error)
- func DepositForProposal(bin *utils.Binary, proposalID int, sender, deposit string) error
- func GetMinDeposit(bin *utils.Binary) (sdk.Coins, error)
- func GetProposalIDFromInput(bin *utils.Binary, args []string) (int, error)
- func GetProposalIDFromSubmitEvents(events []sdk.StringEvent) (int, error)
- func ParseMinDepositFromResponse(out string) (sdk.Coins, error)
- func QueryLatestProposalID(bin *utils.Binary) (int, error)
- func SubmitAllVotes(bin *utils.Binary, args []string) (int, error)
- func SubmitAllVotesForProposal(bin *utils.Binary, proposalID int) error
- func SubmitUpgradeProposal(bin *utils.Binary, targetVersion string, upgradeHeight int) (int, error)
- func VoteForProposal(bin *utils.Binary, proposalID int, sender string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DepositForProposal ¶
DepositForProposal deposits the given amount for the proposal with the given proposalID from the given account.
func GetMinDeposit ¶
GetMinDeposit returns the minimum deposit necessary for a proposal from the governance parameters of the running chain.
func GetProposalIDFromInput ¶
GetProposalIDFromInput gets the proposal ID from the command line arguments.
func GetProposalIDFromSubmitEvents ¶
func GetProposalIDFromSubmitEvents(events []sdk.StringEvent) (int, error)
GetProposalIDFromSubmitEvents looks for the proposal submission event in the given transaction events and returns the proposal id, if found.
func ParseMinDepositFromResponse ¶
ParseMinDepositFromResponse parses the minimum deposit from the given output of the governance parameters query.
FIXME: It wasn't possible to unmarshal the JSON output of the query because of a missing unit in the max_deposit_period parameter. This should rather be done using GRPC.
func QueryLatestProposalID ¶
QueryLatestProposalID queries the latest proposal ID.
func SubmitAllVotes ¶
SubmitAllVotes submits a vote for the given proposal ID using all testing accounts.
func SubmitAllVotesForProposal ¶
SubmitAllVotesForProposal submits a vote for the given proposal ID using all testing accounts.
func SubmitUpgradeProposal ¶
SubmitUpgradeProposal submits a software upgrade proposal with the given target version and upgrade height.
Types ¶
This section is empty.