Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- 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)
- type AccountKeeper
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetMarketParams() []MarketParam
- func (m *GenesisState) GetMarketPrices() []MarketPrice
- 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 MarketParam
- func (*MarketParam) Descriptor() ([]byte, []int)
- func (m *MarketParam) GetExchangeConfigJson() string
- func (m *MarketParam) GetExponent() int32
- func (m *MarketParam) GetId() uint32
- func (m *MarketParam) GetMinExchanges() uint32
- func (m *MarketParam) GetMinPriceChangePpm() uint32
- func (m *MarketParam) GetPair() string
- func (m *MarketParam) Marshal() (dAtA []byte, err error)
- func (m *MarketParam) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketParam) ProtoMessage()
- func (m *MarketParam) Reset()
- func (m *MarketParam) Size() (n int)
- func (m *MarketParam) String() string
- func (m *MarketParam) Unmarshal(dAtA []byte) error
- func (mp *MarketParam) Validate() error
- func (m *MarketParam) XXX_DiscardUnknown()
- func (m *MarketParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketParam) XXX_Merge(src proto.Message)
- func (m *MarketParam) XXX_Size() int
- func (m *MarketParam) XXX_Unmarshal(b []byte) error
- type MarketParamPrice
- type MarketPnlPriceUpdate
- func (*MarketPnlPriceUpdate) Descriptor() ([]byte, []int)
- func (m *MarketPnlPriceUpdate) GetMarketId() uint32
- func (m *MarketPnlPriceUpdate) GetPnlPrice() uint64
- func (m *MarketPnlPriceUpdate) Marshal() (dAtA []byte, err error)
- func (m *MarketPnlPriceUpdate) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketPnlPriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketPnlPriceUpdate) ProtoMessage()
- func (m *MarketPnlPriceUpdate) Reset()
- func (m *MarketPnlPriceUpdate) Size() (n int)
- func (m *MarketPnlPriceUpdate) String() string
- func (m *MarketPnlPriceUpdate) Unmarshal(dAtA []byte) error
- func (m *MarketPnlPriceUpdate) XXX_DiscardUnknown()
- func (m *MarketPnlPriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketPnlPriceUpdate) XXX_Merge(src proto.Message)
- func (m *MarketPnlPriceUpdate) XXX_Size() int
- func (m *MarketPnlPriceUpdate) XXX_Unmarshal(b []byte) error
- type MarketPrice
- func (*MarketPrice) Descriptor() ([]byte, []int)
- func (m *MarketPrice) GetExponent() int32
- func (m *MarketPrice) GetId() uint32
- func (m *MarketPrice) GetPnlPrice() uint64
- func (m *MarketPrice) GetSpotPrice() uint64
- func (m *MarketPrice) Marshal() (dAtA []byte, err error)
- func (m *MarketPrice) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketPrice) ProtoMessage()
- func (m *MarketPrice) Reset()
- func (m *MarketPrice) Size() (n int)
- func (m *MarketPrice) String() string
- func (m *MarketPrice) Unmarshal(dAtA []byte) error
- func (mp *MarketPrice) ValidateFromParam(marketParam MarketParam) error
- func (m *MarketPrice) XXX_DiscardUnknown()
- func (m *MarketPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketPrice) XXX_Merge(src proto.Message)
- func (m *MarketPrice) XXX_Size() int
- func (m *MarketPrice) XXX_Unmarshal(b []byte) error
- type MarketPriceUpdate
- func (*MarketPriceUpdate) Descriptor() ([]byte, []int)
- func (m *MarketPriceUpdate) GetMarketId() uint32
- func (m *MarketPriceUpdate) GetPnlPrice() uint64
- func (m *MarketPriceUpdate) GetSpotPrice() uint64
- func (m *MarketPriceUpdate) Marshal() (dAtA []byte, err error)
- func (m *MarketPriceUpdate) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketPriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketPriceUpdate) ProtoMessage()
- func (m *MarketPriceUpdate) Reset()
- func (m *MarketPriceUpdate) Size() (n int)
- func (m *MarketPriceUpdate) String() string
- func (m *MarketPriceUpdate) Unmarshal(dAtA []byte) error
- func (m *MarketPriceUpdate) XXX_DiscardUnknown()
- func (m *MarketPriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketPriceUpdate) XXX_Merge(src proto.Message)
- func (m *MarketPriceUpdate) XXX_Size() int
- func (m *MarketPriceUpdate) XXX_Unmarshal(b []byte) error
- type MarketPriceUpdates
- func (*MarketPriceUpdates) Descriptor() ([]byte, []int)
- func (m *MarketPriceUpdates) GetMarketPriceUpdates() []*MarketPriceUpdate
- func (m *MarketPriceUpdates) Marshal() (dAtA []byte, err error)
- func (m *MarketPriceUpdates) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketPriceUpdates) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketPriceUpdates) ProtoMessage()
- func (m *MarketPriceUpdates) Reset()
- func (m *MarketPriceUpdates) Size() (n int)
- func (m *MarketPriceUpdates) String() string
- func (m *MarketPriceUpdates) Unmarshal(dAtA []byte) error
- func (m *MarketPriceUpdates) XXX_DiscardUnknown()
- func (m *MarketPriceUpdates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketPriceUpdates) XXX_Merge(src proto.Message)
- func (m *MarketPriceUpdates) XXX_Size() int
- func (m *MarketPriceUpdates) XXX_Unmarshal(b []byte) error
- type MarketSpotPrice
- func (*MarketSpotPrice) Descriptor() ([]byte, []int)
- func (m *MarketSpotPrice) GetExponent() int32
- func (m *MarketSpotPrice) GetId() uint32
- func (m *MarketSpotPrice) GetSpotPrice() uint64
- func (m *MarketSpotPrice) Marshal() (dAtA []byte, err error)
- func (m *MarketSpotPrice) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketSpotPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketSpotPrice) ProtoMessage()
- func (m *MarketSpotPrice) Reset()
- func (m *MarketSpotPrice) Size() (n int)
- func (m *MarketSpotPrice) String() string
- func (m *MarketSpotPrice) Unmarshal(dAtA []byte) error
- func (m *MarketSpotPrice) XXX_DiscardUnknown()
- func (m *MarketSpotPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketSpotPrice) XXX_Merge(src proto.Message)
- func (m *MarketSpotPrice) XXX_Size() int
- func (m *MarketSpotPrice) XXX_Unmarshal(b []byte) error
- type MarketSpotPriceUpdate
- func (*MarketSpotPriceUpdate) Descriptor() ([]byte, []int)
- func (m *MarketSpotPriceUpdate) GetMarketId() uint32
- func (m *MarketSpotPriceUpdate) GetSpotPrice() uint64
- func (m *MarketSpotPriceUpdate) Marshal() (dAtA []byte, err error)
- func (m *MarketSpotPriceUpdate) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketSpotPriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketSpotPriceUpdate) ProtoMessage()
- func (m *MarketSpotPriceUpdate) Reset()
- func (m *MarketSpotPriceUpdate) Size() (n int)
- func (m *MarketSpotPriceUpdate) String() string
- func (m *MarketSpotPriceUpdate) Unmarshal(dAtA []byte) error
- func (m *MarketSpotPriceUpdate) XXX_DiscardUnknown()
- func (m *MarketSpotPriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketSpotPriceUpdate) XXX_Merge(src proto.Message)
- func (m *MarketSpotPriceUpdate) XXX_Size() int
- func (m *MarketSpotPriceUpdate) XXX_Unmarshal(b []byte) error
- type MarketToSmoothedPrices
- type MarketToSmoothedPricesImpl
- func (m *MarketToSmoothedPricesImpl) GetHistoricalSmoothedSpotPrices(marketId uint32) []uint64
- func (m *MarketToSmoothedPricesImpl) GetSmoothedSpotPrice(marketId uint32) (price uint64, ok bool)
- func (m *MarketToSmoothedPricesImpl) GetSmoothedSpotPricesForTest() map[uint32]uint64
- func (m *MarketToSmoothedPricesImpl) PushSmoothedSpotPrice(id uint32, price uint64)
- type MsgClient
- type MsgCreateOracleMarket
- func (*MsgCreateOracleMarket) Descriptor() ([]byte, []int)
- func (m *MsgCreateOracleMarket) GetAuthority() string
- func (m *MsgCreateOracleMarket) GetParams() MarketParam
- func (m *MsgCreateOracleMarket) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateOracleMarket) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateOracleMarket) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateOracleMarket) ProtoMessage()
- func (m *MsgCreateOracleMarket) Reset()
- func (m *MsgCreateOracleMarket) Size() (n int)
- func (m *MsgCreateOracleMarket) String() string
- func (m *MsgCreateOracleMarket) Unmarshal(dAtA []byte) error
- func (msg *MsgCreateOracleMarket) ValidateBasic() error
- func (m *MsgCreateOracleMarket) XXX_DiscardUnknown()
- func (m *MsgCreateOracleMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateOracleMarket) XXX_Merge(src proto.Message)
- func (m *MsgCreateOracleMarket) XXX_Size() int
- func (m *MsgCreateOracleMarket) XXX_Unmarshal(b []byte) error
- type MsgCreateOracleMarketResponse
- func (*MsgCreateOracleMarketResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateOracleMarketResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateOracleMarketResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateOracleMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateOracleMarketResponse) ProtoMessage()
- func (m *MsgCreateOracleMarketResponse) Reset()
- func (m *MsgCreateOracleMarketResponse) Size() (n int)
- func (m *MsgCreateOracleMarketResponse) String() string
- func (m *MsgCreateOracleMarketResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateOracleMarketResponse) XXX_DiscardUnknown()
- func (m *MsgCreateOracleMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateOracleMarketResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateOracleMarketResponse) XXX_Size() int
- func (m *MsgCreateOracleMarketResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgUpdateMarketParam
- func (*MsgUpdateMarketParam) Descriptor() ([]byte, []int)
- func (m *MsgUpdateMarketParam) GetAuthority() string
- func (m *MsgUpdateMarketParam) GetMarketParam() MarketParam
- func (m *MsgUpdateMarketParam) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateMarketParam) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateMarketParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateMarketParam) ProtoMessage()
- func (m *MsgUpdateMarketParam) Reset()
- func (m *MsgUpdateMarketParam) Size() (n int)
- func (m *MsgUpdateMarketParam) String() string
- func (m *MsgUpdateMarketParam) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateMarketParam) ValidateBasic() error
- func (m *MsgUpdateMarketParam) XXX_DiscardUnknown()
- func (m *MsgUpdateMarketParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateMarketParam) XXX_Merge(src proto.Message)
- func (m *MsgUpdateMarketParam) XXX_Size() int
- func (m *MsgUpdateMarketParam) XXX_Unmarshal(b []byte) error
- type MsgUpdateMarketParamResponse
- func (*MsgUpdateMarketParamResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateMarketParamResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateMarketParamResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateMarketParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateMarketParamResponse) ProtoMessage()
- func (m *MsgUpdateMarketParamResponse) Reset()
- func (m *MsgUpdateMarketParamResponse) Size() (n int)
- func (m *MsgUpdateMarketParamResponse) String() string
- func (m *MsgUpdateMarketParamResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateMarketParamResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateMarketParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateMarketParamResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateMarketParamResponse) XXX_Size() int
- func (m *MsgUpdateMarketParamResponse) XXX_Unmarshal(b []byte) error
- type PricesKeeper
- type QueryAllMarketParamsRequest
- func (*QueryAllMarketParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllMarketParamsRequest) GetPagination() *query.PageRequest
- func (m *QueryAllMarketParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllMarketParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllMarketParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllMarketParamsRequest) ProtoMessage()
- func (m *QueryAllMarketParamsRequest) Reset()
- func (m *QueryAllMarketParamsRequest) Size() (n int)
- func (m *QueryAllMarketParamsRequest) String() string
- func (m *QueryAllMarketParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllMarketParamsRequest) XXX_DiscardUnknown()
- func (m *QueryAllMarketParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllMarketParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllMarketParamsRequest) XXX_Size() int
- func (m *QueryAllMarketParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryAllMarketParamsResponse
- func (*QueryAllMarketParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllMarketParamsResponse) GetMarketParams() []MarketParam
- func (m *QueryAllMarketParamsResponse) GetPagination() *query.PageResponse
- func (m *QueryAllMarketParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllMarketParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllMarketParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllMarketParamsResponse) ProtoMessage()
- func (m *QueryAllMarketParamsResponse) Reset()
- func (m *QueryAllMarketParamsResponse) Size() (n int)
- func (m *QueryAllMarketParamsResponse) String() string
- func (m *QueryAllMarketParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllMarketParamsResponse) XXX_DiscardUnknown()
- func (m *QueryAllMarketParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllMarketParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllMarketParamsResponse) XXX_Size() int
- func (m *QueryAllMarketParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryAllMarketPricesRequest
- func (*QueryAllMarketPricesRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllMarketPricesRequest) GetPagination() *query.PageRequest
- func (m *QueryAllMarketPricesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllMarketPricesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllMarketPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllMarketPricesRequest) ProtoMessage()
- func (m *QueryAllMarketPricesRequest) Reset()
- func (m *QueryAllMarketPricesRequest) Size() (n int)
- func (m *QueryAllMarketPricesRequest) String() string
- func (m *QueryAllMarketPricesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllMarketPricesRequest) XXX_DiscardUnknown()
- func (m *QueryAllMarketPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllMarketPricesRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllMarketPricesRequest) XXX_Size() int
- func (m *QueryAllMarketPricesRequest) XXX_Unmarshal(b []byte) error
- type QueryAllMarketPricesResponse
- func (*QueryAllMarketPricesResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllMarketPricesResponse) GetMarketPrices() []MarketPrice
- func (m *QueryAllMarketPricesResponse) GetPagination() *query.PageResponse
- func (m *QueryAllMarketPricesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllMarketPricesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllMarketPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllMarketPricesResponse) ProtoMessage()
- func (m *QueryAllMarketPricesResponse) Reset()
- func (m *QueryAllMarketPricesResponse) Size() (n int)
- func (m *QueryAllMarketPricesResponse) String() string
- func (m *QueryAllMarketPricesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllMarketPricesResponse) XXX_DiscardUnknown()
- func (m *QueryAllMarketPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllMarketPricesResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllMarketPricesResponse) XXX_Size() int
- func (m *QueryAllMarketPricesResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryMarketParamRequest
- func (*QueryMarketParamRequest) Descriptor() ([]byte, []int)
- func (m *QueryMarketParamRequest) GetId() uint32
- func (m *QueryMarketParamRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryMarketParamRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryMarketParamRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryMarketParamRequest) ProtoMessage()
- func (m *QueryMarketParamRequest) Reset()
- func (m *QueryMarketParamRequest) Size() (n int)
- func (m *QueryMarketParamRequest) String() string
- func (m *QueryMarketParamRequest) Unmarshal(dAtA []byte) error
- func (m *QueryMarketParamRequest) XXX_DiscardUnknown()
- func (m *QueryMarketParamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMarketParamRequest) XXX_Merge(src proto.Message)
- func (m *QueryMarketParamRequest) XXX_Size() int
- func (m *QueryMarketParamRequest) XXX_Unmarshal(b []byte) error
- type QueryMarketParamResponse
- func (*QueryMarketParamResponse) Descriptor() ([]byte, []int)
- func (m *QueryMarketParamResponse) GetMarketParam() MarketParam
- func (m *QueryMarketParamResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryMarketParamResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryMarketParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryMarketParamResponse) ProtoMessage()
- func (m *QueryMarketParamResponse) Reset()
- func (m *QueryMarketParamResponse) Size() (n int)
- func (m *QueryMarketParamResponse) String() string
- func (m *QueryMarketParamResponse) Unmarshal(dAtA []byte) error
- func (m *QueryMarketParamResponse) XXX_DiscardUnknown()
- func (m *QueryMarketParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMarketParamResponse) XXX_Merge(src proto.Message)
- func (m *QueryMarketParamResponse) XXX_Size() int
- func (m *QueryMarketParamResponse) XXX_Unmarshal(b []byte) error
- type QueryMarketPriceRequest
- func (*QueryMarketPriceRequest) Descriptor() ([]byte, []int)
- func (m *QueryMarketPriceRequest) GetId() uint32
- func (m *QueryMarketPriceRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryMarketPriceRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryMarketPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryMarketPriceRequest) ProtoMessage()
- func (m *QueryMarketPriceRequest) Reset()
- func (m *QueryMarketPriceRequest) Size() (n int)
- func (m *QueryMarketPriceRequest) String() string
- func (m *QueryMarketPriceRequest) Unmarshal(dAtA []byte) error
- func (m *QueryMarketPriceRequest) XXX_DiscardUnknown()
- func (m *QueryMarketPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMarketPriceRequest) XXX_Merge(src proto.Message)
- func (m *QueryMarketPriceRequest) XXX_Size() int
- func (m *QueryMarketPriceRequest) XXX_Unmarshal(b []byte) error
- type QueryMarketPriceResponse
- func (*QueryMarketPriceResponse) Descriptor() ([]byte, []int)
- func (m *QueryMarketPriceResponse) GetMarketPrice() MarketPrice
- func (m *QueryMarketPriceResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryMarketPriceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryMarketPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryMarketPriceResponse) ProtoMessage()
- func (m *QueryMarketPriceResponse) Reset()
- func (m *QueryMarketPriceResponse) Size() (n int)
- func (m *QueryMarketPriceResponse) String() string
- func (m *QueryMarketPriceResponse) Unmarshal(dAtA []byte) error
- func (m *QueryMarketPriceResponse) XXX_DiscardUnknown()
- func (m *QueryMarketPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryMarketPriceResponse) XXX_Merge(src proto.Message)
- func (m *QueryMarketPriceResponse) XXX_Size() int
- func (m *QueryMarketPriceResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) AllMarketParams(ctx context.Context, req *QueryAllMarketParamsRequest) (*QueryAllMarketParamsResponse, error)
- func (*UnimplementedQueryServer) AllMarketPrices(ctx context.Context, req *QueryAllMarketPricesRequest) (*QueryAllMarketPricesResponse, error)
- func (*UnimplementedQueryServer) MarketParam(ctx context.Context, req *QueryMarketParamRequest) (*QueryMarketParamResponse, error)
- func (*UnimplementedQueryServer) MarketPrice(ctx context.Context, req *QueryMarketPriceRequest) (*QueryMarketPriceResponse, error)
Constants ¶
const ( MarketIsRecentDuration = 20 * time.Second PriceDaemonInitializationBlocks = 20 )
const ( // ModuleName defines the module name ModuleName = "prices" // StoreKey defines the primary module store key StoreKey = ModuleName )
Module name and store keys
const ( // MarketParamKeyPrefix is the prefix to retrieve all MarketParams MarketParamKeyPrefix = "Param:" // MarketPriceKeyPrefix is the prefix to retrieve all MarketPrices MarketPriceKeyPrefix = "Price:" )
State
const (
PriceSmoothingPpm = uint32(300_000)
)
const ( // SmoothedPriceTrackingBlockHistoryLength is the number of blocks we track smoothed prices for to determine if the // next smoothed price should be used in the price update proposal. // TODO(CORE-396): Put this on-chain and configure it in the application via chain state. SmoothedPriceTrackingBlockHistoryLength = uint32(5) )
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(module.InterfaceRegistry) )
var ( // 1 - 99: Default. ErrInvalidInput = errorsmod.Register(ModuleName, 1, "Invalid input") // 100 - 199: Exchange related errors. ErrExchangeDoesNotExist = errorsmod.Register(ModuleName, 100, "Exchange does not exist") ErrZeroMinExchanges = errorsmod.Register(ModuleName, 101, "Min exchanges must be greater than zero") ErrTooFewExchanges = errorsmod.Register(ModuleName, 102, "Exchanges is fewer than minExchanges") ErrDuplicateExchanges = errorsmod.Register( ModuleName, 103, "Exchanges must not contain duplicates and must be provided in ascending order", ) // 200 - 299: Market related errors. ErrMarketParamDoesNotExist = errorsmod.Register(ModuleName, 200, "Market param does not exist") ErrMarketPriceDoesNotExist = errorsmod.Register(ModuleName, 201, "Market price does not exist") ErrMarketExponentCannotBeUpdated = errorsmod.Register(ModuleName, 202, "Market exponent cannot be updated") ErrMarketPricesAndParamsDontMatch = errorsmod.Register(ModuleName, 203, "Market prices and params don't match") ErrMarketParamAlreadyExists = errorsmod.Register(ModuleName, 204, "Market params already exists") // 300 - 399: Price related errors. ErrIndexPriceNotAvailable = errorsmod.Register(ModuleName, 300, "Index price is not available") // 400 - 499: Market price update related errors. ErrInvalidMarketPriceUpdateStateless = errorsmod.Register( ModuleName, 400, "Market price update is invalid: stateless.") ErrInvalidMarketPriceUpdateDeterministic = errorsmod.Register( ModuleName, 401, "Market price update is invalid: deterministic.") ErrInvalidMarketPriceUpdateNonDeterministic = errorsmod.Register( ModuleName, 402, "Market price update is invalid: non-deterministic.") // 500 - 599: sdk.Msg related errors. ErrInvalidAuthority = errorsmod.Register( ModuleName, 500, "Authority is invalid", ) )
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 ( ErrInvalidLengthMarketParam = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMarketParam = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMarketParam = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthMarketPrice = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMarketPrice = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMarketPrice = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
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)
Types ¶
type AccountKeeper ¶
AccountKeeper defines the expected account keeper used for simulations.
type BankKeeper ¶
AccountKeeper defines the expected bank keeper used for simulations.
type GenesisState ¶
type GenesisState struct { MarketParams []MarketParam `protobuf:"bytes,1,rep,name=market_params,json=marketParams,proto3" json:"market_params"` MarketPrices []MarketPrice `protobuf:"bytes,2,rep,name=market_prices,json=marketPrices,proto3" json:"market_prices"` }
GenesisState defines the prices module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Prices genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetMarketParams ¶
func (m *GenesisState) GetMarketParams() []MarketParam
func (*GenesisState) GetMarketPrices ¶
func (m *GenesisState) GetMarketPrices() []MarketPrice
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 MarketParam ¶
type MarketParam struct { // Unique, sequentially-generated value. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // The human-readable name of the market pair (e.g. `BTC-USD`). Pair string `protobuf:"bytes,2,opt,name=pair,proto3" json:"pair,omitempty"` // Static value. The exponent of the price. // For example if `Exponent == -5` then a `Value` of `1,000,000,000` // represents “$10,000`. Therefore `10 ^ Exponent` represents the smallest // price step (in dollars) that can be recorded. Exponent int32 `protobuf:"zigzag32,3,opt,name=exponent,proto3" json:"exponent,omitempty"` // The minimum number of exchanges that should be reporting a live price for // a price update to be considered valid. MinExchanges uint32 `protobuf:"varint,4,opt,name=min_exchanges,json=minExchanges,proto3" json:"min_exchanges,omitempty"` // The minimum allowable change in `price` value that would cause a price // update on the network. Measured as `1e-6` (parts per million). MinPriceChangePpm uint32 `protobuf:"varint,5,opt,name=min_price_change_ppm,json=minPriceChangePpm,proto3" json:"min_price_change_ppm,omitempty"` // A string of json that encodes the configuration for resolving the price // of this market on various exchanges. ExchangeConfigJson string `protobuf:"bytes,6,opt,name=exchange_config_json,json=exchangeConfigJson,proto3" json:"exchange_config_json,omitempty"` }
MarketParam represents the x/prices configuration for markets, including representing price values, resolving markets on individual exchanges, and generating price updates. This configuration is specific to the quote currency.
func (*MarketParam) Descriptor ¶
func (*MarketParam) Descriptor() ([]byte, []int)
func (*MarketParam) GetExchangeConfigJson ¶
func (m *MarketParam) GetExchangeConfigJson() string
func (*MarketParam) GetExponent ¶
func (m *MarketParam) GetExponent() int32
func (*MarketParam) GetId ¶
func (m *MarketParam) GetId() uint32
func (*MarketParam) GetMinExchanges ¶
func (m *MarketParam) GetMinExchanges() uint32
func (*MarketParam) GetMinPriceChangePpm ¶
func (m *MarketParam) GetMinPriceChangePpm() uint32
func (*MarketParam) GetPair ¶
func (m *MarketParam) GetPair() string
func (*MarketParam) Marshal ¶
func (m *MarketParam) Marshal() (dAtA []byte, err error)
func (*MarketParam) MarshalToSizedBuffer ¶
func (m *MarketParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketParam) ProtoMessage ¶
func (*MarketParam) ProtoMessage()
func (*MarketParam) Reset ¶
func (m *MarketParam) Reset()
func (*MarketParam) Size ¶
func (m *MarketParam) Size() (n int)
func (*MarketParam) String ¶
func (m *MarketParam) String() string
func (*MarketParam) Unmarshal ¶
func (m *MarketParam) Unmarshal(dAtA []byte) error
func (*MarketParam) Validate ¶
func (mp *MarketParam) Validate() error
Validate checks that the MarketParam is valid.
func (*MarketParam) XXX_DiscardUnknown ¶
func (m *MarketParam) XXX_DiscardUnknown()
func (*MarketParam) XXX_Marshal ¶
func (m *MarketParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketParam) XXX_Merge ¶
func (m *MarketParam) XXX_Merge(src proto.Message)
func (*MarketParam) XXX_Size ¶
func (m *MarketParam) XXX_Size() int
func (*MarketParam) XXX_Unmarshal ¶
func (m *MarketParam) XXX_Unmarshal(b []byte) error
type MarketParamPrice ¶
type MarketParamPrice struct { Param MarketParam Price MarketPrice }
MarketParamPrice is a struct that combines a MarketParam and a MarketPrice.
type MarketPnlPriceUpdate ¶
type MarketPnlPriceUpdate struct { // The id of market to update MarketId uint32 `protobuf:"varint,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // The updated pnl price PnlPrice uint64 `protobuf:"varint,2,opt,name=pnl_price,json=pnlPrice,proto3" json:"pnl_price,omitempty"` }
MarketPnlPriceUpdate is used to update the pnl price of a single market.
func (*MarketPnlPriceUpdate) Descriptor ¶
func (*MarketPnlPriceUpdate) Descriptor() ([]byte, []int)
func (*MarketPnlPriceUpdate) GetMarketId ¶
func (m *MarketPnlPriceUpdate) GetMarketId() uint32
func (*MarketPnlPriceUpdate) GetPnlPrice ¶
func (m *MarketPnlPriceUpdate) GetPnlPrice() uint64
func (*MarketPnlPriceUpdate) Marshal ¶
func (m *MarketPnlPriceUpdate) Marshal() (dAtA []byte, err error)
func (*MarketPnlPriceUpdate) MarshalTo ¶
func (m *MarketPnlPriceUpdate) MarshalTo(dAtA []byte) (int, error)
func (*MarketPnlPriceUpdate) MarshalToSizedBuffer ¶
func (m *MarketPnlPriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketPnlPriceUpdate) ProtoMessage ¶
func (*MarketPnlPriceUpdate) ProtoMessage()
func (*MarketPnlPriceUpdate) Reset ¶
func (m *MarketPnlPriceUpdate) Reset()
func (*MarketPnlPriceUpdate) Size ¶
func (m *MarketPnlPriceUpdate) Size() (n int)
func (*MarketPnlPriceUpdate) String ¶
func (m *MarketPnlPriceUpdate) String() string
func (*MarketPnlPriceUpdate) Unmarshal ¶
func (m *MarketPnlPriceUpdate) Unmarshal(dAtA []byte) error
func (*MarketPnlPriceUpdate) XXX_DiscardUnknown ¶
func (m *MarketPnlPriceUpdate) XXX_DiscardUnknown()
func (*MarketPnlPriceUpdate) XXX_Marshal ¶
func (m *MarketPnlPriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketPnlPriceUpdate) XXX_Merge ¶
func (m *MarketPnlPriceUpdate) XXX_Merge(src proto.Message)
func (*MarketPnlPriceUpdate) XXX_Size ¶
func (m *MarketPnlPriceUpdate) XXX_Size() int
func (*MarketPnlPriceUpdate) XXX_Unmarshal ¶
func (m *MarketPnlPriceUpdate) XXX_Unmarshal(b []byte) error
type MarketPrice ¶
type MarketPrice struct { // Unique, sequentially-generated value that matches `MarketParam`. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Static value. The exponent of the price. See the comment on the duplicate // MarketParam field for more information. Exponent int32 `protobuf:"zigzag32,2,opt,name=exponent,proto3" json:"exponent,omitempty"` // The spot price value that is updated by oracle price updates. `0` if it has // never been updated, `>0` otherwise. SpotPrice uint64 `protobuf:"varint,3,opt,name=spot_price,json=spotPrice,proto3" json:"spot_price,omitempty"` // The pnl price value that is updated by oracle price updates. `0` if it has // never been updated, `>0` otherwise. PnlPrice uint64 `protobuf:"varint,4,opt,name=pnl_price,json=pnlPrice,proto3" json:"pnl_price,omitempty"` }
MarketPrice is used by the application to store/retrieve oracle prices.
func (*MarketPrice) Descriptor ¶
func (*MarketPrice) Descriptor() ([]byte, []int)
func (*MarketPrice) GetExponent ¶
func (m *MarketPrice) GetExponent() int32
func (*MarketPrice) GetId ¶
func (m *MarketPrice) GetId() uint32
func (*MarketPrice) GetPnlPrice ¶
func (m *MarketPrice) GetPnlPrice() uint64
func (*MarketPrice) GetSpotPrice ¶
func (m *MarketPrice) GetSpotPrice() uint64
func (*MarketPrice) Marshal ¶
func (m *MarketPrice) Marshal() (dAtA []byte, err error)
func (*MarketPrice) MarshalToSizedBuffer ¶
func (m *MarketPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketPrice) ProtoMessage ¶
func (*MarketPrice) ProtoMessage()
func (*MarketPrice) Reset ¶
func (m *MarketPrice) Reset()
func (*MarketPrice) Size ¶
func (m *MarketPrice) Size() (n int)
func (*MarketPrice) String ¶
func (m *MarketPrice) String() string
func (*MarketPrice) Unmarshal ¶
func (m *MarketPrice) Unmarshal(dAtA []byte) error
func (*MarketPrice) ValidateFromParam ¶
func (mp *MarketPrice) ValidateFromParam(marketParam MarketParam) error
ValidateFromParam checks that the MarketPrice is valid and that it corresponds to the given MarketParam.
func (*MarketPrice) XXX_DiscardUnknown ¶
func (m *MarketPrice) XXX_DiscardUnknown()
func (*MarketPrice) XXX_Marshal ¶
func (m *MarketPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketPrice) XXX_Merge ¶
func (m *MarketPrice) XXX_Merge(src proto.Message)
func (*MarketPrice) XXX_Size ¶
func (m *MarketPrice) XXX_Size() int
func (*MarketPrice) XXX_Unmarshal ¶
func (m *MarketPrice) XXX_Unmarshal(b []byte) error
type MarketPriceUpdate ¶
type MarketPriceUpdate struct { // The id of market to update MarketId uint32 `protobuf:"varint,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // The updated spot price SpotPrice uint64 `protobuf:"varint,2,opt,name=spot_price,json=spotPrice,proto3" json:"spot_price,omitempty"` // The updated pnl price PnlPrice uint64 `protobuf:"varint,3,opt,name=pnl_price,json=pnlPrice,proto3" json:"pnl_price,omitempty"` }
MarketPriceUpdate is used to update the price of a single market.
func NewMarketPriceUpdate ¶
func NewMarketPriceUpdate(id uint32, spotPrice uint64, pnlPrice uint64) *MarketPriceUpdate
func (*MarketPriceUpdate) Descriptor ¶
func (*MarketPriceUpdate) Descriptor() ([]byte, []int)
func (*MarketPriceUpdate) GetMarketId ¶
func (m *MarketPriceUpdate) GetMarketId() uint32
func (*MarketPriceUpdate) GetPnlPrice ¶
func (m *MarketPriceUpdate) GetPnlPrice() uint64
func (*MarketPriceUpdate) GetSpotPrice ¶
func (m *MarketPriceUpdate) GetSpotPrice() uint64
func (*MarketPriceUpdate) Marshal ¶
func (m *MarketPriceUpdate) Marshal() (dAtA []byte, err error)
func (*MarketPriceUpdate) MarshalTo ¶
func (m *MarketPriceUpdate) MarshalTo(dAtA []byte) (int, error)
func (*MarketPriceUpdate) MarshalToSizedBuffer ¶
func (m *MarketPriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketPriceUpdate) ProtoMessage ¶
func (*MarketPriceUpdate) ProtoMessage()
func (*MarketPriceUpdate) Reset ¶
func (m *MarketPriceUpdate) Reset()
func (*MarketPriceUpdate) Size ¶
func (m *MarketPriceUpdate) Size() (n int)
func (*MarketPriceUpdate) String ¶
func (m *MarketPriceUpdate) String() string
func (*MarketPriceUpdate) Unmarshal ¶
func (m *MarketPriceUpdate) Unmarshal(dAtA []byte) error
func (*MarketPriceUpdate) XXX_DiscardUnknown ¶
func (m *MarketPriceUpdate) XXX_DiscardUnknown()
func (*MarketPriceUpdate) XXX_Marshal ¶
func (m *MarketPriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketPriceUpdate) XXX_Merge ¶
func (m *MarketPriceUpdate) XXX_Merge(src proto.Message)
func (*MarketPriceUpdate) XXX_Size ¶
func (m *MarketPriceUpdate) XXX_Size() int
func (*MarketPriceUpdate) XXX_Unmarshal ¶
func (m *MarketPriceUpdate) XXX_Unmarshal(b []byte) error
type MarketPriceUpdates ¶
type MarketPriceUpdates struct {
MarketPriceUpdates []*MarketPriceUpdate `protobuf:"bytes,1,rep,name=market_price_updates,json=marketPriceUpdates,proto3" json:"market_price_updates,omitempty"`
}
MarketPriceUpdates is a collection of MarketPriceUpdate messages.
func (*MarketPriceUpdates) Descriptor ¶
func (*MarketPriceUpdates) Descriptor() ([]byte, []int)
func (*MarketPriceUpdates) GetMarketPriceUpdates ¶
func (m *MarketPriceUpdates) GetMarketPriceUpdates() []*MarketPriceUpdate
func (*MarketPriceUpdates) Marshal ¶
func (m *MarketPriceUpdates) Marshal() (dAtA []byte, err error)
func (*MarketPriceUpdates) MarshalTo ¶
func (m *MarketPriceUpdates) MarshalTo(dAtA []byte) (int, error)
func (*MarketPriceUpdates) MarshalToSizedBuffer ¶
func (m *MarketPriceUpdates) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketPriceUpdates) ProtoMessage ¶
func (*MarketPriceUpdates) ProtoMessage()
func (*MarketPriceUpdates) Reset ¶
func (m *MarketPriceUpdates) Reset()
func (*MarketPriceUpdates) Size ¶
func (m *MarketPriceUpdates) Size() (n int)
func (*MarketPriceUpdates) String ¶
func (m *MarketPriceUpdates) String() string
func (*MarketPriceUpdates) Unmarshal ¶
func (m *MarketPriceUpdates) Unmarshal(dAtA []byte) error
func (*MarketPriceUpdates) XXX_DiscardUnknown ¶
func (m *MarketPriceUpdates) XXX_DiscardUnknown()
func (*MarketPriceUpdates) XXX_Marshal ¶
func (m *MarketPriceUpdates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketPriceUpdates) XXX_Merge ¶
func (m *MarketPriceUpdates) XXX_Merge(src proto.Message)
func (*MarketPriceUpdates) XXX_Size ¶
func (m *MarketPriceUpdates) XXX_Size() int
func (*MarketPriceUpdates) XXX_Unmarshal ¶
func (m *MarketPriceUpdates) XXX_Unmarshal(b []byte) error
type MarketSpotPrice ¶
type MarketSpotPrice struct { // Unique, sequentially-generated value that matches `MarketParam`. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Static value. The exponent of the price. See the comment on the duplicate // MarketParam field for more information. Exponent int32 `protobuf:"zigzag32,2,opt,name=exponent,proto3" json:"exponent,omitempty"` // The spot price value that is updated by oracle price updates. `0` if it has // never been updated, `>0` otherwise. SpotPrice uint64 `protobuf:"varint,3,opt,name=spot_price,json=spotPrice,proto3" json:"spot_price,omitempty"` }
MarketSpotPrice is used by the application to store/retrieve spot prices.
func (*MarketSpotPrice) Descriptor ¶
func (*MarketSpotPrice) Descriptor() ([]byte, []int)
func (*MarketSpotPrice) GetExponent ¶
func (m *MarketSpotPrice) GetExponent() int32
func (*MarketSpotPrice) GetId ¶
func (m *MarketSpotPrice) GetId() uint32
func (*MarketSpotPrice) GetSpotPrice ¶
func (m *MarketSpotPrice) GetSpotPrice() uint64
func (*MarketSpotPrice) Marshal ¶
func (m *MarketSpotPrice) Marshal() (dAtA []byte, err error)
func (*MarketSpotPrice) MarshalToSizedBuffer ¶
func (m *MarketSpotPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketSpotPrice) ProtoMessage ¶
func (*MarketSpotPrice) ProtoMessage()
func (*MarketSpotPrice) Reset ¶
func (m *MarketSpotPrice) Reset()
func (*MarketSpotPrice) Size ¶
func (m *MarketSpotPrice) Size() (n int)
func (*MarketSpotPrice) String ¶
func (m *MarketSpotPrice) String() string
func (*MarketSpotPrice) Unmarshal ¶
func (m *MarketSpotPrice) Unmarshal(dAtA []byte) error
func (*MarketSpotPrice) XXX_DiscardUnknown ¶
func (m *MarketSpotPrice) XXX_DiscardUnknown()
func (*MarketSpotPrice) XXX_Marshal ¶
func (m *MarketSpotPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketSpotPrice) XXX_Merge ¶
func (m *MarketSpotPrice) XXX_Merge(src proto.Message)
func (*MarketSpotPrice) XXX_Size ¶
func (m *MarketSpotPrice) XXX_Size() int
func (*MarketSpotPrice) XXX_Unmarshal ¶
func (m *MarketSpotPrice) XXX_Unmarshal(b []byte) error
type MarketSpotPriceUpdate ¶
type MarketSpotPriceUpdate struct { // The id of market to update MarketId uint32 `protobuf:"varint,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // The updated spot price SpotPrice uint64 `protobuf:"varint,2,opt,name=spot_price,json=spotPrice,proto3" json:"spot_price,omitempty"` }
MarketSpotPriceUpdate is used to update the spot price of a single market.
func NewMarketSpotPriceUpdate ¶
func NewMarketSpotPriceUpdate(id uint32, spotPrice uint64) *MarketSpotPriceUpdate
func (*MarketSpotPriceUpdate) Descriptor ¶
func (*MarketSpotPriceUpdate) Descriptor() ([]byte, []int)
func (*MarketSpotPriceUpdate) GetMarketId ¶
func (m *MarketSpotPriceUpdate) GetMarketId() uint32
func (*MarketSpotPriceUpdate) GetSpotPrice ¶
func (m *MarketSpotPriceUpdate) GetSpotPrice() uint64
func (*MarketSpotPriceUpdate) Marshal ¶
func (m *MarketSpotPriceUpdate) Marshal() (dAtA []byte, err error)
func (*MarketSpotPriceUpdate) MarshalTo ¶
func (m *MarketSpotPriceUpdate) MarshalTo(dAtA []byte) (int, error)
func (*MarketSpotPriceUpdate) MarshalToSizedBuffer ¶
func (m *MarketSpotPriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketSpotPriceUpdate) ProtoMessage ¶
func (*MarketSpotPriceUpdate) ProtoMessage()
func (*MarketSpotPriceUpdate) Reset ¶
func (m *MarketSpotPriceUpdate) Reset()
func (*MarketSpotPriceUpdate) Size ¶
func (m *MarketSpotPriceUpdate) Size() (n int)
func (*MarketSpotPriceUpdate) String ¶
func (m *MarketSpotPriceUpdate) String() string
func (*MarketSpotPriceUpdate) Unmarshal ¶
func (m *MarketSpotPriceUpdate) Unmarshal(dAtA []byte) error
func (*MarketSpotPriceUpdate) XXX_DiscardUnknown ¶
func (m *MarketSpotPriceUpdate) XXX_DiscardUnknown()
func (*MarketSpotPriceUpdate) XXX_Marshal ¶
func (m *MarketSpotPriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketSpotPriceUpdate) XXX_Merge ¶
func (m *MarketSpotPriceUpdate) XXX_Merge(src proto.Message)
func (*MarketSpotPriceUpdate) XXX_Size ¶
func (m *MarketSpotPriceUpdate) XXX_Size() int
func (*MarketSpotPriceUpdate) XXX_Unmarshal ¶
func (m *MarketSpotPriceUpdate) XXX_Unmarshal(b []byte) error
type MarketToSmoothedPrices ¶
type MarketToSmoothedPrices interface { GetSmoothedSpotPrice(marketId uint32) (price uint64, ok bool) GetSmoothedSpotPricesForTest() map[uint32]uint64 GetHistoricalSmoothedSpotPrices(marketId uint32) []uint64 PushSmoothedSpotPrice(marketId uint32, price uint64) }
MarketToSmoothedPrices tracks current and historical exponentially smoothed prices for each market.
func NewMarketToSmoothedSpotPrices ¶
func NewMarketToSmoothedSpotPrices(historyLength uint32) MarketToSmoothedPrices
NewMarketToSmoothedPrices returns a new `MarketToSmoothedPrices` that tracks the previous `historyLength` prices per market. The default value to use for the protocol is `SmoothedPriceTrackingBlockHistoryLength`.
type MarketToSmoothedPricesImpl ¶
type MarketToSmoothedPricesImpl struct {
// contains filtered or unexported fields
}
func (*MarketToSmoothedPricesImpl) GetHistoricalSmoothedSpotPrices ¶
func (m *MarketToSmoothedPricesImpl) GetHistoricalSmoothedSpotPrices(marketId uint32) []uint64
GetHistoricalSmoothedPrices returns up to the last `SmoothedPriceTrackingBlockHistoryLength` smoothed prices for the given market. The returned slice is ordered from newest to oldest, and the first entry in the slice will be the most recent valid smoothed price.
func (*MarketToSmoothedPricesImpl) GetSmoothedSpotPrice ¶
func (m *MarketToSmoothedPricesImpl) GetSmoothedSpotPrice(marketId uint32) ( price uint64, ok bool, )
GetSmoothedPrice returns the smoothed price for the given market.
func (*MarketToSmoothedPricesImpl) GetSmoothedSpotPricesForTest ¶
func (m *MarketToSmoothedPricesImpl) GetSmoothedSpotPricesForTest() map[uint32]uint64
GetSmoothedPricesForTest returns a map of market ids to smoothed prices. This is primarily here for testing.
func (*MarketToSmoothedPricesImpl) PushSmoothedSpotPrice ¶
func (m *MarketToSmoothedPricesImpl) PushSmoothedSpotPrice(id uint32, price uint64)
PushSmoothedPrice sets the smoothed price for the given market.
type MsgClient ¶
type MsgClient interface { // CreateOracleMarket creates a new oracle market. CreateOracleMarket(ctx context.Context, in *MsgCreateOracleMarket, opts ...grpc.CallOption) (*MsgCreateOracleMarketResponse, error) // UpdateMarketParams allows governance to update the parameters of an // oracle market. UpdateMarketParam(ctx context.Context, in *MsgUpdateMarketParam, opts ...grpc.CallOption) (*MsgUpdateMarketParamResponse, 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 MsgCreateOracleMarket ¶
type MsgCreateOracleMarket struct { // The address that controls the module. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // `params` defines parameters for the new oracle market. Params MarketParam `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgCreateOracleMarket is a message used by x/gov for creating a new oracle market.
func (*MsgCreateOracleMarket) Descriptor ¶
func (*MsgCreateOracleMarket) Descriptor() ([]byte, []int)
func (*MsgCreateOracleMarket) GetAuthority ¶
func (m *MsgCreateOracleMarket) GetAuthority() string
func (*MsgCreateOracleMarket) GetParams ¶
func (m *MsgCreateOracleMarket) GetParams() MarketParam
func (*MsgCreateOracleMarket) Marshal ¶
func (m *MsgCreateOracleMarket) Marshal() (dAtA []byte, err error)
func (*MsgCreateOracleMarket) MarshalTo ¶
func (m *MsgCreateOracleMarket) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateOracleMarket) MarshalToSizedBuffer ¶
func (m *MsgCreateOracleMarket) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateOracleMarket) ProtoMessage ¶
func (*MsgCreateOracleMarket) ProtoMessage()
func (*MsgCreateOracleMarket) Reset ¶
func (m *MsgCreateOracleMarket) Reset()
func (*MsgCreateOracleMarket) Size ¶
func (m *MsgCreateOracleMarket) Size() (n int)
func (*MsgCreateOracleMarket) String ¶
func (m *MsgCreateOracleMarket) String() string
func (*MsgCreateOracleMarket) Unmarshal ¶
func (m *MsgCreateOracleMarket) Unmarshal(dAtA []byte) error
func (*MsgCreateOracleMarket) ValidateBasic ¶
func (msg *MsgCreateOracleMarket) ValidateBasic() error
func (*MsgCreateOracleMarket) XXX_DiscardUnknown ¶
func (m *MsgCreateOracleMarket) XXX_DiscardUnknown()
func (*MsgCreateOracleMarket) XXX_Marshal ¶
func (m *MsgCreateOracleMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateOracleMarket) XXX_Merge ¶
func (m *MsgCreateOracleMarket) XXX_Merge(src proto.Message)
func (*MsgCreateOracleMarket) XXX_Size ¶
func (m *MsgCreateOracleMarket) XXX_Size() int
func (*MsgCreateOracleMarket) XXX_Unmarshal ¶
func (m *MsgCreateOracleMarket) XXX_Unmarshal(b []byte) error
type MsgCreateOracleMarketResponse ¶
type MsgCreateOracleMarketResponse struct { }
MsgCreateOracleMarketResponse defines the CreateOracleMarket response type.
func (*MsgCreateOracleMarketResponse) Descriptor ¶
func (*MsgCreateOracleMarketResponse) Descriptor() ([]byte, []int)
func (*MsgCreateOracleMarketResponse) Marshal ¶
func (m *MsgCreateOracleMarketResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreateOracleMarketResponse) MarshalTo ¶
func (m *MsgCreateOracleMarketResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateOracleMarketResponse) MarshalToSizedBuffer ¶
func (m *MsgCreateOracleMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateOracleMarketResponse) ProtoMessage ¶
func (*MsgCreateOracleMarketResponse) ProtoMessage()
func (*MsgCreateOracleMarketResponse) Reset ¶
func (m *MsgCreateOracleMarketResponse) Reset()
func (*MsgCreateOracleMarketResponse) Size ¶
func (m *MsgCreateOracleMarketResponse) Size() (n int)
func (*MsgCreateOracleMarketResponse) String ¶
func (m *MsgCreateOracleMarketResponse) String() string
func (*MsgCreateOracleMarketResponse) Unmarshal ¶
func (m *MsgCreateOracleMarketResponse) Unmarshal(dAtA []byte) error
func (*MsgCreateOracleMarketResponse) XXX_DiscardUnknown ¶
func (m *MsgCreateOracleMarketResponse) XXX_DiscardUnknown()
func (*MsgCreateOracleMarketResponse) XXX_Marshal ¶
func (m *MsgCreateOracleMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateOracleMarketResponse) XXX_Merge ¶
func (m *MsgCreateOracleMarketResponse) XXX_Merge(src proto.Message)
func (*MsgCreateOracleMarketResponse) XXX_Size ¶
func (m *MsgCreateOracleMarketResponse) XXX_Size() int
func (*MsgCreateOracleMarketResponse) XXX_Unmarshal ¶
func (m *MsgCreateOracleMarketResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // CreateOracleMarket creates a new oracle market. CreateOracleMarket(context.Context, *MsgCreateOracleMarket) (*MsgCreateOracleMarketResponse, error) // UpdateMarketParams allows governance to update the parameters of an // oracle market. UpdateMarketParam(context.Context, *MsgUpdateMarketParam) (*MsgUpdateMarketParamResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateMarketParam ¶
type MsgUpdateMarketParam struct { Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // The market param to update. Each field must be set. MarketParam MarketParam `protobuf:"bytes,2,opt,name=market_param,json=marketParam,proto3" json:"market_param"` }
MsgUpdateMarketParam is a message used by x/gov for updating the parameters of an oracle market.
func (*MsgUpdateMarketParam) Descriptor ¶
func (*MsgUpdateMarketParam) Descriptor() ([]byte, []int)
func (*MsgUpdateMarketParam) GetAuthority ¶
func (m *MsgUpdateMarketParam) GetAuthority() string
func (*MsgUpdateMarketParam) GetMarketParam ¶
func (m *MsgUpdateMarketParam) GetMarketParam() MarketParam
func (*MsgUpdateMarketParam) Marshal ¶
func (m *MsgUpdateMarketParam) Marshal() (dAtA []byte, err error)
func (*MsgUpdateMarketParam) MarshalTo ¶
func (m *MsgUpdateMarketParam) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateMarketParam) MarshalToSizedBuffer ¶
func (m *MsgUpdateMarketParam) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateMarketParam) ProtoMessage ¶
func (*MsgUpdateMarketParam) ProtoMessage()
func (*MsgUpdateMarketParam) Reset ¶
func (m *MsgUpdateMarketParam) Reset()
func (*MsgUpdateMarketParam) Size ¶
func (m *MsgUpdateMarketParam) Size() (n int)
func (*MsgUpdateMarketParam) String ¶
func (m *MsgUpdateMarketParam) String() string
func (*MsgUpdateMarketParam) Unmarshal ¶
func (m *MsgUpdateMarketParam) Unmarshal(dAtA []byte) error
func (*MsgUpdateMarketParam) ValidateBasic ¶
func (msg *MsgUpdateMarketParam) ValidateBasic() error
func (*MsgUpdateMarketParam) XXX_DiscardUnknown ¶
func (m *MsgUpdateMarketParam) XXX_DiscardUnknown()
func (*MsgUpdateMarketParam) XXX_Marshal ¶
func (m *MsgUpdateMarketParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateMarketParam) XXX_Merge ¶
func (m *MsgUpdateMarketParam) XXX_Merge(src proto.Message)
func (*MsgUpdateMarketParam) XXX_Size ¶
func (m *MsgUpdateMarketParam) XXX_Size() int
func (*MsgUpdateMarketParam) XXX_Unmarshal ¶
func (m *MsgUpdateMarketParam) XXX_Unmarshal(b []byte) error
type MsgUpdateMarketParamResponse ¶
type MsgUpdateMarketParamResponse struct { }
MsgUpdateMarketParamResponse defines the UpdateMarketParam response type.
func (*MsgUpdateMarketParamResponse) Descriptor ¶
func (*MsgUpdateMarketParamResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateMarketParamResponse) Marshal ¶
func (m *MsgUpdateMarketParamResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateMarketParamResponse) MarshalTo ¶
func (m *MsgUpdateMarketParamResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateMarketParamResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateMarketParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateMarketParamResponse) ProtoMessage ¶
func (*MsgUpdateMarketParamResponse) ProtoMessage()
func (*MsgUpdateMarketParamResponse) Reset ¶
func (m *MsgUpdateMarketParamResponse) Reset()
func (*MsgUpdateMarketParamResponse) Size ¶
func (m *MsgUpdateMarketParamResponse) Size() (n int)
func (*MsgUpdateMarketParamResponse) String ¶
func (m *MsgUpdateMarketParamResponse) String() string
func (*MsgUpdateMarketParamResponse) Unmarshal ¶
func (m *MsgUpdateMarketParamResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateMarketParamResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateMarketParamResponse) XXX_DiscardUnknown()
func (*MsgUpdateMarketParamResponse) XXX_Marshal ¶
func (m *MsgUpdateMarketParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateMarketParamResponse) XXX_Merge ¶
func (m *MsgUpdateMarketParamResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateMarketParamResponse) XXX_Size ¶
func (m *MsgUpdateMarketParamResponse) XXX_Size() int
func (*MsgUpdateMarketParamResponse) XXX_Unmarshal ¶
func (m *MsgUpdateMarketParamResponse) XXX_Unmarshal(b []byte) error
type PricesKeeper ¶
type PricesKeeper interface { // Market related. CreateMarket( ctx sdk.Context, param MarketParam, price MarketPrice, ) (createdMarketParam MarketParam, err error) ModifyMarketParam( ctx sdk.Context, param MarketParam, ) (updatedMarketParam MarketParam, err error) UpdateSpotAndPnlMarketPrices( ctx sdk.Context, updates *MarketPriceUpdate, ) (err error) UpdatePnlPrice( ctx sdk.Context, update *MarketPnlPriceUpdate, ) (err error) UpdateSpotPrice( ctx sdk.Context, update *MarketSpotPriceUpdate, ) (err error) GetAllMarketParamPrices(ctx sdk.Context) (marketPramPrices []MarketParamPrice, err error) GetMarketParam(ctx sdk.Context, id uint32) (marketParam MarketParam, exists bool) GetMarketIdToValidIndexPrice(ctx sdk.Context) (marketIdToIndexPrice map[uint32]MarketSpotPrice) GetAllMarketParams(ctx sdk.Context) (marketParams []MarketParam) GetMarketPrice(ctx sdk.Context, id uint32) (marketPrice MarketPrice, err error) GetAllMarketPrices(ctx sdk.Context) (marketPrices []MarketPrice) HasAuthority(authority string) bool // Validation related. PerformStatefulPriceUpdateValidation( ctx sdk.Context, marketPriceUpdates *MarketPriceUpdate, ) (isSpotValid bool, isPnlValid bool) // Proposal related. UpdateSmoothedSpotPrices( ctx sdk.Context, linearInterpolateFunc func(v0 uint64, v1 uint64, ppm uint32) (uint64, error), ) error // Misc. Logger(ctx sdk.Context) log.Logger }
type QueryAllMarketParamsRequest ¶
type QueryAllMarketParamsRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QueryAllMarketParamsRequest is request type for the Query/Params `AllMarketParams` RPC method.
func (*QueryAllMarketParamsRequest) Descriptor ¶
func (*QueryAllMarketParamsRequest) Descriptor() ([]byte, []int)
func (*QueryAllMarketParamsRequest) GetPagination ¶
func (m *QueryAllMarketParamsRequest) GetPagination() *query.PageRequest
func (*QueryAllMarketParamsRequest) Marshal ¶
func (m *QueryAllMarketParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllMarketParamsRequest) MarshalTo ¶
func (m *QueryAllMarketParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllMarketParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryAllMarketParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllMarketParamsRequest) ProtoMessage ¶
func (*QueryAllMarketParamsRequest) ProtoMessage()
func (*QueryAllMarketParamsRequest) Reset ¶
func (m *QueryAllMarketParamsRequest) Reset()
func (*QueryAllMarketParamsRequest) Size ¶
func (m *QueryAllMarketParamsRequest) Size() (n int)
func (*QueryAllMarketParamsRequest) String ¶
func (m *QueryAllMarketParamsRequest) String() string
func (*QueryAllMarketParamsRequest) Unmarshal ¶
func (m *QueryAllMarketParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryAllMarketParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryAllMarketParamsRequest) XXX_DiscardUnknown()
func (*QueryAllMarketParamsRequest) XXX_Marshal ¶
func (m *QueryAllMarketParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllMarketParamsRequest) XXX_Merge ¶
func (m *QueryAllMarketParamsRequest) XXX_Merge(src proto.Message)
func (*QueryAllMarketParamsRequest) XXX_Size ¶
func (m *QueryAllMarketParamsRequest) XXX_Size() int
func (*QueryAllMarketParamsRequest) XXX_Unmarshal ¶
func (m *QueryAllMarketParamsRequest) XXX_Unmarshal(b []byte) error
type QueryAllMarketParamsResponse ¶
type QueryAllMarketParamsResponse struct { MarketParams []MarketParam `protobuf:"bytes,1,rep,name=market_params,json=marketParams,proto3" json:"market_params"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAllMarketParamsResponse is response type for the Query/Params `AllMarketParams` RPC method.
func (*QueryAllMarketParamsResponse) Descriptor ¶
func (*QueryAllMarketParamsResponse) Descriptor() ([]byte, []int)
func (*QueryAllMarketParamsResponse) GetMarketParams ¶
func (m *QueryAllMarketParamsResponse) GetMarketParams() []MarketParam
func (*QueryAllMarketParamsResponse) GetPagination ¶
func (m *QueryAllMarketParamsResponse) GetPagination() *query.PageResponse
func (*QueryAllMarketParamsResponse) Marshal ¶
func (m *QueryAllMarketParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllMarketParamsResponse) MarshalTo ¶
func (m *QueryAllMarketParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllMarketParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryAllMarketParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllMarketParamsResponse) ProtoMessage ¶
func (*QueryAllMarketParamsResponse) ProtoMessage()
func (*QueryAllMarketParamsResponse) Reset ¶
func (m *QueryAllMarketParamsResponse) Reset()
func (*QueryAllMarketParamsResponse) Size ¶
func (m *QueryAllMarketParamsResponse) Size() (n int)
func (*QueryAllMarketParamsResponse) String ¶
func (m *QueryAllMarketParamsResponse) String() string
func (*QueryAllMarketParamsResponse) Unmarshal ¶
func (m *QueryAllMarketParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryAllMarketParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryAllMarketParamsResponse) XXX_DiscardUnknown()
func (*QueryAllMarketParamsResponse) XXX_Marshal ¶
func (m *QueryAllMarketParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllMarketParamsResponse) XXX_Merge ¶
func (m *QueryAllMarketParamsResponse) XXX_Merge(src proto.Message)
func (*QueryAllMarketParamsResponse) XXX_Size ¶
func (m *QueryAllMarketParamsResponse) XXX_Size() int
func (*QueryAllMarketParamsResponse) XXX_Unmarshal ¶
func (m *QueryAllMarketParamsResponse) XXX_Unmarshal(b []byte) error
type QueryAllMarketPricesRequest ¶
type QueryAllMarketPricesRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
QueryAllMarketPricesRequest is request type for the Query/Params `AllMarketPrices` RPC method.
func (*QueryAllMarketPricesRequest) Descriptor ¶
func (*QueryAllMarketPricesRequest) Descriptor() ([]byte, []int)
func (*QueryAllMarketPricesRequest) GetPagination ¶
func (m *QueryAllMarketPricesRequest) GetPagination() *query.PageRequest
func (*QueryAllMarketPricesRequest) Marshal ¶
func (m *QueryAllMarketPricesRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllMarketPricesRequest) MarshalTo ¶
func (m *QueryAllMarketPricesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllMarketPricesRequest) MarshalToSizedBuffer ¶
func (m *QueryAllMarketPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllMarketPricesRequest) ProtoMessage ¶
func (*QueryAllMarketPricesRequest) ProtoMessage()
func (*QueryAllMarketPricesRequest) Reset ¶
func (m *QueryAllMarketPricesRequest) Reset()
func (*QueryAllMarketPricesRequest) Size ¶
func (m *QueryAllMarketPricesRequest) Size() (n int)
func (*QueryAllMarketPricesRequest) String ¶
func (m *QueryAllMarketPricesRequest) String() string
func (*QueryAllMarketPricesRequest) Unmarshal ¶
func (m *QueryAllMarketPricesRequest) Unmarshal(dAtA []byte) error
func (*QueryAllMarketPricesRequest) XXX_DiscardUnknown ¶
func (m *QueryAllMarketPricesRequest) XXX_DiscardUnknown()
func (*QueryAllMarketPricesRequest) XXX_Marshal ¶
func (m *QueryAllMarketPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllMarketPricesRequest) XXX_Merge ¶
func (m *QueryAllMarketPricesRequest) XXX_Merge(src proto.Message)
func (*QueryAllMarketPricesRequest) XXX_Size ¶
func (m *QueryAllMarketPricesRequest) XXX_Size() int
func (*QueryAllMarketPricesRequest) XXX_Unmarshal ¶
func (m *QueryAllMarketPricesRequest) XXX_Unmarshal(b []byte) error
type QueryAllMarketPricesResponse ¶
type QueryAllMarketPricesResponse struct { MarketPrices []MarketPrice `protobuf:"bytes,1,rep,name=market_prices,json=marketPrices,proto3" json:"market_prices"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAllMarketPricesResponse is response type for the Query/Params `AllMarketPrices` RPC method.
func (*QueryAllMarketPricesResponse) Descriptor ¶
func (*QueryAllMarketPricesResponse) Descriptor() ([]byte, []int)
func (*QueryAllMarketPricesResponse) GetMarketPrices ¶
func (m *QueryAllMarketPricesResponse) GetMarketPrices() []MarketPrice
func (*QueryAllMarketPricesResponse) GetPagination ¶
func (m *QueryAllMarketPricesResponse) GetPagination() *query.PageResponse
func (*QueryAllMarketPricesResponse) Marshal ¶
func (m *QueryAllMarketPricesResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllMarketPricesResponse) MarshalTo ¶
func (m *QueryAllMarketPricesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllMarketPricesResponse) MarshalToSizedBuffer ¶
func (m *QueryAllMarketPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllMarketPricesResponse) ProtoMessage ¶
func (*QueryAllMarketPricesResponse) ProtoMessage()
func (*QueryAllMarketPricesResponse) Reset ¶
func (m *QueryAllMarketPricesResponse) Reset()
func (*QueryAllMarketPricesResponse) Size ¶
func (m *QueryAllMarketPricesResponse) Size() (n int)
func (*QueryAllMarketPricesResponse) String ¶
func (m *QueryAllMarketPricesResponse) String() string
func (*QueryAllMarketPricesResponse) Unmarshal ¶
func (m *QueryAllMarketPricesResponse) Unmarshal(dAtA []byte) error
func (*QueryAllMarketPricesResponse) XXX_DiscardUnknown ¶
func (m *QueryAllMarketPricesResponse) XXX_DiscardUnknown()
func (*QueryAllMarketPricesResponse) XXX_Marshal ¶
func (m *QueryAllMarketPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllMarketPricesResponse) XXX_Merge ¶
func (m *QueryAllMarketPricesResponse) XXX_Merge(src proto.Message)
func (*QueryAllMarketPricesResponse) XXX_Size ¶
func (m *QueryAllMarketPricesResponse) XXX_Size() int
func (*QueryAllMarketPricesResponse) XXX_Unmarshal ¶
func (m *QueryAllMarketPricesResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Queries a MarketPrice by id. MarketPrice(ctx context.Context, in *QueryMarketPriceRequest, opts ...grpc.CallOption) (*QueryMarketPriceResponse, error) // Queries a list of MarketPrice items. AllMarketPrices(ctx context.Context, in *QueryAllMarketPricesRequest, opts ...grpc.CallOption) (*QueryAllMarketPricesResponse, error) // Queries a MarketParam by id. MarketParam(ctx context.Context, in *QueryMarketParamRequest, opts ...grpc.CallOption) (*QueryMarketParamResponse, error) // Queries a list of MarketParam items. AllMarketParams(ctx context.Context, in *QueryAllMarketParamsRequest, opts ...grpc.CallOption) (*QueryAllMarketParamsResponse, 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 QueryMarketParamRequest ¶
type QueryMarketParamRequest struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
QueryMarketParamsRequest is request type for the Query/Params `MarketParams` RPC method.
func (*QueryMarketParamRequest) Descriptor ¶
func (*QueryMarketParamRequest) Descriptor() ([]byte, []int)
func (*QueryMarketParamRequest) GetId ¶
func (m *QueryMarketParamRequest) GetId() uint32
func (*QueryMarketParamRequest) Marshal ¶
func (m *QueryMarketParamRequest) Marshal() (dAtA []byte, err error)
func (*QueryMarketParamRequest) MarshalTo ¶
func (m *QueryMarketParamRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryMarketParamRequest) MarshalToSizedBuffer ¶
func (m *QueryMarketParamRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryMarketParamRequest) ProtoMessage ¶
func (*QueryMarketParamRequest) ProtoMessage()
func (*QueryMarketParamRequest) Reset ¶
func (m *QueryMarketParamRequest) Reset()
func (*QueryMarketParamRequest) Size ¶
func (m *QueryMarketParamRequest) Size() (n int)
func (*QueryMarketParamRequest) String ¶
func (m *QueryMarketParamRequest) String() string
func (*QueryMarketParamRequest) Unmarshal ¶
func (m *QueryMarketParamRequest) Unmarshal(dAtA []byte) error
func (*QueryMarketParamRequest) XXX_DiscardUnknown ¶
func (m *QueryMarketParamRequest) XXX_DiscardUnknown()
func (*QueryMarketParamRequest) XXX_Marshal ¶
func (m *QueryMarketParamRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMarketParamRequest) XXX_Merge ¶
func (m *QueryMarketParamRequest) XXX_Merge(src proto.Message)
func (*QueryMarketParamRequest) XXX_Size ¶
func (m *QueryMarketParamRequest) XXX_Size() int
func (*QueryMarketParamRequest) XXX_Unmarshal ¶
func (m *QueryMarketParamRequest) XXX_Unmarshal(b []byte) error
type QueryMarketParamResponse ¶
type QueryMarketParamResponse struct {
MarketParam MarketParam `protobuf:"bytes,1,opt,name=market_param,json=marketParam,proto3" json:"market_param"`
}
QueryMarketParamResponse is response type for the Query/Params `MarketParams` RPC method.
func (*QueryMarketParamResponse) Descriptor ¶
func (*QueryMarketParamResponse) Descriptor() ([]byte, []int)
func (*QueryMarketParamResponse) GetMarketParam ¶
func (m *QueryMarketParamResponse) GetMarketParam() MarketParam
func (*QueryMarketParamResponse) Marshal ¶
func (m *QueryMarketParamResponse) Marshal() (dAtA []byte, err error)
func (*QueryMarketParamResponse) MarshalTo ¶
func (m *QueryMarketParamResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryMarketParamResponse) MarshalToSizedBuffer ¶
func (m *QueryMarketParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryMarketParamResponse) ProtoMessage ¶
func (*QueryMarketParamResponse) ProtoMessage()
func (*QueryMarketParamResponse) Reset ¶
func (m *QueryMarketParamResponse) Reset()
func (*QueryMarketParamResponse) Size ¶
func (m *QueryMarketParamResponse) Size() (n int)
func (*QueryMarketParamResponse) String ¶
func (m *QueryMarketParamResponse) String() string
func (*QueryMarketParamResponse) Unmarshal ¶
func (m *QueryMarketParamResponse) Unmarshal(dAtA []byte) error
func (*QueryMarketParamResponse) XXX_DiscardUnknown ¶
func (m *QueryMarketParamResponse) XXX_DiscardUnknown()
func (*QueryMarketParamResponse) XXX_Marshal ¶
func (m *QueryMarketParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMarketParamResponse) XXX_Merge ¶
func (m *QueryMarketParamResponse) XXX_Merge(src proto.Message)
func (*QueryMarketParamResponse) XXX_Size ¶
func (m *QueryMarketParamResponse) XXX_Size() int
func (*QueryMarketParamResponse) XXX_Unmarshal ¶
func (m *QueryMarketParamResponse) XXX_Unmarshal(b []byte) error
type QueryMarketPriceRequest ¶
type QueryMarketPriceRequest struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
QueryMarketPriceRequest is request type for the Query/Params `MarketPrice` RPC method.
func (*QueryMarketPriceRequest) Descriptor ¶
func (*QueryMarketPriceRequest) Descriptor() ([]byte, []int)
func (*QueryMarketPriceRequest) GetId ¶
func (m *QueryMarketPriceRequest) GetId() uint32
func (*QueryMarketPriceRequest) Marshal ¶
func (m *QueryMarketPriceRequest) Marshal() (dAtA []byte, err error)
func (*QueryMarketPriceRequest) MarshalTo ¶
func (m *QueryMarketPriceRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryMarketPriceRequest) MarshalToSizedBuffer ¶
func (m *QueryMarketPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryMarketPriceRequest) ProtoMessage ¶
func (*QueryMarketPriceRequest) ProtoMessage()
func (*QueryMarketPriceRequest) Reset ¶
func (m *QueryMarketPriceRequest) Reset()
func (*QueryMarketPriceRequest) Size ¶
func (m *QueryMarketPriceRequest) Size() (n int)
func (*QueryMarketPriceRequest) String ¶
func (m *QueryMarketPriceRequest) String() string
func (*QueryMarketPriceRequest) Unmarshal ¶
func (m *QueryMarketPriceRequest) Unmarshal(dAtA []byte) error
func (*QueryMarketPriceRequest) XXX_DiscardUnknown ¶
func (m *QueryMarketPriceRequest) XXX_DiscardUnknown()
func (*QueryMarketPriceRequest) XXX_Marshal ¶
func (m *QueryMarketPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMarketPriceRequest) XXX_Merge ¶
func (m *QueryMarketPriceRequest) XXX_Merge(src proto.Message)
func (*QueryMarketPriceRequest) XXX_Size ¶
func (m *QueryMarketPriceRequest) XXX_Size() int
func (*QueryMarketPriceRequest) XXX_Unmarshal ¶
func (m *QueryMarketPriceRequest) XXX_Unmarshal(b []byte) error
type QueryMarketPriceResponse ¶
type QueryMarketPriceResponse struct {
MarketPrice MarketPrice `protobuf:"bytes,1,opt,name=market_price,json=marketPrice,proto3" json:"market_price"`
}
QueryMarketPriceResponse is response type for the Query/Params `MarketPrice` RPC method.
func (*QueryMarketPriceResponse) Descriptor ¶
func (*QueryMarketPriceResponse) Descriptor() ([]byte, []int)
func (*QueryMarketPriceResponse) GetMarketPrice ¶
func (m *QueryMarketPriceResponse) GetMarketPrice() MarketPrice
func (*QueryMarketPriceResponse) Marshal ¶
func (m *QueryMarketPriceResponse) Marshal() (dAtA []byte, err error)
func (*QueryMarketPriceResponse) MarshalTo ¶
func (m *QueryMarketPriceResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryMarketPriceResponse) MarshalToSizedBuffer ¶
func (m *QueryMarketPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryMarketPriceResponse) ProtoMessage ¶
func (*QueryMarketPriceResponse) ProtoMessage()
func (*QueryMarketPriceResponse) Reset ¶
func (m *QueryMarketPriceResponse) Reset()
func (*QueryMarketPriceResponse) Size ¶
func (m *QueryMarketPriceResponse) Size() (n int)
func (*QueryMarketPriceResponse) String ¶
func (m *QueryMarketPriceResponse) String() string
func (*QueryMarketPriceResponse) Unmarshal ¶
func (m *QueryMarketPriceResponse) Unmarshal(dAtA []byte) error
func (*QueryMarketPriceResponse) XXX_DiscardUnknown ¶
func (m *QueryMarketPriceResponse) XXX_DiscardUnknown()
func (*QueryMarketPriceResponse) XXX_Marshal ¶
func (m *QueryMarketPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryMarketPriceResponse) XXX_Merge ¶
func (m *QueryMarketPriceResponse) XXX_Merge(src proto.Message)
func (*QueryMarketPriceResponse) XXX_Size ¶
func (m *QueryMarketPriceResponse) XXX_Size() int
func (*QueryMarketPriceResponse) XXX_Unmarshal ¶
func (m *QueryMarketPriceResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Queries a MarketPrice by id. MarketPrice(context.Context, *QueryMarketPriceRequest) (*QueryMarketPriceResponse, error) // Queries a list of MarketPrice items. AllMarketPrices(context.Context, *QueryAllMarketPricesRequest) (*QueryAllMarketPricesResponse, error) // Queries a MarketParam by id. MarketParam(context.Context, *QueryMarketParamRequest) (*QueryMarketParamResponse, error) // Queries a list of MarketParam items. AllMarketParams(context.Context, *QueryAllMarketParamsRequest) (*QueryAllMarketParamsResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) CreateOracleMarket ¶
func (*UnimplementedMsgServer) CreateOracleMarket(ctx context.Context, req *MsgCreateOracleMarket) (*MsgCreateOracleMarketResponse, error)
func (*UnimplementedMsgServer) UpdateMarketParam ¶
func (*UnimplementedMsgServer) UpdateMarketParam(ctx context.Context, req *MsgUpdateMarketParam) (*MsgUpdateMarketParamResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) AllMarketParams ¶
func (*UnimplementedQueryServer) AllMarketParams(ctx context.Context, req *QueryAllMarketParamsRequest) (*QueryAllMarketParamsResponse, error)
func (*UnimplementedQueryServer) AllMarketPrices ¶
func (*UnimplementedQueryServer) AllMarketPrices(ctx context.Context, req *QueryAllMarketPricesRequest) (*QueryAllMarketPricesResponse, error)
func (*UnimplementedQueryServer) MarketParam ¶
func (*UnimplementedQueryServer) MarketParam(ctx context.Context, req *QueryMarketParamRequest) (*QueryMarketParamResponse, error)
func (*UnimplementedQueryServer) MarketPrice ¶
func (*UnimplementedQueryServer) MarketPrice(ctx context.Context, req *QueryMarketPriceRequest) (*QueryMarketPriceResponse, error)
Source Files ¶
- codec.go
- configs.go
- errors.go
- expected_keepers.go
- genesis.go
- genesis.pb.go
- keys.go
- market_param.go
- market_param.pb.go
- market_param_price.go
- market_price.go
- market_price.pb.go
- market_to_smoothed_prices.go
- message_create_oracle_market.go
- message_update_market_param.go
- propose_price.go
- query.pb.go
- query.pb.gw.go
- tx.pb.go
- types.go