Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ParamKeyTable() paramstypes.KeyTable
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- 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 ValidateGenesis(data *GenesisState) error
- type AccountKeeper
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- 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) 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 MsgSwap
- func (*MsgSwap) Descriptor() ([]byte, []int)
- func (msg MsgSwap) GetSignBytes() []byte
- func (msg MsgSwap) GetSigners() []sdk.AccAddress
- func (m *MsgSwap) Marshal() (dAtA []byte, err error)
- func (m *MsgSwap) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwap) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwap) ProtoMessage()
- func (m *MsgSwap) Reset()
- func (msg MsgSwap) Route() string
- func (m *MsgSwap) Size() (n int)
- func (m *MsgSwap) String() string
- func (msg MsgSwap) Type() string
- func (m *MsgSwap) Unmarshal(dAtA []byte) error
- func (msg MsgSwap) ValidateBasic() error
- func (m *MsgSwap) XXX_DiscardUnknown()
- func (m *MsgSwap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwap) XXX_Merge(src proto.Message)
- func (m *MsgSwap) XXX_Size() int
- func (m *MsgSwap) XXX_Unmarshal(b []byte) error
- type MsgSwapResponse
- func (*MsgSwapResponse) Descriptor() ([]byte, []int)
- func (m *MsgSwapResponse) GetSwapCoin() types.Coin
- func (m *MsgSwapResponse) GetSwapFee() types.Coin
- func (m *MsgSwapResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapResponse) ProtoMessage()
- func (m *MsgSwapResponse) Reset()
- func (m *MsgSwapResponse) Size() (n int)
- func (m *MsgSwapResponse) String() string
- func (m *MsgSwapResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSwapResponse) XXX_DiscardUnknown()
- func (m *MsgSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapResponse) XXX_Merge(src proto.Message)
- func (m *MsgSwapResponse) XXX_Size() int
- func (m *MsgSwapResponse) XXX_Unmarshal(b []byte) error
- type MsgSwapSend
- func (*MsgSwapSend) Descriptor() ([]byte, []int)
- func (msg MsgSwapSend) GetSignBytes() []byte
- func (msg MsgSwapSend) GetSigners() []sdk.AccAddress
- func (m *MsgSwapSend) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapSend) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapSend) ProtoMessage()
- func (m *MsgSwapSend) Reset()
- func (msg MsgSwapSend) Route() string
- func (m *MsgSwapSend) Size() (n int)
- func (m *MsgSwapSend) String() string
- func (msg MsgSwapSend) Type() string
- func (m *MsgSwapSend) Unmarshal(dAtA []byte) error
- func (msg MsgSwapSend) ValidateBasic() error
- func (m *MsgSwapSend) XXX_DiscardUnknown()
- func (m *MsgSwapSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapSend) XXX_Merge(src proto.Message)
- func (m *MsgSwapSend) XXX_Size() int
- func (m *MsgSwapSend) XXX_Unmarshal(b []byte) error
- type MsgSwapSendResponse
- func (*MsgSwapSendResponse) Descriptor() ([]byte, []int)
- func (m *MsgSwapSendResponse) GetSwapCoin() types.Coin
- func (m *MsgSwapSendResponse) GetSwapFee() types.Coin
- func (m *MsgSwapSendResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapSendResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapSendResponse) ProtoMessage()
- func (m *MsgSwapSendResponse) Reset()
- func (m *MsgSwapSendResponse) Size() (n int)
- func (m *MsgSwapSendResponse) String() string
- func (m *MsgSwapSendResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSwapSendResponse) XXX_DiscardUnknown()
- func (m *MsgSwapSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapSendResponse) XXX_Merge(src proto.Message)
- func (m *MsgSwapSendResponse) XXX_Size() int
- func (m *MsgSwapSendResponse) XXX_Unmarshal(b []byte) error
- type OracleKeeper
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetPoolRecoveryPeriod() uint64
- 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() paramstypes.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 QueryServer
- type QuerySwapParams
- type QuerySwapRequest
- func (*QuerySwapRequest) Descriptor() ([]byte, []int)
- func (m *QuerySwapRequest) Marshal() (dAtA []byte, err error)
- func (m *QuerySwapRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySwapRequest) ProtoMessage()
- func (m *QuerySwapRequest) Reset()
- func (m *QuerySwapRequest) Size() (n int)
- func (m *QuerySwapRequest) String() string
- func (m *QuerySwapRequest) Unmarshal(dAtA []byte) error
- func (m *QuerySwapRequest) XXX_DiscardUnknown()
- func (m *QuerySwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySwapRequest) XXX_Merge(src proto.Message)
- func (m *QuerySwapRequest) XXX_Size() int
- func (m *QuerySwapRequest) XXX_Unmarshal(b []byte) error
- type QuerySwapResponse
- func (*QuerySwapResponse) Descriptor() ([]byte, []int)
- func (m *QuerySwapResponse) GetReturnCoin() types.Coin
- func (m *QuerySwapResponse) Marshal() (dAtA []byte, err error)
- func (m *QuerySwapResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QuerySwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QuerySwapResponse) ProtoMessage()
- func (m *QuerySwapResponse) Reset()
- func (m *QuerySwapResponse) Size() (n int)
- func (m *QuerySwapResponse) String() string
- func (m *QuerySwapResponse) Unmarshal(dAtA []byte) error
- func (m *QuerySwapResponse) XXX_DiscardUnknown()
- func (m *QuerySwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QuerySwapResponse) XXX_Merge(src proto.Message)
- func (m *QuerySwapResponse) XXX_Size() int
- func (m *QuerySwapResponse) XXX_Unmarshal(b []byte) error
- type QueryTerraPoolDeltaRequest
- func (*QueryTerraPoolDeltaRequest) Descriptor() ([]byte, []int)
- func (m *QueryTerraPoolDeltaRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryTerraPoolDeltaRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTerraPoolDeltaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTerraPoolDeltaRequest) ProtoMessage()
- func (m *QueryTerraPoolDeltaRequest) Reset()
- func (m *QueryTerraPoolDeltaRequest) Size() (n int)
- func (m *QueryTerraPoolDeltaRequest) String() string
- func (m *QueryTerraPoolDeltaRequest) Unmarshal(dAtA []byte) error
- func (m *QueryTerraPoolDeltaRequest) XXX_DiscardUnknown()
- func (m *QueryTerraPoolDeltaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTerraPoolDeltaRequest) XXX_Merge(src proto.Message)
- func (m *QueryTerraPoolDeltaRequest) XXX_Size() int
- func (m *QueryTerraPoolDeltaRequest) XXX_Unmarshal(b []byte) error
- type QueryTerraPoolDeltaResponse
- func (*QueryTerraPoolDeltaResponse) Descriptor() ([]byte, []int)
- func (m *QueryTerraPoolDeltaResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryTerraPoolDeltaResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTerraPoolDeltaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTerraPoolDeltaResponse) ProtoMessage()
- func (m *QueryTerraPoolDeltaResponse) Reset()
- func (m *QueryTerraPoolDeltaResponse) Size() (n int)
- func (m *QueryTerraPoolDeltaResponse) String() string
- func (m *QueryTerraPoolDeltaResponse) Unmarshal(dAtA []byte) error
- func (m *QueryTerraPoolDeltaResponse) XXX_DiscardUnknown()
- func (m *QueryTerraPoolDeltaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTerraPoolDeltaResponse) XXX_Merge(src proto.Message)
- func (m *QueryTerraPoolDeltaResponse) XXX_Size() int
- func (m *QueryTerraPoolDeltaResponse) XXX_Unmarshal(b []byte) error
- type TobinTax
- type TobinTaxList
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Swap(ctx context.Context, req *QuerySwapRequest) (*QuerySwapResponse, error)
- func (*UnimplementedQueryServer) TerraPoolDelta(ctx context.Context, req *QueryTerraPoolDeltaRequest) (*QueryTerraPoolDeltaResponse, error)
Constants ¶
const ( EventSwap = "swap" AttributeKeyOffer = "offer" AttributeKeyTrader = "trader" AttributeKeyRecipient = "recipient" AttributeKeySwapCoin = "swap_coin" AttributeKeySwapFee = "swap_fee" AttributeValueCategory = ModuleName )
Market module event types
const ( // ModuleName is the name of the market module ModuleName = "market" // StoreKey is the string store representation StoreKey = ModuleName // RouterKey is the msg router key for the market module RouterKey = ModuleName // QuerierRoute is the query router key for the market module QuerierRoute = ModuleName )
const ( TypeMsgSwap = "swap" TypeMsgSwapSend = "swap_send" )
market message types
const ( QuerySwap = "swap" QueryTerraPoolDelta = "terra_pool_delta" QueryParameters = "parameters" )
query endpoints supported by the oracle Querier
Variables ¶
var ( ErrRecursiveSwap = sdkerrors.Register(ModuleName, 2, "recursive swap") ErrNoEffectivePrice = sdkerrors.Register(ModuleName, 3, "no price registered with oracle") ErrZeroSwapCoin = sdkerrors.Register(ModuleName, 4, "zero swap coin") )
Market errors
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 ( ErrInvalidLengthMarket = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMarket = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMarket = fmt.Errorf("proto: unexpected end of group") )
var ( // Terra liquidity pool(usdr unit) made available per ${PoolRecoveryPeriod} (usdr unit) KeyBasePool = []byte("BasePool") // The period required to recover BasePool KeyPoolRecoveryPeriod = []byte("PoolRecoveryPeriod") // Min spread KeyMinStabilitySpread = []byte("MinStabilitySpread") )
Parameter keys
var ( DefaultBasePool = sdk.NewDec(1000000 * core.MicroUnit) // 1000,000sdr = 1000,000,000,000usdr DefaultPoolRecoveryPeriod = core.BlocksPerDay // 14,400 DefaultMinStabilitySpread = sdk.NewDecWithPrec(2, 2) // 2% )
Default parameter values
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 ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( // ModuleCdc references the global x/market module codec. Note, the codec should // ONLY be used in certain instances of tests and for JSON encoding as Amino is // still used for that purpose. // // The actual codec used for serialization should be provided to x/staking and // defined at the application level. ModuleCdc = codec.NewAminoCodec(amino) )
var ( // Keys for store prefixed TerraPoolDeltaKey = []byte{0x01} // key for terra pool delta which gap between MintPool from BasePool )
Keys for market store Items are stored with the following key: values
- 0x01: sdk.Dec
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramstypes.KeyTable
ParamKeyTable returns the parameter key table.
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the x/market interfaces types with the interface registry
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the necessary x/market interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
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 ValidateGenesis ¶
func ValidateGenesis(data *GenesisState) error
ValidateGenesis validates the provided market genesis state
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // only used for simulation }
AccountKeeper is expected keeper for auth module
type BankKeeper ¶
type BankKeeper interface { SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error // only used for simulation SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin IsSendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool }
BankKeeper defines expected supply keeper
type GenesisState ¶
type GenesisState struct { // params defines all the paramaters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // the gap between the TerraPool and the BasePool TerraPoolDelta github_com_cosmos_cosmos_sdk_types.Dec `` /* 145-byte string literal not displayed */ }
GenesisState defines the market module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState returns raw genesis raw message for testing
func GetGenesisStateFromAppState ¶
func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState
GetGenesisStateFromAppState returns x/market GenesisState given raw application genesis state.
func NewGenesisState ¶
func NewGenesisState(terraPoolDelta sdk.Dec, 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) 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) 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 { // Swap defines a method for swapping coin from one denom to another // denom. Swap(ctx context.Context, in *MsgSwap, opts ...grpc.CallOption) (*MsgSwapResponse, error) // SwapSend defines a method for swapping and sending coin from a account to other // account. SwapSend(ctx context.Context, in *MsgSwapSend, opts ...grpc.CallOption) (*MsgSwapSendResponse, error) }
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 MsgServer ¶
type MsgServer interface { // Swap defines a method for swapping coin from one denom to another // denom. Swap(context.Context, *MsgSwap) (*MsgSwapResponse, error) // SwapSend defines a method for swapping and sending coin from a account to other // account. SwapSend(context.Context, *MsgSwapSend) (*MsgSwapSendResponse, error) }
MsgServer is the server API for Msg service.
type MsgSwap ¶
type MsgSwap struct { Trader string `protobuf:"bytes,1,opt,name=trader,proto3" json:"trader,omitempty" yaml:"trader"` OfferCoin types.Coin `protobuf:"bytes,2,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin" yaml:"offer_coin"` AskDenom string `protobuf:"bytes,3,opt,name=ask_denom,json=askDenom,proto3" json:"ask_denom,omitempty" yaml:"ask_denom"` }
MsgSwap represents a message to swap coin to another denom.
func NewMsgSwap ¶
NewMsgSwap creates a MsgSwap instance
func (*MsgSwap) Descriptor ¶
func (MsgSwap) GetSigners ¶
func (msg MsgSwap) GetSigners() []sdk.AccAddress
GetSigners Implements Msg
func (*MsgSwap) MarshalToSizedBuffer ¶
func (*MsgSwap) ProtoMessage ¶
func (*MsgSwap) ProtoMessage()
func (MsgSwap) ValidateBasic ¶
ValidateBasic Implements Msg
func (*MsgSwap) XXX_DiscardUnknown ¶
func (m *MsgSwap) XXX_DiscardUnknown()
func (*MsgSwap) XXX_Marshal ¶
func (*MsgSwap) XXX_Unmarshal ¶
type MsgSwapResponse ¶
type MsgSwapResponse struct { SwapCoin types.Coin `protobuf:"bytes,1,opt,name=swap_coin,json=swapCoin,proto3" json:"swap_coin" yaml:"swap_coin"` SwapFee types.Coin `protobuf:"bytes,2,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee" yaml:"swap_fee"` }
MsgSwapResponse defines the Msg/Swap response type.
func (*MsgSwapResponse) Descriptor ¶
func (*MsgSwapResponse) Descriptor() ([]byte, []int)
func (*MsgSwapResponse) GetSwapCoin ¶
func (m *MsgSwapResponse) GetSwapCoin() types.Coin
func (*MsgSwapResponse) GetSwapFee ¶
func (m *MsgSwapResponse) GetSwapFee() types.Coin
func (*MsgSwapResponse) Marshal ¶
func (m *MsgSwapResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapResponse) MarshalToSizedBuffer ¶
func (m *MsgSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapResponse) ProtoMessage ¶
func (*MsgSwapResponse) ProtoMessage()
func (*MsgSwapResponse) Reset ¶
func (m *MsgSwapResponse) Reset()
func (*MsgSwapResponse) Size ¶
func (m *MsgSwapResponse) Size() (n int)
func (*MsgSwapResponse) String ¶
func (m *MsgSwapResponse) String() string
func (*MsgSwapResponse) Unmarshal ¶
func (m *MsgSwapResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapResponse) XXX_DiscardUnknown ¶
func (m *MsgSwapResponse) XXX_DiscardUnknown()
func (*MsgSwapResponse) XXX_Marshal ¶
func (m *MsgSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapResponse) XXX_Merge ¶
func (m *MsgSwapResponse) XXX_Merge(src proto.Message)
func (*MsgSwapResponse) XXX_Size ¶
func (m *MsgSwapResponse) XXX_Size() int
func (*MsgSwapResponse) XXX_Unmarshal ¶
func (m *MsgSwapResponse) XXX_Unmarshal(b []byte) error
type MsgSwapSend ¶
type MsgSwapSend struct { FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" yaml:"from_address"` ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" yaml:"to_address"` OfferCoin types.Coin `protobuf:"bytes,3,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin" yaml:"offer_coin"` AskDenom string `protobuf:"bytes,4,opt,name=ask_denom,json=askDenom,proto3" json:"ask_denom,omitempty" yaml:"ask_denom"` }
MsgSwapSend represents a message to swap coin and send all result coin to recipient
func NewMsgSwapSend ¶
func NewMsgSwapSend(fromAddress sdk.AccAddress, toAddress sdk.AccAddress, offerCoin sdk.Coin, askCoin string) *MsgSwapSend
NewMsgSwapSend conducts market swap and send all the result coins to recipient
func (*MsgSwapSend) Descriptor ¶
func (*MsgSwapSend) Descriptor() ([]byte, []int)
func (MsgSwapSend) GetSignBytes ¶
func (msg MsgSwapSend) GetSignBytes() []byte
GetSignBytes Implements Msg
func (MsgSwapSend) GetSigners ¶
func (msg MsgSwapSend) GetSigners() []sdk.AccAddress
GetSigners Implements Msg
func (*MsgSwapSend) Marshal ¶
func (m *MsgSwapSend) Marshal() (dAtA []byte, err error)
func (*MsgSwapSend) MarshalToSizedBuffer ¶
func (m *MsgSwapSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapSend) ProtoMessage ¶
func (*MsgSwapSend) ProtoMessage()
func (*MsgSwapSend) Reset ¶
func (m *MsgSwapSend) Reset()
func (*MsgSwapSend) Size ¶
func (m *MsgSwapSend) Size() (n int)
func (*MsgSwapSend) String ¶
func (m *MsgSwapSend) String() string
func (*MsgSwapSend) Unmarshal ¶
func (m *MsgSwapSend) Unmarshal(dAtA []byte) error
func (MsgSwapSend) ValidateBasic ¶
func (msg MsgSwapSend) ValidateBasic() error
ValidateBasic Implements Msg
func (*MsgSwapSend) XXX_DiscardUnknown ¶
func (m *MsgSwapSend) XXX_DiscardUnknown()
func (*MsgSwapSend) XXX_Marshal ¶
func (m *MsgSwapSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapSend) XXX_Merge ¶
func (m *MsgSwapSend) XXX_Merge(src proto.Message)
func (*MsgSwapSend) XXX_Size ¶
func (m *MsgSwapSend) XXX_Size() int
func (*MsgSwapSend) XXX_Unmarshal ¶
func (m *MsgSwapSend) XXX_Unmarshal(b []byte) error
type MsgSwapSendResponse ¶
type MsgSwapSendResponse struct { SwapCoin types.Coin `protobuf:"bytes,1,opt,name=swap_coin,json=swapCoin,proto3" json:"swap_coin" yaml:"swap_coin"` SwapFee types.Coin `protobuf:"bytes,2,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee" yaml:"swap_fee"` }
MsgSwapSendResponse defines the Msg/SwapSend response type.
func (*MsgSwapSendResponse) Descriptor ¶
func (*MsgSwapSendResponse) Descriptor() ([]byte, []int)
func (*MsgSwapSendResponse) GetSwapCoin ¶
func (m *MsgSwapSendResponse) GetSwapCoin() types.Coin
func (*MsgSwapSendResponse) GetSwapFee ¶
func (m *MsgSwapSendResponse) GetSwapFee() types.Coin
func (*MsgSwapSendResponse) Marshal ¶
func (m *MsgSwapSendResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapSendResponse) MarshalTo ¶
func (m *MsgSwapSendResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapSendResponse) MarshalToSizedBuffer ¶
func (m *MsgSwapSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapSendResponse) ProtoMessage ¶
func (*MsgSwapSendResponse) ProtoMessage()
func (*MsgSwapSendResponse) Reset ¶
func (m *MsgSwapSendResponse) Reset()
func (*MsgSwapSendResponse) Size ¶
func (m *MsgSwapSendResponse) Size() (n int)
func (*MsgSwapSendResponse) String ¶
func (m *MsgSwapSendResponse) String() string
func (*MsgSwapSendResponse) Unmarshal ¶
func (m *MsgSwapSendResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapSendResponse) XXX_DiscardUnknown ¶
func (m *MsgSwapSendResponse) XXX_DiscardUnknown()
func (*MsgSwapSendResponse) XXX_Marshal ¶
func (m *MsgSwapSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapSendResponse) XXX_Merge ¶
func (m *MsgSwapSendResponse) XXX_Merge(src proto.Message)
func (*MsgSwapSendResponse) XXX_Size ¶
func (m *MsgSwapSendResponse) XXX_Size() int
func (*MsgSwapSendResponse) XXX_Unmarshal ¶
func (m *MsgSwapSendResponse) XXX_Unmarshal(b []byte) error
type OracleKeeper ¶
type OracleKeeper interface { GetLunaExchangeRate(ctx sdk.Context, denom string) (price sdk.Dec, err error) GetTobinTax(ctx sdk.Context, denom string) (tobinTax sdk.Dec, err error) // only used for simulation IterateLunaExchangeRates(ctx sdk.Context, handler func(denom string, exchangeRate sdk.Dec) (stop bool)) SetLunaExchangeRate(ctx sdk.Context, denom string, exchangeRate sdk.Dec) SetTobinTax(ctx sdk.Context, denom string, tobinTax sdk.Dec) }
OracleKeeper defines expected oracle keeper
type Params ¶
type Params struct { BasePool github_com_cosmos_cosmos_sdk_types.Dec `` /* 142-byte string literal not displayed */ PoolRecoveryPeriod uint64 `` /* 146-byte string literal not displayed */ MinStabilitySpread github_com_cosmos_cosmos_sdk_types.Dec `` /* 185-byte string literal not displayed */ }
Params defines the parameters for the market module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams creates default market module parameters
func (*Params) Descriptor ¶
func (*Params) GetPoolRecoveryPeriod ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramstypes.ParamSetPairs
ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of market module's parameters.
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 { // Swap returns simulated swap amount. Swap(ctx context.Context, in *QuerySwapRequest, opts ...grpc.CallOption) (*QuerySwapResponse, error) // TerraPoolDelta returns terra_pool_delta amount. TerraPoolDelta(ctx context.Context, in *QueryTerraPoolDeltaRequest, opts ...grpc.CallOption) (*QueryTerraPoolDeltaResponse, error) // Params queries all parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 the 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 defines the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is the 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 QueryServer ¶
type QueryServer interface { // Swap returns simulated swap amount. Swap(context.Context, *QuerySwapRequest) (*QuerySwapResponse, error) // TerraPoolDelta returns terra_pool_delta amount. TerraPoolDelta(context.Context, *QueryTerraPoolDeltaRequest) (*QueryTerraPoolDeltaResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) }
QueryServer is the server API for Query service.
type QuerySwapParams ¶
type QuerySwapParams struct { OfferCoin sdk.Coin `json:"offer_coin"` AskDenom string `json:"ask_denom"` }
QuerySwapParams for query - 'custom/market/swap'
func NewQuerySwapParams ¶
func NewQuerySwapParams(offerCoin sdk.Coin, askDenom string) QuerySwapParams
NewQuerySwapParams returns param object for swap query
type QuerySwapRequest ¶
type QuerySwapRequest struct { // offer_coin defines the coin being offered (i.e. 1000000uluna) OfferCoin string `protobuf:"bytes,1,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin,omitempty"` // ask_denom defines the denom of the coin to swap to AskDenom string `protobuf:"bytes,2,opt,name=ask_denom,json=askDenom,proto3" json:"ask_denom,omitempty"` }
QuerySwapRequest is the request type for the Query/Swap RPC method.
func (*QuerySwapRequest) Descriptor ¶
func (*QuerySwapRequest) Descriptor() ([]byte, []int)
func (*QuerySwapRequest) Marshal ¶
func (m *QuerySwapRequest) Marshal() (dAtA []byte, err error)
func (*QuerySwapRequest) MarshalToSizedBuffer ¶
func (m *QuerySwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySwapRequest) ProtoMessage ¶
func (*QuerySwapRequest) ProtoMessage()
func (*QuerySwapRequest) Reset ¶
func (m *QuerySwapRequest) Reset()
func (*QuerySwapRequest) Size ¶
func (m *QuerySwapRequest) Size() (n int)
func (*QuerySwapRequest) String ¶
func (m *QuerySwapRequest) String() string
func (*QuerySwapRequest) Unmarshal ¶
func (m *QuerySwapRequest) Unmarshal(dAtA []byte) error
func (*QuerySwapRequest) XXX_DiscardUnknown ¶
func (m *QuerySwapRequest) XXX_DiscardUnknown()
func (*QuerySwapRequest) XXX_Marshal ¶
func (m *QuerySwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySwapRequest) XXX_Merge ¶
func (m *QuerySwapRequest) XXX_Merge(src proto.Message)
func (*QuerySwapRequest) XXX_Size ¶
func (m *QuerySwapRequest) XXX_Size() int
func (*QuerySwapRequest) XXX_Unmarshal ¶
func (m *QuerySwapRequest) XXX_Unmarshal(b []byte) error
type QuerySwapResponse ¶
type QuerySwapResponse struct { // return_coin defines the coin returned as a result of the swap simulation. ReturnCoin types.Coin `protobuf:"bytes,1,opt,name=return_coin,json=returnCoin,proto3" json:"return_coin"` }
QuerySwapResponse is the response type for the Query/Swap RPC method.
func (*QuerySwapResponse) Descriptor ¶
func (*QuerySwapResponse) Descriptor() ([]byte, []int)
func (*QuerySwapResponse) GetReturnCoin ¶
func (m *QuerySwapResponse) GetReturnCoin() types.Coin
func (*QuerySwapResponse) Marshal ¶
func (m *QuerySwapResponse) Marshal() (dAtA []byte, err error)
func (*QuerySwapResponse) MarshalTo ¶
func (m *QuerySwapResponse) MarshalTo(dAtA []byte) (int, error)
func (*QuerySwapResponse) MarshalToSizedBuffer ¶
func (m *QuerySwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QuerySwapResponse) ProtoMessage ¶
func (*QuerySwapResponse) ProtoMessage()
func (*QuerySwapResponse) Reset ¶
func (m *QuerySwapResponse) Reset()
func (*QuerySwapResponse) Size ¶
func (m *QuerySwapResponse) Size() (n int)
func (*QuerySwapResponse) String ¶
func (m *QuerySwapResponse) String() string
func (*QuerySwapResponse) Unmarshal ¶
func (m *QuerySwapResponse) Unmarshal(dAtA []byte) error
func (*QuerySwapResponse) XXX_DiscardUnknown ¶
func (m *QuerySwapResponse) XXX_DiscardUnknown()
func (*QuerySwapResponse) XXX_Marshal ¶
func (m *QuerySwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QuerySwapResponse) XXX_Merge ¶
func (m *QuerySwapResponse) XXX_Merge(src proto.Message)
func (*QuerySwapResponse) XXX_Size ¶
func (m *QuerySwapResponse) XXX_Size() int
func (*QuerySwapResponse) XXX_Unmarshal ¶
func (m *QuerySwapResponse) XXX_Unmarshal(b []byte) error
type QueryTerraPoolDeltaRequest ¶
type QueryTerraPoolDeltaRequest struct { }
QueryTerraPoolDeltaRequest is the request type for the Query/TerraPoolDelta RPC method.
func (*QueryTerraPoolDeltaRequest) Descriptor ¶
func (*QueryTerraPoolDeltaRequest) Descriptor() ([]byte, []int)
func (*QueryTerraPoolDeltaRequest) Marshal ¶
func (m *QueryTerraPoolDeltaRequest) Marshal() (dAtA []byte, err error)
func (*QueryTerraPoolDeltaRequest) MarshalTo ¶
func (m *QueryTerraPoolDeltaRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryTerraPoolDeltaRequest) MarshalToSizedBuffer ¶
func (m *QueryTerraPoolDeltaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTerraPoolDeltaRequest) ProtoMessage ¶
func (*QueryTerraPoolDeltaRequest) ProtoMessage()
func (*QueryTerraPoolDeltaRequest) Reset ¶
func (m *QueryTerraPoolDeltaRequest) Reset()
func (*QueryTerraPoolDeltaRequest) Size ¶
func (m *QueryTerraPoolDeltaRequest) Size() (n int)
func (*QueryTerraPoolDeltaRequest) String ¶
func (m *QueryTerraPoolDeltaRequest) String() string
func (*QueryTerraPoolDeltaRequest) Unmarshal ¶
func (m *QueryTerraPoolDeltaRequest) Unmarshal(dAtA []byte) error
func (*QueryTerraPoolDeltaRequest) XXX_DiscardUnknown ¶
func (m *QueryTerraPoolDeltaRequest) XXX_DiscardUnknown()
func (*QueryTerraPoolDeltaRequest) XXX_Marshal ¶
func (m *QueryTerraPoolDeltaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTerraPoolDeltaRequest) XXX_Merge ¶
func (m *QueryTerraPoolDeltaRequest) XXX_Merge(src proto.Message)
func (*QueryTerraPoolDeltaRequest) XXX_Size ¶
func (m *QueryTerraPoolDeltaRequest) XXX_Size() int
func (*QueryTerraPoolDeltaRequest) XXX_Unmarshal ¶
func (m *QueryTerraPoolDeltaRequest) XXX_Unmarshal(b []byte) error
type QueryTerraPoolDeltaResponse ¶
type QueryTerraPoolDeltaResponse struct { // terra_pool_delta defines the gap between the TerraPool and the TerraBasePool TerraPoolDelta github_com_cosmos_cosmos_sdk_types.Dec `` /* 145-byte string literal not displayed */ }
QueryTerraPoolDeltaResponse is the response type for the Query/TerraPoolDelta RPC method.
func (*QueryTerraPoolDeltaResponse) Descriptor ¶
func (*QueryTerraPoolDeltaResponse) Descriptor() ([]byte, []int)
func (*QueryTerraPoolDeltaResponse) Marshal ¶
func (m *QueryTerraPoolDeltaResponse) Marshal() (dAtA []byte, err error)
func (*QueryTerraPoolDeltaResponse) MarshalTo ¶
func (m *QueryTerraPoolDeltaResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryTerraPoolDeltaResponse) MarshalToSizedBuffer ¶
func (m *QueryTerraPoolDeltaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTerraPoolDeltaResponse) ProtoMessage ¶
func (*QueryTerraPoolDeltaResponse) ProtoMessage()
func (*QueryTerraPoolDeltaResponse) Reset ¶
func (m *QueryTerraPoolDeltaResponse) Reset()
func (*QueryTerraPoolDeltaResponse) Size ¶
func (m *QueryTerraPoolDeltaResponse) Size() (n int)
func (*QueryTerraPoolDeltaResponse) String ¶
func (m *QueryTerraPoolDeltaResponse) String() string
func (*QueryTerraPoolDeltaResponse) Unmarshal ¶
func (m *QueryTerraPoolDeltaResponse) Unmarshal(dAtA []byte) error
func (*QueryTerraPoolDeltaResponse) XXX_DiscardUnknown ¶
func (m *QueryTerraPoolDeltaResponse) XXX_DiscardUnknown()
func (*QueryTerraPoolDeltaResponse) XXX_Marshal ¶
func (m *QueryTerraPoolDeltaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTerraPoolDeltaResponse) XXX_Merge ¶
func (m *QueryTerraPoolDeltaResponse) XXX_Merge(src proto.Message)
func (*QueryTerraPoolDeltaResponse) XXX_Size ¶
func (m *QueryTerraPoolDeltaResponse) XXX_Size() int
func (*QueryTerraPoolDeltaResponse) XXX_Unmarshal ¶
func (m *QueryTerraPoolDeltaResponse) XXX_Unmarshal(b []byte) error
type TobinTax ¶
type TobinTax struct { Denom string `json:"denom" yaml:"denom"` TaxRate sdk.Dec `json:"tax_rate" yaml:"tax_rate"` }
TobinTax - struct to store tobin tax for the specific denom with high volatility
type TobinTaxList ¶
type TobinTaxList []TobinTax
TobinTaxList is convience wrapper to handle TobinTax array
func (TobinTaxList) String ¶
func (ttl TobinTaxList) String() string
String implements fmt.Stringer interface
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Swap ¶
func (*UnimplementedMsgServer) Swap(ctx context.Context, req *MsgSwap) (*MsgSwapResponse, error)
func (*UnimplementedMsgServer) SwapSend ¶
func (*UnimplementedMsgServer) SwapSend(ctx context.Context, req *MsgSwapSend) (*MsgSwapSendResponse, error)
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) Swap ¶
func (*UnimplementedQueryServer) Swap(ctx context.Context, req *QuerySwapRequest) (*QuerySwapResponse, error)
func (*UnimplementedQueryServer) TerraPoolDelta ¶
func (*UnimplementedQueryServer) TerraPoolDelta(ctx context.Context, req *QueryTerraPoolDeltaRequest) (*QueryTerraPoolDeltaResponse, error)