Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package types contains dao module types.
Index ¶
- Constants
- Variables
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AccountKeeper
- type BankKeeper
- type CoinsExchangePair
- func (*CoinsExchangePair) Descriptor() ([]byte, []int)
- func (this *CoinsExchangePair) Equal(that interface{}) bool
- func (m *CoinsExchangePair) GetCoinAsk() types.Coin
- func (m *CoinsExchangePair) GetCoinBid() types.Coin
- func (m *CoinsExchangePair) Marshal() (dAtA []byte, err error)
- func (m *CoinsExchangePair) MarshalTo(dAtA []byte) (int, error)
- func (m *CoinsExchangePair) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CoinsExchangePair) ProtoMessage()
- func (m *CoinsExchangePair) Reset()
- func (m *CoinsExchangePair) Size() (n int)
- func (m *CoinsExchangePair) String() string
- func (m *CoinsExchangePair) Unmarshal(dAtA []byte) error
- func (m *CoinsExchangePair) ValidateBasic() error
- func (m *CoinsExchangePair) XXX_DiscardUnknown()
- func (m *CoinsExchangePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CoinsExchangePair) XXX_Merge(src proto.Message)
- func (m *CoinsExchangePair) XXX_Size() int
- func (m *CoinsExchangePair) XXX_Unmarshal(b []byte) error
- type DistributionKeeper
- type ExchangeWithTreasuryProposal
- func (*ExchangeWithTreasuryProposal) Descriptor() ([]byte, []int)
- func (m *ExchangeWithTreasuryProposal) GetDescription() string
- func (m *ExchangeWithTreasuryProposal) GetProposer() string
- func (m *ExchangeWithTreasuryProposal) GetTitle() string
- func (m *ExchangeWithTreasuryProposal) Marshal() (dAtA []byte, err error)
- func (m *ExchangeWithTreasuryProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *ExchangeWithTreasuryProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *ExchangeWithTreasuryProposal) ProposalRoute() string
- func (m *ExchangeWithTreasuryProposal) ProposalType() string
- func (*ExchangeWithTreasuryProposal) ProtoMessage()
- func (m *ExchangeWithTreasuryProposal) Reset()
- func (m *ExchangeWithTreasuryProposal) Size() (n int)
- func (m ExchangeWithTreasuryProposal) String() string
- func (m *ExchangeWithTreasuryProposal) Unmarshal(dAtA []byte) error
- func (m *ExchangeWithTreasuryProposal) ValidateBasic() error
- func (m *ExchangeWithTreasuryProposal) XXX_DiscardUnknown()
- func (m *ExchangeWithTreasuryProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExchangeWithTreasuryProposal) XXX_Merge(src proto.Message)
- func (m *ExchangeWithTreasuryProposal) XXX_Size() int
- func (m *ExchangeWithTreasuryProposal) XXX_Unmarshal(b []byte) error
- type FundAccountProposal
- func (*FundAccountProposal) Descriptor() ([]byte, []int)
- func (m *FundAccountProposal) GetDescription() string
- func (m *FundAccountProposal) GetTitle() string
- func (m *FundAccountProposal) Marshal() (dAtA []byte, err error)
- func (m *FundAccountProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *FundAccountProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *FundAccountProposal) ProposalRoute() string
- func (m *FundAccountProposal) ProposalType() string
- func (*FundAccountProposal) ProtoMessage()
- func (m *FundAccountProposal) Reset()
- func (m *FundAccountProposal) Size() (n int)
- func (m FundAccountProposal) String() string
- func (m *FundAccountProposal) Unmarshal(dAtA []byte) error
- func (m *FundAccountProposal) ValidateBasic() error
- func (m *FundAccountProposal) XXX_DiscardUnknown()
- func (m *FundAccountProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FundAccountProposal) XXX_Merge(src proto.Message)
- func (m *FundAccountProposal) XXX_Size() int
- func (m *FundAccountProposal) XXX_Unmarshal(b []byte) error
- type FundTreasuryProposal
- func (*FundTreasuryProposal) Descriptor() ([]byte, []int)
- func (m *FundTreasuryProposal) GetDescription() string
- func (m *FundTreasuryProposal) GetProposer() string
- func (m *FundTreasuryProposal) GetTitle() string
- func (m *FundTreasuryProposal) Marshal() (dAtA []byte, err error)
- func (m *FundTreasuryProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *FundTreasuryProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *FundTreasuryProposal) ProposalRoute() string
- func (m *FundTreasuryProposal) ProposalType() string
- func (*FundTreasuryProposal) ProtoMessage()
- func (m *FundTreasuryProposal) Reset()
- func (m *FundTreasuryProposal) Size() (n int)
- func (m FundTreasuryProposal) String() string
- func (m *FundTreasuryProposal) Unmarshal(dAtA []byte) error
- func (m *FundTreasuryProposal) ValidateBasic() error
- func (m *FundTreasuryProposal) XXX_DiscardUnknown()
- func (m *FundTreasuryProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FundTreasuryProposal) XXX_Merge(src proto.Message)
- func (m *FundTreasuryProposal) XXX_Size() int
- func (m *FundTreasuryProposal) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetTreasuryBalance() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type GovKeeper
- type ParamSubspace
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetWithdrawRewardPeriod() int64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (m Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryTreasuryRequest
- func (*QueryTreasuryRequest) Descriptor() ([]byte, []int)
- func (m *QueryTreasuryRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryTreasuryRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTreasuryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTreasuryRequest) ProtoMessage()
- func (m *QueryTreasuryRequest) Reset()
- func (m *QueryTreasuryRequest) Size() (n int)
- func (m *QueryTreasuryRequest) String() string
- func (m *QueryTreasuryRequest) Unmarshal(dAtA []byte) error
- func (m *QueryTreasuryRequest) XXX_DiscardUnknown()
- func (m *QueryTreasuryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTreasuryRequest) XXX_Merge(src proto.Message)
- func (m *QueryTreasuryRequest) XXX_Size() int
- func (m *QueryTreasuryRequest) XXX_Unmarshal(b []byte) error
- type QueryTreasuryResponse
- func (*QueryTreasuryResponse) Descriptor() ([]byte, []int)
- func (m *QueryTreasuryResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryTreasuryResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTreasuryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTreasuryResponse) ProtoMessage()
- func (m *QueryTreasuryResponse) Reset()
- func (m *QueryTreasuryResponse) Size() (n int)
- func (m *QueryTreasuryResponse) String() string
- func (m *QueryTreasuryResponse) Unmarshal(dAtA []byte) error
- func (m *QueryTreasuryResponse) XXX_DiscardUnknown()
- func (m *QueryTreasuryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTreasuryResponse) XXX_Merge(src proto.Message)
- func (m *QueryTreasuryResponse) XXX_Size() int
- func (m *QueryTreasuryResponse) XXX_Unmarshal(b []byte) error
- type StakingKeeper
- type UnimplementedQueryServer
Constants ¶
const ( // ModuleName defines the module name. ModuleName = "dao" // StoreKey defines the primary module store key. StoreKey = ModuleName // RouterKey is the message route for slashing. RouterKey = ModuleName // QuerierRoute defines the module's query routing key. QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key. MemStoreKey = "mem_dao" )
const ( // ProposalTypeFundTreasuryProposal defines the type for a FundTreasuryProposal. ProposalTypeFundTreasuryProposal = "FundTreasuryProposal" // ProposalTypeExchangeWithTreasuryProposal defines the type for a ExchangeWithTreasuryProposal. ProposalTypeExchangeWithTreasuryProposal = "ExchangeWithTreasuryProposal" // ProposalTypeFundAccountProposal defines the type for a FundAccountProposal. ProposalTypeFundAccountProposal = "FundAccountProposal" )
Variables ¶
var ( // Amino holds the LegacyAmino codec. Amino = codec.NewLegacyAmino() // nolint:gochecknoglobals // cosmos sdk style // ModuleCdc holds the default proto codec. ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) // nolint:gochecknoglobals // cosmos sdk style )
var ( ErrInvalidLengthDao = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowDao = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupDao = fmt.Errorf("proto: unexpected end of group") )
var ( // ErrInsufficientBalance - the balance is insufficient for the operation. ErrInsufficientBalance = sdkerrors.Register(ModuleName, 1, "insufficient balance") // ErrInvalidCoinsPair - the coins pair is invalid. ErrInvalidCoinsPair = sdkerrors.Register(ModuleName, 2, "invalid coins pair") // nolint:gomnd // error number // ErrProhibitedCoinsAmount - the requested amount is prohibited. ErrProhibitedCoinsAmount = sdkerrors.Register(ModuleName, 3, "prohibited coins amount") // nolint:gomnd // error number )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( // DefaultWithdrawRewardPeriod is default value for the DefaultWithdrawRewardPeriod param. DefaultWithdrawRewardPeriod = int64(51840) //nolint:gomnd,gochecknoglobals // cosmos-sdk style // DefaultPoolRate is default value for the DefaultPoolRate param. DefaultPoolRate = sdk.NewDec(1).Quo(sdk.NewDec(20)) //nolint:gomnd,gochecknoglobals // cosmos-sdk style // DefaultMaxProposalRate is default value for the DefaultMaxProposalRate param. DefaultMaxProposalRate = sdk.NewDec(1).Quo(sdk.NewDec(20)) //nolint:gomnd,gochecknoglobals // cosmos-sdk style // DefaultMaxValCommission is default value for the DefaultMaxValCommission param. DefaultMaxValCommission = sdk.NewDec(1).Quo(sdk.NewDec(10)) //nolint:gomnd,gochecknoglobals // cosmos-sdk style )
var ( // KeyWithdrawRewardPeriod is byte key for KeyWithdrawRewardPeriod param. KeyWithdrawRewardPeriod = []byte("WithdrawRewardPeriod") //nolint:gochecknoglobals // cosmos-sdk style // KeyPoolRate is byte key for KeyPoolRate param. KeyPoolRate = []byte("PoolRate") //nolint:gochecknoglobals // cosmos-sdk style // KeyMaxProposalRate is byte key for KeyMaxProposalRate param. KeyMaxProposalRate = []byte("MaxProposalRate") //nolint:gochecknoglobals // cosmos-sdk style // KeyMaxValCommission is byte key for KeyMaxValCommission param. KeyMaxValCommission = []byte("MaxValCommission") //nolint:gochecknoglobals // cosmos-sdk style )
Parameter store keys.
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module.
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
RegisterCodec registers the legacy amino codec.
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces registers the cdctypes interface.
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetModuleAddress(string) sdk.AccAddress
}
AccountKeeper defines the contract required for account APIs.
type BankKeeper ¶
type BankKeeper interface {
GetAllBalances(sdk.Context, sdk.AccAddress) sdk.Coins
SendCoinsFromAccountToModule(sdk.Context, sdk.AccAddress, string, sdk.Coins) error
SendCoinsFromModuleToAccount(sdk.Context, string, sdk.AccAddress, sdk.Coins) error
SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error
MintCoins(sdk.Context, string, sdk.Coins) error
}
BankKeeper defines the contract needed to be fulfilled for banking and supply dependencies.
type CoinsExchangePair ¶
type CoinsExchangePair struct {
CoinAsk types.Coin `` /* 141-byte string literal not displayed */
CoinBid types.Coin `` /* 141-byte string literal not displayed */
}
CoinsExchangePair is an ask/bid coins pair to exchange.
func (*CoinsExchangePair) Descriptor ¶
func (*CoinsExchangePair) Descriptor() ([]byte, []int)
func (*CoinsExchangePair) Equal ¶
func (this *CoinsExchangePair) Equal(that interface{}) bool
func (*CoinsExchangePair) GetCoinAsk ¶
func (m *CoinsExchangePair) GetCoinAsk() types.Coin
func (*CoinsExchangePair) GetCoinBid ¶
func (m *CoinsExchangePair) GetCoinBid() types.Coin
func (*CoinsExchangePair) Marshal ¶
func (m *CoinsExchangePair) Marshal() (dAtA []byte, err error)
func (*CoinsExchangePair) MarshalTo ¶
func (m *CoinsExchangePair) MarshalTo(dAtA []byte) (int, error)
func (*CoinsExchangePair) MarshalToSizedBuffer ¶
func (m *CoinsExchangePair) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CoinsExchangePair) ProtoMessage ¶
func (*CoinsExchangePair) ProtoMessage()
func (*CoinsExchangePair) Reset ¶
func (m *CoinsExchangePair) Reset()
func (*CoinsExchangePair) Size ¶
func (m *CoinsExchangePair) Size() (n int)
func (*CoinsExchangePair) String ¶
func (m *CoinsExchangePair) String() string
func (*CoinsExchangePair) Unmarshal ¶
func (m *CoinsExchangePair) Unmarshal(dAtA []byte) error
func (*CoinsExchangePair) ValidateBasic ¶
func (m *CoinsExchangePair) ValidateBasic() error
ValidateBasic validates CoinsExchangePair basic options.
func (*CoinsExchangePair) XXX_DiscardUnknown ¶
func (m *CoinsExchangePair) XXX_DiscardUnknown()
func (*CoinsExchangePair) XXX_Marshal ¶
func (m *CoinsExchangePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CoinsExchangePair) XXX_Merge ¶
func (m *CoinsExchangePair) XXX_Merge(src proto.Message)
func (*CoinsExchangePair) XXX_Size ¶
func (m *CoinsExchangePair) XXX_Size() int
func (*CoinsExchangePair) XXX_Unmarshal ¶
func (m *CoinsExchangePair) XXX_Unmarshal(b []byte) error
type DistributionKeeper ¶
type DistributionKeeper interface {
HasDelegatorStartingInfo(sdk.Context, sdk.ValAddress, sdk.AccAddress) bool
WithdrawDelegationRewards(sdk.Context, sdk.AccAddress, sdk.ValAddress) (sdk.Coins, error)
}
DistributionKeeper expected distribution keeper.
type ExchangeWithTreasuryProposal ¶
type ExchangeWithTreasuryProposal struct {
Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
CoinsPairs []CoinsExchangePair `protobuf:"bytes,4,rep,name=coins_pairs,json=coinsPairs,proto3" json:"coins_pairs" yaml:"coins_pairs"`
}
ExchangeWithTreasuryProposal details a dao exchange with treasury proposal.
func NewExchangeWithTreasuryProposal ¶
func NewExchangeWithTreasuryProposal(sender sdk.AccAddress, title, description string, coinsPairs []CoinsExchangePair) *ExchangeWithTreasuryProposal
NewExchangeWithTreasuryProposal creates a new fund treasury proposal.
func (*ExchangeWithTreasuryProposal) Descriptor ¶
func (*ExchangeWithTreasuryProposal) Descriptor() ([]byte, []int)
func (*ExchangeWithTreasuryProposal) GetDescription ¶
func (m *ExchangeWithTreasuryProposal) GetDescription() string
GetDescription returns the description of a fund treasury proposal.
func (*ExchangeWithTreasuryProposal) GetProposer ¶
func (m *ExchangeWithTreasuryProposal) GetProposer() string
GetProposer returns the proposer from the proposal struct.
func (*ExchangeWithTreasuryProposal) GetTitle ¶
func (m *ExchangeWithTreasuryProposal) GetTitle() string
GetTitle returns the title of a fund treasury proposal.
func (*ExchangeWithTreasuryProposal) Marshal ¶
func (m *ExchangeWithTreasuryProposal) Marshal() (dAtA []byte, err error)
func (*ExchangeWithTreasuryProposal) MarshalTo ¶
func (m *ExchangeWithTreasuryProposal) MarshalTo(dAtA []byte) (int, error)
func (*ExchangeWithTreasuryProposal) MarshalToSizedBuffer ¶
func (m *ExchangeWithTreasuryProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ExchangeWithTreasuryProposal) ProposalRoute ¶
func (m *ExchangeWithTreasuryProposal) ProposalRoute() string
ProposalRoute returns the routing key of a fund treasury proposal.
func (*ExchangeWithTreasuryProposal) ProposalType ¶
func (m *ExchangeWithTreasuryProposal) ProposalType() string
ProposalType returns the type of the fund treasury proposal.
func (*ExchangeWithTreasuryProposal) ProtoMessage ¶
func (*ExchangeWithTreasuryProposal) ProtoMessage()
func (*ExchangeWithTreasuryProposal) Reset ¶
func (m *ExchangeWithTreasuryProposal) Reset()
func (*ExchangeWithTreasuryProposal) Size ¶
func (m *ExchangeWithTreasuryProposal) Size() (n int)
func (ExchangeWithTreasuryProposal) String ¶
func (m ExchangeWithTreasuryProposal) String() string
String implements the Stringer interface.
func (*ExchangeWithTreasuryProposal) Unmarshal ¶
func (m *ExchangeWithTreasuryProposal) Unmarshal(dAtA []byte) error
func (*ExchangeWithTreasuryProposal) ValidateBasic ¶
func (m *ExchangeWithTreasuryProposal) ValidateBasic() error
ValidateBasic runs basic stateless validity checks.
func (*ExchangeWithTreasuryProposal) XXX_DiscardUnknown ¶
func (m *ExchangeWithTreasuryProposal) XXX_DiscardUnknown()
func (*ExchangeWithTreasuryProposal) XXX_Marshal ¶
func (m *ExchangeWithTreasuryProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExchangeWithTreasuryProposal) XXX_Merge ¶
func (m *ExchangeWithTreasuryProposal) XXX_Merge(src proto.Message)
func (*ExchangeWithTreasuryProposal) XXX_Size ¶
func (m *ExchangeWithTreasuryProposal) XXX_Size() int
func (*ExchangeWithTreasuryProposal) XXX_Unmarshal ¶
func (m *ExchangeWithTreasuryProposal) XXX_Unmarshal(b []byte) error
type FundAccountProposal ¶
type FundAccountProposal struct {
Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"`
}
FundAccountProposal details a dao fund account proposal.
func NewFundAccountProposal ¶
func NewFundAccountProposal(recipient sdk.AccAddress, title, description string, amount sdk.Coins) *FundAccountProposal
NewFundAccountProposal creates a new fund account proposal.
func (*FundAccountProposal) Descriptor ¶
func (*FundAccountProposal) Descriptor() ([]byte, []int)
func (*FundAccountProposal) GetDescription ¶
func (m *FundAccountProposal) GetDescription() string
GetDescription returns the description of a fund account proposal.
func (*FundAccountProposal) GetTitle ¶
func (m *FundAccountProposal) GetTitle() string
GetTitle returns the title of a fund account proposal.
func (*FundAccountProposal) Marshal ¶
func (m *FundAccountProposal) Marshal() (dAtA []byte, err error)
func (*FundAccountProposal) MarshalTo ¶
func (m *FundAccountProposal) MarshalTo(dAtA []byte) (int, error)
func (*FundAccountProposal) MarshalToSizedBuffer ¶
func (m *FundAccountProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FundAccountProposal) ProposalRoute ¶
func (m *FundAccountProposal) ProposalRoute() string
ProposalRoute returns the routing key of a fund account proposal.
func (*FundAccountProposal) ProposalType ¶
func (m *FundAccountProposal) ProposalType() string
ProposalType returns the type of the fund account proposal.
func (*FundAccountProposal) ProtoMessage ¶
func (*FundAccountProposal) ProtoMessage()
func (*FundAccountProposal) Reset ¶
func (m *FundAccountProposal) Reset()
func (*FundAccountProposal) Size ¶
func (m *FundAccountProposal) Size() (n int)
func (FundAccountProposal) String ¶
func (m FundAccountProposal) String() string
String implements the Stringer interface.
func (*FundAccountProposal) Unmarshal ¶
func (m *FundAccountProposal) Unmarshal(dAtA []byte) error
func (*FundAccountProposal) ValidateBasic ¶
func (m *FundAccountProposal) ValidateBasic() error
ValidateBasic runs basic stateless validity checks.
func (*FundAccountProposal) XXX_DiscardUnknown ¶
func (m *FundAccountProposal) XXX_DiscardUnknown()
func (*FundAccountProposal) XXX_Marshal ¶
func (m *FundAccountProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FundAccountProposal) XXX_Merge ¶
func (m *FundAccountProposal) XXX_Merge(src proto.Message)
func (*FundAccountProposal) XXX_Size ¶
func (m *FundAccountProposal) XXX_Size() int
func (*FundAccountProposal) XXX_Unmarshal ¶
func (m *FundAccountProposal) XXX_Unmarshal(b []byte) error
type FundTreasuryProposal ¶
type FundTreasuryProposal struct {
Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"`
}
FundTreasuryProposal details a dao fund treasury proposal.
func NewFundTreasuryProposal ¶
func NewFundTreasuryProposal(sender sdk.AccAddress, title, description string, amount sdk.Coins) *FundTreasuryProposal
NewFundTreasuryProposal creates a new fund treasury proposal.
func (*FundTreasuryProposal) Descriptor ¶
func (*FundTreasuryProposal) Descriptor() ([]byte, []int)
func (*FundTreasuryProposal) GetDescription ¶
func (m *FundTreasuryProposal) GetDescription() string
GetDescription returns the description of a fund treasury proposal.
func (*FundTreasuryProposal) GetProposer ¶
func (m *FundTreasuryProposal) GetProposer() string
GetProposer returns the proposer from the proposal struct.
func (*FundTreasuryProposal) GetTitle ¶
func (m *FundTreasuryProposal) GetTitle() string
GetTitle returns the title of a fund treasury proposal.
func (*FundTreasuryProposal) Marshal ¶
func (m *FundTreasuryProposal) Marshal() (dAtA []byte, err error)
func (*FundTreasuryProposal) MarshalTo ¶
func (m *FundTreasuryProposal) MarshalTo(dAtA []byte) (int, error)
func (*FundTreasuryProposal) MarshalToSizedBuffer ¶
func (m *FundTreasuryProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FundTreasuryProposal) ProposalRoute ¶
func (m *FundTreasuryProposal) ProposalRoute() string
ProposalRoute returns the routing key of a fund treasury proposal.
func (*FundTreasuryProposal) ProposalType ¶
func (m *FundTreasuryProposal) ProposalType() string
ProposalType returns the type of the fund treasury proposal.
func (*FundTreasuryProposal) ProtoMessage ¶
func (*FundTreasuryProposal) ProtoMessage()
func (*FundTreasuryProposal) Reset ¶
func (m *FundTreasuryProposal) Reset()
func (*FundTreasuryProposal) Size ¶
func (m *FundTreasuryProposal) Size() (n int)
func (FundTreasuryProposal) String ¶
func (m FundTreasuryProposal) String() string
String implements the Stringer interface.
func (*FundTreasuryProposal) Unmarshal ¶
func (m *FundTreasuryProposal) Unmarshal(dAtA []byte) error
func (*FundTreasuryProposal) ValidateBasic ¶
func (m *FundTreasuryProposal) ValidateBasic() error
ValidateBasic runs basic stateless validity checks.
func (*FundTreasuryProposal) XXX_DiscardUnknown ¶
func (m *FundTreasuryProposal) XXX_DiscardUnknown()
func (*FundTreasuryProposal) XXX_Marshal ¶
func (m *FundTreasuryProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FundTreasuryProposal) XXX_Merge ¶
func (m *FundTreasuryProposal) XXX_Merge(src proto.Message)
func (*FundTreasuryProposal) XXX_Size ¶
func (m *FundTreasuryProposal) XXX_Size() int
func (*FundTreasuryProposal) XXX_Unmarshal ¶
func (m *FundTreasuryProposal) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct {
// the dao module managed params
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
// the list of dao module coins
TreasuryBalance github_com_cosmos_cosmos_sdk_types.Coins `` /* 174-byte string literal not displayed */
}
GenesisState defines the dao module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default dao genesis state.
func NewGenesisState ¶
func NewGenesisState(params Params, treasuryBalance sdk.Coins) *GenesisState
NewGenesisState creates a new GenesisState object.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetTreasuryBalance ¶
func (m *GenesisState) GetTreasuryBalance() github_com_cosmos_cosmos_sdk_types.Coins
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶
func (m GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type GovKeeper ¶
type GovKeeper interface {
AddVote(sdk.Context, uint64, sdk.AccAddress, govtypes.WeightedVoteOptions) error
GetVote(sdk.Context, uint64, sdk.AccAddress) (govtypes.Vote, bool)
IterateProposals(sdk.Context, func(proposal govtypes.Proposal) bool)
}
GovKeeper expected gov keeper.
type ParamSubspace ¶
type ParamSubspace interface {
HasKeyTable() bool
WithKeyTable(paramtypes.KeyTable) paramtypes.Subspace
Get(sdk.Context, []byte, interface{})
GetParamSet(sdk.Context, paramtypes.ParamSet)
SetParamSet(sdk.Context, paramtypes.ParamSet)
}
ParamSubspace defines the expected Subspace interface.
type Params ¶
type Params struct {
// the period of blocks to withdraw the dao staking reward
WithdrawRewardPeriod int64 `` /* 154-byte string literal not displayed */
// the rate of total dao's staking coins to keep unstaked
PoolRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 142-byte string literal not displayed */
// the max rage of total dao's staking coins to be allowed in proposals
MaxProposalRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 173-byte string literal not displayed */
// the max validator's commission to be staked by the dao
MaxValCommission github_com_cosmos_cosmos_sdk_types.Dec `` /* 177-byte string literal not displayed */
}
Params defines the parameters for the module.
func NewParams ¶
func NewParams( withdrawRewardPeriod int64, poolRate, maxProposalRate, maxValCommission sdk.Dec, ) Params
NewParams creates a new Params instance.
func (*Params) Descriptor ¶
func (*Params) GetWithdrawRewardPeriod ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (m *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet.
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface {
// Parameters queries the parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// Treasury queries the dao treasury.
Treasury(ctx context.Context, in *QueryTreasuryRequest, opts ...grpc.CallOption) (*QueryTreasuryResponse, error)
}
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶
type QueryParamsRequest struct{}
QueryParamsRequest is request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
// params holds all the parameters of this module.
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse is response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface {
// Parameters queries the parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// Treasury queries the dao treasury.
Treasury(context.Context, *QueryTreasuryRequest) (*QueryTreasuryResponse, error)
}
QueryServer is the server API for Query service.
type QueryTreasuryRequest ¶
type QueryTreasuryRequest struct{}
QueryTreasuryRequest is request type for the Query/Treasury RPC method.
func (*QueryTreasuryRequest) Descriptor ¶
func (*QueryTreasuryRequest) Descriptor() ([]byte, []int)
func (*QueryTreasuryRequest) Marshal ¶
func (m *QueryTreasuryRequest) Marshal() (dAtA []byte, err error)
func (*QueryTreasuryRequest) MarshalTo ¶
func (m *QueryTreasuryRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryTreasuryRequest) MarshalToSizedBuffer ¶
func (m *QueryTreasuryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTreasuryRequest) ProtoMessage ¶
func (*QueryTreasuryRequest) ProtoMessage()
func (*QueryTreasuryRequest) Reset ¶
func (m *QueryTreasuryRequest) Reset()
func (*QueryTreasuryRequest) Size ¶
func (m *QueryTreasuryRequest) Size() (n int)
func (*QueryTreasuryRequest) String ¶
func (m *QueryTreasuryRequest) String() string
func (*QueryTreasuryRequest) Unmarshal ¶
func (m *QueryTreasuryRequest) Unmarshal(dAtA []byte) error
func (*QueryTreasuryRequest) XXX_DiscardUnknown ¶
func (m *QueryTreasuryRequest) XXX_DiscardUnknown()
func (*QueryTreasuryRequest) XXX_Marshal ¶
func (m *QueryTreasuryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTreasuryRequest) XXX_Merge ¶
func (m *QueryTreasuryRequest) XXX_Merge(src proto.Message)
func (*QueryTreasuryRequest) XXX_Size ¶
func (m *QueryTreasuryRequest) XXX_Size() int
func (*QueryTreasuryRequest) XXX_Unmarshal ¶
func (m *QueryTreasuryRequest) XXX_Unmarshal(b []byte) error
type QueryTreasuryResponse ¶
type QueryTreasuryResponse struct {
TreasuryBalance github_com_cosmos_cosmos_sdk_types.Coins `` /* 174-byte string literal not displayed */
}
QueryTreasuryResponse is response type for the Query/Treasury RPC method.
func (*QueryTreasuryResponse) Descriptor ¶
func (*QueryTreasuryResponse) Descriptor() ([]byte, []int)
func (*QueryTreasuryResponse) Marshal ¶
func (m *QueryTreasuryResponse) Marshal() (dAtA []byte, err error)
func (*QueryTreasuryResponse) MarshalTo ¶
func (m *QueryTreasuryResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryTreasuryResponse) MarshalToSizedBuffer ¶
func (m *QueryTreasuryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTreasuryResponse) ProtoMessage ¶
func (*QueryTreasuryResponse) ProtoMessage()
func (*QueryTreasuryResponse) Reset ¶
func (m *QueryTreasuryResponse) Reset()
func (*QueryTreasuryResponse) Size ¶
func (m *QueryTreasuryResponse) Size() (n int)
func (*QueryTreasuryResponse) String ¶
func (m *QueryTreasuryResponse) String() string
func (*QueryTreasuryResponse) Unmarshal ¶
func (m *QueryTreasuryResponse) Unmarshal(dAtA []byte) error
func (*QueryTreasuryResponse) XXX_DiscardUnknown ¶
func (m *QueryTreasuryResponse) XXX_DiscardUnknown()
func (*QueryTreasuryResponse) XXX_Marshal ¶
func (m *QueryTreasuryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTreasuryResponse) XXX_Merge ¶
func (m *QueryTreasuryResponse) XXX_Merge(src proto.Message)
func (*QueryTreasuryResponse) XXX_Size ¶
func (m *QueryTreasuryResponse) XXX_Size() int
func (*QueryTreasuryResponse) XXX_Unmarshal ¶
func (m *QueryTreasuryResponse) XXX_Unmarshal(b []byte) error
type StakingKeeper ¶
type StakingKeeper interface {
BondDenom(sdk.Context) string
Delegate(sdk.Context, sdk.AccAddress, sdk.Int, stakingtypes.BondStatus, stakingtypes.Validator, bool) (sdk.Dec, error)
GetDelegation(sdk.Context, sdk.AccAddress, sdk.ValAddress) (stakingtypes.Delegation, bool)
GetAllValidators(sdk.Context) []stakingtypes.Validator
UnbondAndUndelegateCoins(sdk.Context, sdk.AccAddress, sdk.ValAddress, sdk.Dec) (sdk.Int, error)
}
StakingKeeper expected staking keeper.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct{}
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Treasury ¶
func (*UnimplementedQueryServer) Treasury(ctx context.Context, req *QueryTreasuryRequest) (*QueryTreasuryResponse, error)