Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- 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)
- func ValidateReserver(reserver Reserver) error
- type AccountKeeper
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetReserver() Reserver
- 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 (gs 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 MsgClient
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetCommitteeMembers() []string
- 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 (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p 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) GetParams() Params
- 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 QueryReserverRequest
- func (*QueryReserverRequest) Descriptor() ([]byte, []int)
- func (m *QueryReserverRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryReserverRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryReserverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryReserverRequest) ProtoMessage()
- func (m *QueryReserverRequest) Reset()
- func (m *QueryReserverRequest) Size() (n int)
- func (m *QueryReserverRequest) String() string
- func (m *QueryReserverRequest) Unmarshal(dAtA []byte) error
- func (m *QueryReserverRequest) XXX_DiscardUnknown()
- func (m *QueryReserverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryReserverRequest) XXX_Merge(src proto.Message)
- func (m *QueryReserverRequest) XXX_Size() int
- func (m *QueryReserverRequest) XXX_Unmarshal(b []byte) error
- type QueryReserverResponse
- func (*QueryReserverResponse) Descriptor() ([]byte, []int)
- func (m *QueryReserverResponse) GetReserver() *Reserver
- func (m *QueryReserverResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryReserverResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryReserverResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryReserverResponse) ProtoMessage()
- func (m *QueryReserverResponse) Reset()
- func (m *QueryReserverResponse) Size() (n int)
- func (m *QueryReserverResponse) String() string
- func (m *QueryReserverResponse) Unmarshal(dAtA []byte) error
- func (m *QueryReserverResponse) XXX_DiscardUnknown()
- func (m *QueryReserverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryReserverResponse) XXX_Merge(src proto.Message)
- func (m *QueryReserverResponse) XXX_Size() int
- func (m *QueryReserverResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type Reserver
- func (*Reserver) Descriptor() ([]byte, []int)
- func (this *Reserver) Equal(that interface{}) bool
- func (m *Reserver) GetSrPool() *SRPool
- func (m *Reserver) Marshal() (dAtA []byte, err error)
- func (m *Reserver) MarshalTo(dAtA []byte) (int, error)
- func (m *Reserver) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Reserver) ProtoMessage()
- func (m *Reserver) Reset()
- func (m *Reserver) Size() (n int)
- func (r Reserver) String() string
- func (m *Reserver) Unmarshal(dAtA []byte) error
- func (m *Reserver) XXX_DiscardUnknown()
- func (m *Reserver) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Reserver) XXX_Merge(src proto.Message)
- func (m *Reserver) XXX_Size() int
- func (m *Reserver) XXX_Unmarshal(b []byte) error
- type SRPool
- func (*SRPool) Descriptor() ([]byte, []int)
- func (this *SRPool) Equal(that interface{}) bool
- func (m *SRPool) Marshal() (dAtA []byte, err error)
- func (m *SRPool) MarshalTo(dAtA []byte) (int, error)
- func (m *SRPool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SRPool) ProtoMessage()
- func (m *SRPool) Reset()
- func (m *SRPool) Size() (n int)
- func (sp SRPool) String() string
- func (m *SRPool) Unmarshal(dAtA []byte) error
- func (m *SRPool) XXX_DiscardUnknown()
- func (m *SRPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SRPool) XXX_Merge(src proto.Message)
- func (m *SRPool) XXX_Size() int
- func (m *SRPool) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( // AttributeValueCategory is the event attribute for category as module name AttributeValueCategory = ModuleName )AttributeKeyNewShares = "new_shares"
strategic reserve module event types nolint
const ( // ModuleName defines the module name ModuleName = "strategicreserve" // 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_strategicreserve" )
module constants
const ( // SRPoolName defines the account name for SR Pool SRPoolName = "sr_pool" // BetReserveName defines the account name for storing bet amount BetReserveName = "bet_reserve" )
module accounts constants
const ( // LogErrInsufficientUserBalance is logged when the user has insufficient balance LogErrInsufficientUserBalance = "User has insufficient balance. Address: %s, Balance: %s usgex, Required: %s usgex" // LogErrInsufficientUnlockedAmountInSrPool is logged when SR_Pool unlocked amount is // less than the required amount LogErrInsufficientUnlockedAmountInSrPool = "Unlocked amount in the SR_Pool is insufficient. Unlocked amount: %s usgex, Required amount: %s usgex" // LogErrInsufficientLockedAmountInSrPool is logged when SR_Pool locked amount is // less than the required amount LogErrInsufficientLockedAmountInSrPool = "Locked amount in the SR_Pool is insufficient. Locked amount: %s usgex, Required amount: %s usgex" // LogErrFromBankModule is logged when an error is returned from the bank module // while trying to transfer funds LogErrFromBankModule = "Funds transfer failed from the bank module with error: %s" // LogErrPayoutLockDoesnotExist is logged when the payout lock doesn't exist LogErrPayoutLockDoesnotExist = "lock %s for payout does not exist" // LogErrLockAlreadyExists is logged when locks already exists LogErrLockAlreadyExists = "lock already exists for the lock: %s" // LogErrTransferOfFundsFailed is logged when funds transfer gets failed LogErrTransferOfFundsFailed = "Transfer of %s usgex from %s to %s failed with error: %s" // LogInfoFundsTransferred is logged when the funds are transferred // to the required account successfully LogInfoFundsTransferred = "transferred %s usgex from %s to %s" // LogInfoBettorReceivedPayout is logged when the user receives the payout successfully LogInfoBettorReceivedPayout = "bettor %s received the payout of %s usgex" // LogInfoHouseReceivedWinnings is logged when the house receives the bet // winnings successfully LogInfoHouseReceivedWinnings = "house received %s usgex as winnings in %s account" // LogInfoBetAccepted is logged when a bet is accepted LogInfoBetAccepted = "bet with bet amount %s usgex accepted" // LogInfoBettorRefunded is logged when a bettor is refunded with the bet amount LogInfoBettorRefunded = "bettor %s refunded with bet amount %s usgex" )
Variables ¶
var ( // Amino stores a reference to a new Legacy Amino Amino = codec.NewLegacyAmino() // ModuleCdc stores a reference to a new ProtoCodec ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( ErrInsufficientUserBalance = sdkerrors.Register(ModuleName, 1100, "Insufficient user balance. User Address: %s") ErrInsufficientUnlockedAmountInSrPool = sdkerrors.Register(ModuleName, 1101, "Insufficient funds in SR") ErrInsufficientLockedAmountInSrPool = sdkerrors.Register(ModuleName, 1102, "Insufficient funds locked in SR Pool") ErrInsufficientBalanceInModuleAccount = sdkerrors.Register(ModuleName, 1103, "Insufficient Balance in the %s Module Account") ErrFromBankModule = sdkerrors.Register(ModuleName, 1104, "Error returned from Bank Module: %s") ErrPayoutLockDoesnotExist = sdkerrors.Register(ModuleName, 1105, "Payout lock for bet uid %s does not exist") ErrLockAlreadyExists = sdkerrors.Register(ModuleName, 1106, "Conflict, lock already exists") ErrDuplicateSenderAndRecipientModule = sdkerrors.Register(ModuleName, 1114, "sender and receiver module names must not be same") ErrTextNilReserver = sdkerrors.Register(ModuleName, 1115, "Reserver must not be nil") )
x/strategicreserve module sentinel errors nolint
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 ( // DefaultCommitteeMembers defines the default value of committee members DefaultCommitteeMembers = []string(nil) // InitialSrPool defines the value of the locked amount // and the unlocked amount in the SR_Pool account initially // when the chain is started InitialSrPool = SRPool{ LockedAmount: sdk.ZeroInt(), UnlockedAmount: sdk.NewInt(150000000000000), } )
default values
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthReserver = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowReserver = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupReserver = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthSrPool = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSrPool = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSrPool = fmt.Errorf("proto: unexpected end of group") )
var ( // KeyCommitteeMembers defines the key for committee members KeyCommitteeMembers = []byte("CommitteeMembers") )
params keys
var ( // PayoutLockPrefix defines the prefix for the KV-Store partition // which stores the locks for paying out the funds to the user PayoutLockPrefix = []byte{0x01} )
prefixes
var ReserverKey = []byte("sr")
ReserverKey is the key to use for the keeper store.
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 codec for the SR module
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
RegisterInterfaces registers the interface registry
func RegisterMsgServer ¶
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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func ValidateReserver ¶
ValidateReserver validates the reserver
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI GetModuleAddress(moduleName string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI }
AccountKeeper defines the expected account keeper used for simulations (noalias)
type BankKeeper ¶
type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error }
BankKeeper defines the expected interface needed to retrieve account balances.
type GenesisState ¶
type GenesisState struct { Reserver Reserver `protobuf:"bytes,1,opt,name=reserver,proto3" json:"reserver"` Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
GenesisState defines the strategicreserve module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default genesis state
func NewGenesisState ¶
func NewGenesisState(reserver Reserver, params Params) *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) GetReserver ¶
func (m *GenesisState) GetReserver() Reserver
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 (gs 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 MsgClient ¶
type MsgClient interface { }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type Params ¶
type Params struct {
CommitteeMembers []string `` /* 134-byte string literal not displayed */
}
Params defines the parameters for the Strategic Reserve module.
func (*Params) Descriptor ¶
func (*Params) GetCommitteeMembers ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *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) // Reserver returns the Reserver value. Reserver(ctx context.Context, in *QueryReserverRequest, opts ...grpc.CallOption) (*QueryReserverResponse, 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) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
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 QueryReserverRequest ¶
type QueryReserverRequest struct { }
QueryReserverRequest is the request type for the Query/Inflation RPC method.
func (*QueryReserverRequest) Descriptor ¶
func (*QueryReserverRequest) Descriptor() ([]byte, []int)
func (*QueryReserverRequest) Marshal ¶
func (m *QueryReserverRequest) Marshal() (dAtA []byte, err error)
func (*QueryReserverRequest) MarshalTo ¶
func (m *QueryReserverRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryReserverRequest) MarshalToSizedBuffer ¶
func (m *QueryReserverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryReserverRequest) ProtoMessage ¶
func (*QueryReserverRequest) ProtoMessage()
func (*QueryReserverRequest) Reset ¶
func (m *QueryReserverRequest) Reset()
func (*QueryReserverRequest) Size ¶
func (m *QueryReserverRequest) Size() (n int)
func (*QueryReserverRequest) String ¶
func (m *QueryReserverRequest) String() string
func (*QueryReserverRequest) Unmarshal ¶
func (m *QueryReserverRequest) Unmarshal(dAtA []byte) error
func (*QueryReserverRequest) XXX_DiscardUnknown ¶
func (m *QueryReserverRequest) XXX_DiscardUnknown()
func (*QueryReserverRequest) XXX_Marshal ¶
func (m *QueryReserverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryReserverRequest) XXX_Merge ¶
func (m *QueryReserverRequest) XXX_Merge(src proto.Message)
func (*QueryReserverRequest) XXX_Size ¶
func (m *QueryReserverRequest) XXX_Size() int
func (*QueryReserverRequest) XXX_Unmarshal ¶
func (m *QueryReserverRequest) XXX_Unmarshal(b []byte) error
type QueryReserverResponse ¶
type QueryReserverResponse struct { // inflation is the current minting inflation value. Reserver *Reserver `protobuf:"bytes,1,opt,name=reserver,proto3" json:"reserver,omitempty"` }
QueryReserverResponse is the response type for the Query/Inflation RPC method.
func (*QueryReserverResponse) Descriptor ¶
func (*QueryReserverResponse) Descriptor() ([]byte, []int)
func (*QueryReserverResponse) GetReserver ¶
func (m *QueryReserverResponse) GetReserver() *Reserver
func (*QueryReserverResponse) Marshal ¶
func (m *QueryReserverResponse) Marshal() (dAtA []byte, err error)
func (*QueryReserverResponse) MarshalTo ¶
func (m *QueryReserverResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryReserverResponse) MarshalToSizedBuffer ¶
func (m *QueryReserverResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryReserverResponse) ProtoMessage ¶
func (*QueryReserverResponse) ProtoMessage()
func (*QueryReserverResponse) Reset ¶
func (m *QueryReserverResponse) Reset()
func (*QueryReserverResponse) Size ¶
func (m *QueryReserverResponse) Size() (n int)
func (*QueryReserverResponse) String ¶
func (m *QueryReserverResponse) String() string
func (*QueryReserverResponse) Unmarshal ¶
func (m *QueryReserverResponse) Unmarshal(dAtA []byte) error
func (*QueryReserverResponse) XXX_DiscardUnknown ¶
func (m *QueryReserverResponse) XXX_DiscardUnknown()
func (*QueryReserverResponse) XXX_Marshal ¶
func (m *QueryReserverResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryReserverResponse) XXX_Merge ¶
func (m *QueryReserverResponse) XXX_Merge(src proto.Message)
func (*QueryReserverResponse) XXX_Size ¶
func (m *QueryReserverResponse) XXX_Size() int
func (*QueryReserverResponse) XXX_Unmarshal ¶
func (m *QueryReserverResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Reserver returns the Reserver value. Reserver(context.Context, *QueryReserverRequest) (*QueryReserverResponse, error) }
QueryServer is the server API for Query service.
type Reserver ¶
type Reserver struct {
SrPool *SRPool `protobuf:"bytes,1,opt,name=sr_pool,json=srPool,proto3" json:"sr_pool,omitempty" yaml:"sr_pool"`
}
Reserver defines the parameters for the StrategicReserve module.
func DefaultInitialReserver ¶
func DefaultInitialReserver() Reserver
DefaultInitialReserver returns the default reserver
func InitialReserver ¶
func InitialReserver() Reserver
InitialReserver returns an initial Reserver object.
func NewReserver ¶
NewReserver returns a new reserver and initializes it with the passed values
func (*Reserver) Descriptor ¶
func (*Reserver) MarshalToSizedBuffer ¶
func (*Reserver) ProtoMessage ¶
func (*Reserver) ProtoMessage()
func (*Reserver) XXX_DiscardUnknown ¶
func (m *Reserver) XXX_DiscardUnknown()
func (*Reserver) XXX_Marshal ¶
func (*Reserver) XXX_Unmarshal ¶
type SRPool ¶
type SRPool struct { LockedAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 158-byte string literal not displayed */ UnlockedAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 166-byte string literal not displayed */ }
SRPool defines the locked amount and the unlocked amount in the SR Pool Account.
func (*SRPool) Descriptor ¶
func (*SRPool) MarshalToSizedBuffer ¶
func (*SRPool) ProtoMessage ¶
func (*SRPool) ProtoMessage()
func (*SRPool) XXX_DiscardUnknown ¶
func (m *SRPool) XXX_DiscardUnknown()
func (*SRPool) XXX_Marshal ¶
func (*SRPool) XXX_Unmarshal ¶
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
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) Reserver ¶
func (*UnimplementedQueryServer) Reserver(ctx context.Context, req *QueryReserverRequest) (*QueryReserverResponse, error)