Skip to main content

terra_sdk.core.gov.msgs

Gov module message types.

MsgSubmitProposal Objects


_2
@attr.s
_2
class MsgSubmitProposal(Msg)

Submit the attached proposal with an initial deposit.

Arguments:

  • content Content - type of proposal
  • initial_deposit Coins - initial deposit for proposal made by proposer
  • proposer AccAddress - proposal submitter

MsgDeposit Objects


_2
@attr.s
_2
class MsgDeposit(Msg)

Deposit funds for an active deposit-stage proposal.

Arguments:

  • proposal_id int - proposal number to deposit for
  • depositor AccAddress - account making deposit
  • amount Coins - amount to deposit

MsgVote Objects


_2
@attr.s
_2
class MsgVote(Msg)

Vote for an active voting-stage proposal.

Arguments:

  • proposal_id int - proposal to vote for
  • voter AccAddress - account casting vote
  • option VoteOption - vote option (must be one of: :data:MsgVote.ABSTAIN, :data:MsgVote.YES, :data:MsgVote.NO, or :data:MsgVote.NO_WITH_VETO),

EMPTY

Encodes an empty vote option.

option


_12
def _check_option(self, attribute, value):
_12
possible_options = [
_12
self.EMPTY,
_12
self.YES,
_12
self.ABSTAIN,
_12
self.NO,
_12
self.NO_WITH_VETO,
_12
]
_12
if value not in possible_options:
_12
raise TypeError(
_12
f"incorrect value for option: {value}, must be one of: {possible_options}";
_12
)