gov

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deposit

func Deposit(bin *utils.Binary, args []string) (int, error)

Deposit deposits the minimum needed deposit for a given governance proposal.

func DepositForProposal

func DepositForProposal(bin *utils.Binary, proposalID int, sender, deposit string) error

DepositForProposal deposits the given amount for the proposal with the given proposalID from the given account.

func GetMinDeposit

func GetMinDeposit(bin *utils.Binary) (sdk.Coins, error)

GetMinDeposit returns the minimum deposit necessary for a proposal from the governance parameters of the running chain.

func GetProposalIDFromInput

func GetProposalIDFromInput(bin *utils.Binary, args []string) (int, error)

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

func ParseMinDepositFromResponse(out string) (sdk.Coins, error)

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

func QueryLatestProposalID(bin *utils.Binary) (int, error)

QueryLatestProposalID queries the latest proposal ID.

func SubmitAllVotes

func SubmitAllVotes(bin *utils.Binary, args []string) (int, error)

SubmitAllVotes submits a vote for the given proposal ID using all testing accounts.

func SubmitAllVotesForProposal

func SubmitAllVotesForProposal(bin *utils.Binary, proposalID int) error

SubmitAllVotesForProposal submits a vote for the given proposal ID using all testing accounts.

func SubmitUpgradeProposal

func SubmitUpgradeProposal(bin *utils.Binary, targetVersion string, upgradeHeight int) (int, error)

SubmitUpgradeProposal submits a software upgrade proposal with the given target version and upgrade height.

func VoteForProposal

func VoteForProposal(bin *utils.Binary, proposalID int, sender string) (string, error)

VoteForProposal votes for the proposal with the given ID using the given account.

Types

This section is empty.

Jump to

Keyboard shortcuts

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