Documentation ¶
Index ¶
- Constants
- Variables
- func ErrNameDoesNotExist(codespace sdk.CodespaceType) sdk.Error
- func RegisterCodec(cdc *codec.Codec)
- type Content
- type Issuers
- type MsgDeposit
- type MsgIssueToken
- type MsgSubmitProposal
- type MsgVote
- type QueryDepositParams
- type QueryProposalParams
- type QueryProposalsParams
- type QueryVoteParams
- type TextProposal
- type VoteOption
Constants ¶
View Source
const ( QueryParams = gov.QueryParams QueryProposals = gov.QueryProposals QueryProposal = gov.QueryProposal QueryDeposits = gov.QueryDeposits QueryDeposit = gov.QueryDeposit QueryVotes = gov.QueryVotes QueryVote = gov.QueryVote QueryTally = gov.QueryTally ParamDeposit = gov.ParamDeposit ParamVoting = gov.ParamVoting ParamTallying = gov.ParamTallying )
query endpoints supported by the governance Querier
View Source
const ( DefaultCodespace sdk.CodespaceType = ModuleName CodeNameDoesNotExist sdk.CodeType = 101 )
View Source
const ( // ModuleName is the name of the module ModuleName = "votum" // StoreKey is the store key string for votum StoreKey = ModuleName // RouterKey is the message route for votum RouterKey = ModuleName // QuerierRoute is the querier route for votum QuerierRoute = ModuleName // DefaultParamspace default name for parameter store DefaultParamspace = ModuleName )
View Source
const ( TypeMsgDeposit = "deposit" TypeMsgVote = "vote" TypeMsgSubmitProposal = "submit_proposal" )
Governance message types and routes
View Source
const (
ProposalTypeText string = "Text"
)
Proposal types
Variables ¶
View Source
var ( NewQueryProposalParams = gov.NewQueryProposalParams NewQueryDepositParams = gov.NewQueryDepositParams NewQueryVoteParams = gov.NewQueryVoteParams NewQueryProposalsParams = gov.NewQueryProposalsParams )
View Source
var ( ErrInvalidProposalContent = gov.ErrInvalidProposalContent ProposalTypeSoftwareUpgrade = gov.ProposalTypeSoftwareUpgrade ErrInvalidProposalType = gov.ErrInvalidProposalType IsValidProposalType = gov.IsValidProposalType ValidVoteOption = gov.ValidVoteOption ErrInvalidVote = gov.ErrInvalidVote )
View Source
var ModuleCdc = codec.New()
Functions ¶
func ErrNameDoesNotExist ¶
func ErrNameDoesNotExist(codespace sdk.CodespaceType) sdk.Error
func RegisterCodec ¶
RegisterCodec codecでencode/decodeするためにtypesを登録する
Types ¶
type Content ¶
func ContentFromProposalType ¶
ContentFromProposalType returns a Content object based on the proposal type.
func NewTextProposal ¶
type Issuers ¶
type Issuers struct { Owner sdk.AccAddress Tokens sdk.Coins }
Tokens is a struct that contains all the token issued as vote right
type MsgDeposit ¶
type MsgDeposit struct { ProposalID uint64 `json:"proposal_id" yaml:"proposal_id"` // ID of the proposal Depositor sdk.AccAddress `json:"depositor" yaml:"depositor"` // Address of the depositor Amount sdk.Coins `json:"amount" yaml:"amount"` // Coins to add to the proposal's deposit }
MsgDeposit
func NewMsgDeposit ¶
func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins) MsgDeposit
func (MsgDeposit) String ¶
func (msg MsgDeposit) String() string
func (MsgDeposit) Type ¶
func (msg MsgDeposit) Type() string
type MsgIssueToken ¶
type MsgIssueToken struct { Owner sdk.AccAddress Coins sdk.Coins }
MsgIssueToken IssueTokenに関するMsg interfaceの実装
func NewMsgIssueToken ¶
func NewMsgIssueToken(owner sdk.AccAddress, coins sdk.Coins) MsgIssueToken
NewMsgIssueToken 新しいMsgIssueTokenを生成
func (MsgIssueToken) GetSignBytes ¶
func (msg MsgIssueToken) GetSignBytes() []byte
GetSignBytes 署名するためのMsgデータを取得する
func (MsgIssueToken) GetSigners ¶
func (msg MsgIssueToken) GetSigners() []sdk.AccAddress
GetSigners 誰の署名が必要か定義する
func (MsgIssueToken) ValidateBasic ¶
func (msg MsgIssueToken) ValidateBasic() sdk.Error
ValidateBasic Msgsの中身のチェックをする
type MsgSubmitProposal ¶
type MsgSubmitProposal struct { Content Content `json:"content" yaml:"content"` InitialDeposit sdk.Coins `json:"initial_deposit" yaml:"initial_deposit"` // Initial deposit paid by sender. Must be strictly positive Proposer sdk.AccAddress `json:"proposer" yaml:"proposer"` // Address of the proposer }
MsgSubmitProposal
func NewMsgSubmitProposal ¶
func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress) MsgSubmitProposal
func (MsgSubmitProposal) GetSignBytes ¶
func (msg MsgSubmitProposal) GetSignBytes() []byte
Implements Msg.
func (MsgSubmitProposal) GetSigners ¶
func (msg MsgSubmitProposal) GetSigners() []sdk.AccAddress
Implements Msg.
func (MsgSubmitProposal) String ¶
func (msg MsgSubmitProposal) String() string
func (MsgSubmitProposal) Type ¶
func (msg MsgSubmitProposal) Type() string
func (MsgSubmitProposal) ValidateBasic ¶
func (msg MsgSubmitProposal) ValidateBasic() sdk.Error
Implements Msg.
type MsgVote ¶
type MsgVote struct { ProposalID uint64 `json:"proposal_id" yaml:"proposal_id"` // ID of the proposal Voter sdk.AccAddress `json:"voter" yaml:"voter"` // address of the voter Option VoteOption `json:"option" yaml:"option"` // option from OptionSet chosen by the voter }
MsgVote
func NewMsgVote ¶
func NewMsgVote(voter sdk.AccAddress, proposalID uint64, option VoteOption) MsgVote
type QueryDepositParams ¶
type QueryDepositParams = gov.QueryDepositParams
type QueryProposalParams ¶
type QueryProposalParams = gov.QueryProposalParams
type QueryProposalsParams ¶
type QueryProposalsParams = gov.QueryProposalsParams
type QueryVoteParams ¶
type QueryVoteParams = gov.QueryVoteParams
type TextProposal ¶
type TextProposal struct { Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` }
Text Proposal
func (TextProposal) GetDescription ¶
func (tp TextProposal) GetDescription() string
func (TextProposal) ProposalRoute ¶
func (tp TextProposal) ProposalRoute() string
func (TextProposal) ProposalType ¶
func (tp TextProposal) ProposalType() string
func (TextProposal) String ¶
func (tp TextProposal) String() string
func (TextProposal) ValidateBasic ¶
func (tp TextProposal) ValidateBasic() sdk.Error
Click to show internal directories.
Click to hide internal directories.