types

package
v0.4.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2023 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	MarketIsRecentDuration          = 20 * time.Second
	PriceDaemonInitializationBlocks = 20
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "prices"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName
)

Module name and store keys

View Source
const (
	// MarketParamKeyPrefix is the prefix to retrieve all MarketParams
	MarketParamKeyPrefix = "Param:"

	// MarketPriceKeyPrefix is the prefix to retrieve all MarketPrices
	MarketPriceKeyPrefix = "Price:"
)

State

View Source
const (
	PriceSmoothingPpm = uint32(300_000)
)
View Source
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

View Source
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",
	)
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMarketParam        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMarketParam          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMarketParam = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMarketPrice        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMarketPrice          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMarketPrice = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = 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 RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations.

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

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) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *MarketParam) MarshalTo(dAtA []byte) (int, 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 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 variable value that is updated by oracle price updates. `0` if it has
	// never been updated, `>0` otherwise.
	Price uint64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"`
}

MarketPrice is used by the application to store/retrieve oracle price.

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) GetPrice

func (m *MarketPrice) GetPrice() uint64

func (*MarketPrice) Marshal

func (m *MarketPrice) Marshal() (dAtA []byte, err error)

func (*MarketPrice) MarshalTo

func (m *MarketPrice) MarshalTo(dAtA []byte) (int, 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 MarketToSmoothedPrices

type MarketToSmoothedPrices interface {
	GetSmoothedPrice(marketId uint32) (price uint64, ok bool)
	GetSmoothedPricesForTest() map[uint32]uint64
	GetHistoricalSmoothedPrices(marketId uint32) []uint64
	PushSmoothedPrice(marketId uint32, price uint64)
}

MarketToSmoothedPrices tracks current and historical exponentially smoothed prices for each market.

func NewMarketToSmoothedPrices

func NewMarketToSmoothedPrices(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) GetHistoricalSmoothedPrices

func (m *MarketToSmoothedPricesImpl) GetHistoricalSmoothedPrices(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) GetSmoothedPrice

func (m *MarketToSmoothedPricesImpl) GetSmoothedPrice(marketId uint32) (
	price uint64,
	ok bool,
)

GetSmoothedPrice returns the smoothed price for the given market.

func (*MarketToSmoothedPricesImpl) GetSmoothedPricesForTest

func (m *MarketToSmoothedPricesImpl) GetSmoothedPricesForTest() map[uint32]uint64

GetSmoothedPricesForTest returns a map of market ids to smoothed prices. This is primarily here for testing.

func (*MarketToSmoothedPricesImpl) PushSmoothedPrice

func (m *MarketToSmoothedPricesImpl) PushSmoothedPrice(id uint32, price uint64)

PushSmoothedPrice sets the smoothed price for the given market.

type MsgClient

type MsgClient interface {
	// UpdateMarketPrices updates the oracle price of a market relative to
	// quoteCurrency.
	UpdateMarketPrices(ctx context.Context, in *MsgUpdateMarketPrices, opts ...grpc.CallOption) (*MsgUpdateMarketPricesResponse, error)
	// 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) GetSigners

func (msg *MsgCreateOracleMarket) GetSigners() []sdk.AccAddress

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 (*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 {
	// UpdateMarketPrices updates the oracle price of a market relative to
	// quoteCurrency.
	UpdateMarketPrices(context.Context, *MsgUpdateMarketPrices) (*MsgUpdateMarketPricesResponse, error)
	// 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 added in v0.3.0

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 added in v0.3.0

func (*MsgUpdateMarketParam) Descriptor() ([]byte, []int)

func (*MsgUpdateMarketParam) GetAuthority added in v0.3.0

func (m *MsgUpdateMarketParam) GetAuthority() string

func (*MsgUpdateMarketParam) GetMarketParam added in v0.3.0

func (m *MsgUpdateMarketParam) GetMarketParam() MarketParam

func (*MsgUpdateMarketParam) GetSigners added in v0.3.0

func (msg *MsgUpdateMarketParam) GetSigners() []sdk.AccAddress

func (*MsgUpdateMarketParam) Marshal added in v0.3.0

func (m *MsgUpdateMarketParam) Marshal() (dAtA []byte, err error)

func (*MsgUpdateMarketParam) MarshalTo added in v0.3.0

func (m *MsgUpdateMarketParam) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateMarketParam) MarshalToSizedBuffer added in v0.3.0

func (m *MsgUpdateMarketParam) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateMarketParam) ProtoMessage added in v0.3.0

func (*MsgUpdateMarketParam) ProtoMessage()

func (*MsgUpdateMarketParam) Reset added in v0.3.0

func (m *MsgUpdateMarketParam) Reset()

func (*MsgUpdateMarketParam) Size added in v0.3.0

func (m *MsgUpdateMarketParam) Size() (n int)

func (*MsgUpdateMarketParam) String added in v0.3.0

func (m *MsgUpdateMarketParam) String() string

func (*MsgUpdateMarketParam) Unmarshal added in v0.3.0

func (m *MsgUpdateMarketParam) Unmarshal(dAtA []byte) error

func (*MsgUpdateMarketParam) ValidateBasic added in v0.3.0

func (msg *MsgUpdateMarketParam) ValidateBasic() error

func (*MsgUpdateMarketParam) XXX_DiscardUnknown added in v0.3.0

func (m *MsgUpdateMarketParam) XXX_DiscardUnknown()

func (*MsgUpdateMarketParam) XXX_Marshal added in v0.3.0

func (m *MsgUpdateMarketParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateMarketParam) XXX_Merge added in v0.3.0

func (m *MsgUpdateMarketParam) XXX_Merge(src proto.Message)

func (*MsgUpdateMarketParam) XXX_Size added in v0.3.0

func (m *MsgUpdateMarketParam) XXX_Size() int

func (*MsgUpdateMarketParam) XXX_Unmarshal added in v0.3.0

func (m *MsgUpdateMarketParam) XXX_Unmarshal(b []byte) error

type MsgUpdateMarketParamResponse added in v0.3.0

type MsgUpdateMarketParamResponse struct {
}

MsgUpdateMarketParamResponse defines the UpdateMarketParam response type.

func (*MsgUpdateMarketParamResponse) Descriptor added in v0.3.0

func (*MsgUpdateMarketParamResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateMarketParamResponse) Marshal added in v0.3.0

func (m *MsgUpdateMarketParamResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateMarketParamResponse) MarshalTo added in v0.3.0

func (m *MsgUpdateMarketParamResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateMarketParamResponse) MarshalToSizedBuffer added in v0.3.0

func (m *MsgUpdateMarketParamResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateMarketParamResponse) ProtoMessage added in v0.3.0

func (*MsgUpdateMarketParamResponse) ProtoMessage()

func (*MsgUpdateMarketParamResponse) Reset added in v0.3.0

func (m *MsgUpdateMarketParamResponse) Reset()

func (*MsgUpdateMarketParamResponse) Size added in v0.3.0

func (m *MsgUpdateMarketParamResponse) Size() (n int)

func (*MsgUpdateMarketParamResponse) String added in v0.3.0

func (*MsgUpdateMarketParamResponse) Unmarshal added in v0.3.0

func (m *MsgUpdateMarketParamResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateMarketParamResponse) XXX_DiscardUnknown added in v0.3.0

func (m *MsgUpdateMarketParamResponse) XXX_DiscardUnknown()

func (*MsgUpdateMarketParamResponse) XXX_Marshal added in v0.3.0

func (m *MsgUpdateMarketParamResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateMarketParamResponse) XXX_Merge added in v0.3.0

func (m *MsgUpdateMarketParamResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateMarketParamResponse) XXX_Size added in v0.3.0

func (m *MsgUpdateMarketParamResponse) XXX_Size() int

func (*MsgUpdateMarketParamResponse) XXX_Unmarshal added in v0.3.0

func (m *MsgUpdateMarketParamResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateMarketPrices

type MsgUpdateMarketPrices struct {
	MarketPriceUpdates []*MsgUpdateMarketPrices_MarketPrice `protobuf:"bytes,1,rep,name=market_price_updates,json=marketPriceUpdates,proto3" json:"market_price_updates,omitempty"`
}

MsgUpdateMarketPrices is a request type for the UpdateMarketPrices method.

func (*MsgUpdateMarketPrices) Descriptor

func (*MsgUpdateMarketPrices) Descriptor() ([]byte, []int)

func (*MsgUpdateMarketPrices) GetMarketPriceUpdates

func (m *MsgUpdateMarketPrices) GetMarketPriceUpdates() []*MsgUpdateMarketPrices_MarketPrice

func (*MsgUpdateMarketPrices) GetSigners

func (msg *MsgUpdateMarketPrices) GetSigners() []sdk.AccAddress

func (*MsgUpdateMarketPrices) Marshal

func (m *MsgUpdateMarketPrices) Marshal() (dAtA []byte, err error)

func (*MsgUpdateMarketPrices) MarshalTo

func (m *MsgUpdateMarketPrices) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateMarketPrices) MarshalToSizedBuffer

func (m *MsgUpdateMarketPrices) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateMarketPrices) ProtoMessage

func (*MsgUpdateMarketPrices) ProtoMessage()

func (*MsgUpdateMarketPrices) Reset

func (m *MsgUpdateMarketPrices) Reset()

func (*MsgUpdateMarketPrices) Size

func (m *MsgUpdateMarketPrices) Size() (n int)

func (*MsgUpdateMarketPrices) String

func (m *MsgUpdateMarketPrices) String() string

func (*MsgUpdateMarketPrices) Unmarshal

func (m *MsgUpdateMarketPrices) Unmarshal(dAtA []byte) error

func (*MsgUpdateMarketPrices) ValidateBasic

func (msg *MsgUpdateMarketPrices) ValidateBasic() error

ValidateBasic performs stateless validations on the message. Specifically: - Update prices are non-zero. - Updates are sorted by market id in ascending order. - Updates do not contain duplicate markets.

func (*MsgUpdateMarketPrices) XXX_DiscardUnknown

func (m *MsgUpdateMarketPrices) XXX_DiscardUnknown()

func (*MsgUpdateMarketPrices) XXX_Marshal

func (m *MsgUpdateMarketPrices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateMarketPrices) XXX_Merge

func (m *MsgUpdateMarketPrices) XXX_Merge(src proto.Message)

func (*MsgUpdateMarketPrices) XXX_Size

func (m *MsgUpdateMarketPrices) XXX_Size() int

func (*MsgUpdateMarketPrices) XXX_Unmarshal

func (m *MsgUpdateMarketPrices) XXX_Unmarshal(b []byte) error

type MsgUpdateMarketPricesResponse

type MsgUpdateMarketPricesResponse struct {
}

MsgUpdateMarketPricesResponse defines the MsgUpdateMarketPrices response type.

func (*MsgUpdateMarketPricesResponse) Descriptor

func (*MsgUpdateMarketPricesResponse) Descriptor() ([]byte, []int)

func (*MsgUpdateMarketPricesResponse) Marshal

func (m *MsgUpdateMarketPricesResponse) Marshal() (dAtA []byte, err error)

func (*MsgUpdateMarketPricesResponse) MarshalTo

func (m *MsgUpdateMarketPricesResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateMarketPricesResponse) MarshalToSizedBuffer

func (m *MsgUpdateMarketPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateMarketPricesResponse) ProtoMessage

func (*MsgUpdateMarketPricesResponse) ProtoMessage()

func (*MsgUpdateMarketPricesResponse) Reset

func (m *MsgUpdateMarketPricesResponse) Reset()

func (*MsgUpdateMarketPricesResponse) Size

func (m *MsgUpdateMarketPricesResponse) Size() (n int)

func (*MsgUpdateMarketPricesResponse) String

func (*MsgUpdateMarketPricesResponse) Unmarshal

func (m *MsgUpdateMarketPricesResponse) Unmarshal(dAtA []byte) error

func (*MsgUpdateMarketPricesResponse) XXX_DiscardUnknown

func (m *MsgUpdateMarketPricesResponse) XXX_DiscardUnknown()

func (*MsgUpdateMarketPricesResponse) XXX_Marshal

func (m *MsgUpdateMarketPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateMarketPricesResponse) XXX_Merge

func (m *MsgUpdateMarketPricesResponse) XXX_Merge(src proto.Message)

func (*MsgUpdateMarketPricesResponse) XXX_Size

func (m *MsgUpdateMarketPricesResponse) XXX_Size() int

func (*MsgUpdateMarketPricesResponse) XXX_Unmarshal

func (m *MsgUpdateMarketPricesResponse) XXX_Unmarshal(b []byte) error

type MsgUpdateMarketPrices_MarketPrice

type MsgUpdateMarketPrices_MarketPrice 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 price
	Price uint64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"`
}

MarketPrice represents a price update for a single market

func NewMarketPriceUpdate

func NewMarketPriceUpdate(id uint32, price uint64) *MsgUpdateMarketPrices_MarketPrice

func (*MsgUpdateMarketPrices_MarketPrice) Descriptor

func (*MsgUpdateMarketPrices_MarketPrice) Descriptor() ([]byte, []int)

func (*MsgUpdateMarketPrices_MarketPrice) GetMarketId

func (m *MsgUpdateMarketPrices_MarketPrice) GetMarketId() uint32

func (*MsgUpdateMarketPrices_MarketPrice) GetPrice

func (*MsgUpdateMarketPrices_MarketPrice) Marshal

func (m *MsgUpdateMarketPrices_MarketPrice) Marshal() (dAtA []byte, err error)

func (*MsgUpdateMarketPrices_MarketPrice) MarshalTo

func (m *MsgUpdateMarketPrices_MarketPrice) MarshalTo(dAtA []byte) (int, error)

func (*MsgUpdateMarketPrices_MarketPrice) MarshalToSizedBuffer

func (m *MsgUpdateMarketPrices_MarketPrice) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgUpdateMarketPrices_MarketPrice) ProtoMessage

func (*MsgUpdateMarketPrices_MarketPrice) ProtoMessage()

func (*MsgUpdateMarketPrices_MarketPrice) Reset

func (*MsgUpdateMarketPrices_MarketPrice) Size

func (m *MsgUpdateMarketPrices_MarketPrice) Size() (n int)

func (*MsgUpdateMarketPrices_MarketPrice) String

func (*MsgUpdateMarketPrices_MarketPrice) Unmarshal

func (m *MsgUpdateMarketPrices_MarketPrice) Unmarshal(dAtA []byte) error

func (*MsgUpdateMarketPrices_MarketPrice) XXX_DiscardUnknown

func (m *MsgUpdateMarketPrices_MarketPrice) XXX_DiscardUnknown()

func (*MsgUpdateMarketPrices_MarketPrice) XXX_Marshal

func (m *MsgUpdateMarketPrices_MarketPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgUpdateMarketPrices_MarketPrice) XXX_Merge

func (*MsgUpdateMarketPrices_MarketPrice) XXX_Size

func (m *MsgUpdateMarketPrices_MarketPrice) XXX_Size() int

func (*MsgUpdateMarketPrices_MarketPrice) XXX_Unmarshal

func (m *MsgUpdateMarketPrices_MarketPrice) 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)

	UpdateMarketPrices(
		ctx sdk.Context,
		updates []*MsgUpdateMarketPrices_MarketPrice,
	) (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]MarketPrice)
	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 *MsgUpdateMarketPrices,
		performNonDeterministicValidation bool,
	) error

	// Proposal related.
	UpdateSmoothedPrices(
		ctx sdk.Context,
	) 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 (*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 (*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) UpdateMarketParam added in v0.3.0

func (*UnimplementedMsgServer) UpdateMarketPrices

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AllMarketParams

func (*UnimplementedQueryServer) AllMarketPrices

func (*UnimplementedQueryServer) MarketParam

func (*UnimplementedQueryServer) MarketPrice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL