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 EpochsKeeper
- type FundingPremium
- func (*FundingPremium) Descriptor() ([]byte, []int)
- func (m *FundingPremium) GetPerpetualId() uint32
- func (m *FundingPremium) GetPremiumPpm() int32
- func (m *FundingPremium) Marshal() (dAtA []byte, err error)
- func (m *FundingPremium) MarshalTo(dAtA []byte) (int, error)
- func (m *FundingPremium) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FundingPremium) ProtoMessage()
- func (m *FundingPremium) Reset()
- func (m *FundingPremium) Size() (n int)
- func (m *FundingPremium) String() string
- func (m *FundingPremium) Unmarshal(dAtA []byte) error
- func (m *FundingPremium) XXX_DiscardUnknown()
- func (m *FundingPremium) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FundingPremium) XXX_Merge(src proto.Message)
- func (m *FundingPremium) XXX_Size() int
- func (m *FundingPremium) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetLiquidityTiers() []LiquidityTier
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetPerpetuals() []Perpetual
- 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 GetPricePremiumParams
- type LiquidityTier
- func (*LiquidityTier) Descriptor() ([]byte, []int)
- func (m *LiquidityTier) GetBasePositionNotional() uint64deprecated
- func (m *LiquidityTier) GetId() uint32
- func (m *LiquidityTier) GetImpactNotional() uint64
- func (m *LiquidityTier) GetInitialMarginPpm() uint32
- func (liquidityTier LiquidityTier) GetInitialMarginQuoteQuantums(bigQuoteQuantums *big.Int, openInterestQuoteQuantums *big.Int) *big.Int
- func (m *LiquidityTier) GetMaintenanceFractionPpm() uint32
- func (liquidityTier LiquidityTier) GetMaintenanceMarginPpm() uint32
- func (liquidityTier LiquidityTier) GetMaxAbsFundingClampPpm(clampFactorPpm uint32) *big.Int
- func (m *LiquidityTier) GetName() string
- func (m *LiquidityTier) GetOpenInterestLowerCap() uint64
- func (m *LiquidityTier) GetOpenInterestUpperCap() uint64
- func (m *LiquidityTier) Marshal() (dAtA []byte, err error)
- func (m *LiquidityTier) MarshalTo(dAtA []byte) (int, error)
- func (m *LiquidityTier) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LiquidityTier) ProtoMessage()
- func (m *LiquidityTier) Reset()
- func (m *LiquidityTier) Size() (n int)
- func (m *LiquidityTier) String() string
- func (m *LiquidityTier) Unmarshal(dAtA []byte) error
- func (liquidityTier LiquidityTier) Validate() error
- func (m *LiquidityTier) XXX_DiscardUnknown()
- func (m *LiquidityTier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LiquidityTier) XXX_Merge(src proto.Message)
- func (m *LiquidityTier) XXX_Size() int
- func (m *LiquidityTier) XXX_Unmarshal(b []byte) error
- type MarketPremiums
- func (*MarketPremiums) Descriptor() ([]byte, []int)
- func (m *MarketPremiums) GetPerpetualId() uint32
- func (m *MarketPremiums) GetPremiums() []int32
- func (m *MarketPremiums) Marshal() (dAtA []byte, err error)
- func (m *MarketPremiums) MarshalTo(dAtA []byte) (int, error)
- func (m *MarketPremiums) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MarketPremiums) ProtoMessage()
- func (m *MarketPremiums) Reset()
- func (m *MarketPremiums) Size() (n int)
- func (m *MarketPremiums) String() string
- func (m *MarketPremiums) Unmarshal(dAtA []byte) error
- func (m *MarketPremiums) XXX_DiscardUnknown()
- func (m *MarketPremiums) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MarketPremiums) XXX_Merge(src proto.Message)
- func (m *MarketPremiums) XXX_Size() int
- func (m *MarketPremiums) XXX_Unmarshal(b []byte) error
- type MsgAddPremiumVotes
- func (*MsgAddPremiumVotes) Descriptor() ([]byte, []int)
- func (m *MsgAddPremiumVotes) GetVotes() []FundingPremium
- func (m *MsgAddPremiumVotes) Marshal() (dAtA []byte, err error)
- func (m *MsgAddPremiumVotes) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgAddPremiumVotes) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgAddPremiumVotes) ProtoMessage()
- func (m *MsgAddPremiumVotes) Reset()
- func (m *MsgAddPremiumVotes) Size() (n int)
- func (m *MsgAddPremiumVotes) String() string
- func (m *MsgAddPremiumVotes) Unmarshal(dAtA []byte) error
- func (msg *MsgAddPremiumVotes) ValidateBasic() error
- func (m *MsgAddPremiumVotes) XXX_DiscardUnknown()
- func (m *MsgAddPremiumVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgAddPremiumVotes) XXX_Merge(src proto.Message)
- func (m *MsgAddPremiumVotes) XXX_Size() int
- func (m *MsgAddPremiumVotes) XXX_Unmarshal(b []byte) error
- type MsgAddPremiumVotesResponse
- func (*MsgAddPremiumVotesResponse) Descriptor() ([]byte, []int)
- func (m *MsgAddPremiumVotesResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgAddPremiumVotesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgAddPremiumVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgAddPremiumVotesResponse) ProtoMessage()
- func (m *MsgAddPremiumVotesResponse) Reset()
- func (m *MsgAddPremiumVotesResponse) Size() (n int)
- func (m *MsgAddPremiumVotesResponse) String() string
- func (m *MsgAddPremiumVotesResponse) Unmarshal(dAtA []byte) error
- func (m *MsgAddPremiumVotesResponse) XXX_DiscardUnknown()
- func (m *MsgAddPremiumVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgAddPremiumVotesResponse) XXX_Merge(src proto.Message)
- func (m *MsgAddPremiumVotesResponse) XXX_Size() int
- func (m *MsgAddPremiumVotesResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgCreatePerpetual
- func (*MsgCreatePerpetual) Descriptor() ([]byte, []int)
- func (m *MsgCreatePerpetual) GetAuthority() string
- func (m *MsgCreatePerpetual) GetParams() PerpetualParams
- func (m *MsgCreatePerpetual) Marshal() (dAtA []byte, err error)
- func (m *MsgCreatePerpetual) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreatePerpetual) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreatePerpetual) ProtoMessage()
- func (m *MsgCreatePerpetual) Reset()
- func (m *MsgCreatePerpetual) Size() (n int)
- func (m *MsgCreatePerpetual) String() string
- func (m *MsgCreatePerpetual) Unmarshal(dAtA []byte) error
- func (msg *MsgCreatePerpetual) ValidateBasic() error
- func (m *MsgCreatePerpetual) XXX_DiscardUnknown()
- func (m *MsgCreatePerpetual) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreatePerpetual) XXX_Merge(src proto.Message)
- func (m *MsgCreatePerpetual) XXX_Size() int
- func (m *MsgCreatePerpetual) XXX_Unmarshal(b []byte) error
- type MsgCreatePerpetualResponse
- func (*MsgCreatePerpetualResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreatePerpetualResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreatePerpetualResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreatePerpetualResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreatePerpetualResponse) ProtoMessage()
- func (m *MsgCreatePerpetualResponse) Reset()
- func (m *MsgCreatePerpetualResponse) Size() (n int)
- func (m *MsgCreatePerpetualResponse) String() string
- func (m *MsgCreatePerpetualResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreatePerpetualResponse) XXX_DiscardUnknown()
- func (m *MsgCreatePerpetualResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreatePerpetualResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreatePerpetualResponse) XXX_Size() int
- func (m *MsgCreatePerpetualResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgSetLiquidityTier
- func (*MsgSetLiquidityTier) Descriptor() ([]byte, []int)
- func (m *MsgSetLiquidityTier) GetAuthority() string
- func (m *MsgSetLiquidityTier) GetLiquidityTier() LiquidityTier
- func (m *MsgSetLiquidityTier) Marshal() (dAtA []byte, err error)
- func (m *MsgSetLiquidityTier) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSetLiquidityTier) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSetLiquidityTier) ProtoMessage()
- func (m *MsgSetLiquidityTier) Reset()
- func (m *MsgSetLiquidityTier) Size() (n int)
- func (m *MsgSetLiquidityTier) String() string
- func (m *MsgSetLiquidityTier) Unmarshal(dAtA []byte) error
- func (msg *MsgSetLiquidityTier) ValidateBasic() error
- func (m *MsgSetLiquidityTier) XXX_DiscardUnknown()
- func (m *MsgSetLiquidityTier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSetLiquidityTier) XXX_Merge(src proto.Message)
- func (m *MsgSetLiquidityTier) XXX_Size() int
- func (m *MsgSetLiquidityTier) XXX_Unmarshal(b []byte) error
- type MsgSetLiquidityTierResponse
- func (*MsgSetLiquidityTierResponse) Descriptor() ([]byte, []int)
- func (m *MsgSetLiquidityTierResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSetLiquidityTierResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSetLiquidityTierResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSetLiquidityTierResponse) ProtoMessage()
- func (m *MsgSetLiquidityTierResponse) Reset()
- func (m *MsgSetLiquidityTierResponse) Size() (n int)
- func (m *MsgSetLiquidityTierResponse) String() string
- func (m *MsgSetLiquidityTierResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSetLiquidityTierResponse) XXX_DiscardUnknown()
- func (m *MsgSetLiquidityTierResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSetLiquidityTierResponse) XXX_Merge(src proto.Message)
- func (m *MsgSetLiquidityTierResponse) XXX_Size() int
- func (m *MsgSetLiquidityTierResponse) XXX_Unmarshal(b []byte) error
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdateParams) ValidateBasic() error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type MsgUpdatePerpetualParams
- func (*MsgUpdatePerpetualParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdatePerpetualParams) GetAuthority() string
- func (m *MsgUpdatePerpetualParams) GetPerpetualParams() PerpetualParams
- func (m *MsgUpdatePerpetualParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdatePerpetualParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdatePerpetualParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdatePerpetualParams) ProtoMessage()
- func (m *MsgUpdatePerpetualParams) Reset()
- func (m *MsgUpdatePerpetualParams) Size() (n int)
- func (m *MsgUpdatePerpetualParams) String() string
- func (m *MsgUpdatePerpetualParams) Unmarshal(dAtA []byte) error
- func (msg *MsgUpdatePerpetualParams) ValidateBasic() error
- func (m *MsgUpdatePerpetualParams) XXX_DiscardUnknown()
- func (m *MsgUpdatePerpetualParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdatePerpetualParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdatePerpetualParams) XXX_Size() int
- func (m *MsgUpdatePerpetualParams) XXX_Unmarshal(b []byte) error
- type MsgUpdatePerpetualParamsResponse
- func (*MsgUpdatePerpetualParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdatePerpetualParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdatePerpetualParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdatePerpetualParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdatePerpetualParamsResponse) ProtoMessage()
- func (m *MsgUpdatePerpetualParamsResponse) Reset()
- func (m *MsgUpdatePerpetualParamsResponse) Size() (n int)
- func (m *MsgUpdatePerpetualParamsResponse) String() string
- func (m *MsgUpdatePerpetualParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdatePerpetualParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdatePerpetualParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdatePerpetualParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdatePerpetualParamsResponse) XXX_Size() int
- func (m *MsgUpdatePerpetualParamsResponse) XXX_Unmarshal(b []byte) error
- type OpenInterestDelta
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetFundingRateClampFactorPpm() uint32
- func (m *Params) GetMinNumVotesPerSample() uint32
- func (m *Params) GetPremiumVoteClampFactorPpm() uint32
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (params Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type Perpetual
- func (*Perpetual) Descriptor() ([]byte, []int)
- func (p *Perpetual) GetId() uint32
- func (m *Perpetual) GetParams() PerpetualParams
- func (m *Perpetual) Marshal() (dAtA []byte, err error)
- func (m *Perpetual) MarshalTo(dAtA []byte) (int, error)
- func (m *Perpetual) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Perpetual) ProtoMessage()
- func (m *Perpetual) Reset()
- func (m *Perpetual) Size() (n int)
- func (m *Perpetual) String() string
- func (m *Perpetual) Unmarshal(dAtA []byte) error
- func (m *Perpetual) XXX_DiscardUnknown()
- func (m *Perpetual) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Perpetual) XXX_Merge(src proto.Message)
- func (m *Perpetual) XXX_Size() int
- func (m *Perpetual) XXX_Unmarshal(b []byte) error
- type PerpetualMarketType
- type PerpetualParams
- func (*PerpetualParams) Descriptor() ([]byte, []int)
- func (m *PerpetualParams) GetAtomicResolution() int32
- func (m *PerpetualParams) GetDefaultFundingPpm() int32
- func (m *PerpetualParams) GetId() uint32
- func (m *PerpetualParams) GetLiquidityTier() uint32
- func (m *PerpetualParams) GetMarketId() uint32
- func (m *PerpetualParams) GetMarketType() PerpetualMarketType
- func (m *PerpetualParams) GetTicker() string
- func (m *PerpetualParams) Marshal() (dAtA []byte, err error)
- func (m *PerpetualParams) MarshalTo(dAtA []byte) (int, error)
- func (m *PerpetualParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PerpetualParams) ProtoMessage()
- func (m *PerpetualParams) Reset()
- func (m *PerpetualParams) Size() (n int)
- func (m *PerpetualParams) String() string
- func (m *PerpetualParams) Unmarshal(dAtA []byte) error
- func (p *PerpetualParams) Validate() error
- func (m *PerpetualParams) XXX_DiscardUnknown()
- func (m *PerpetualParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PerpetualParams) XXX_Merge(src proto.Message)
- func (m *PerpetualParams) XXX_Size() int
- func (m *PerpetualParams) XXX_Unmarshal(b []byte) error
- type PerpetualsClobKeeper
- type PerpetualsKeeper
- type PremiumStore
- func (*PremiumStore) Descriptor() ([]byte, []int)
- func (m *PremiumStore) GetAllMarketPremiums() []MarketPremiums
- func (ps *PremiumStore) GetMarketPremiumsMap() map[uint32]MarketPremiums
- func (m *PremiumStore) GetNumPremiums() uint32
- func (m *PremiumStore) Marshal() (dAtA []byte, err error)
- func (m *PremiumStore) MarshalTo(dAtA []byte) (int, error)
- func (m *PremiumStore) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PremiumStore) ProtoMessage()
- func (m *PremiumStore) Reset()
- func (m *PremiumStore) Size() (n int)
- func (m *PremiumStore) String() string
- func (m *PremiumStore) Unmarshal(dAtA []byte) error
- func (m *PremiumStore) XXX_DiscardUnknown()
- func (m *PremiumStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PremiumStore) XXX_Merge(src proto.Message)
- func (m *PremiumStore) XXX_Size() int
- func (m *PremiumStore) XXX_Unmarshal(b []byte) error
- type PricesKeeper
- type QueryAllLiquidityTiersRequest
- func (*QueryAllLiquidityTiersRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllLiquidityTiersRequest) GetPagination() *query.PageRequest
- func (m *QueryAllLiquidityTiersRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllLiquidityTiersRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllLiquidityTiersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllLiquidityTiersRequest) ProtoMessage()
- func (m *QueryAllLiquidityTiersRequest) Reset()
- func (m *QueryAllLiquidityTiersRequest) Size() (n int)
- func (m *QueryAllLiquidityTiersRequest) String() string
- func (m *QueryAllLiquidityTiersRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllLiquidityTiersRequest) XXX_DiscardUnknown()
- func (m *QueryAllLiquidityTiersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllLiquidityTiersRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllLiquidityTiersRequest) XXX_Size() int
- func (m *QueryAllLiquidityTiersRequest) XXX_Unmarshal(b []byte) error
- type QueryAllLiquidityTiersResponse
- func (*QueryAllLiquidityTiersResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllLiquidityTiersResponse) GetLiquidityTiers() []LiquidityTier
- func (m *QueryAllLiquidityTiersResponse) GetPagination() *query.PageResponse
- func (m *QueryAllLiquidityTiersResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllLiquidityTiersResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllLiquidityTiersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllLiquidityTiersResponse) ProtoMessage()
- func (m *QueryAllLiquidityTiersResponse) Reset()
- func (m *QueryAllLiquidityTiersResponse) Size() (n int)
- func (m *QueryAllLiquidityTiersResponse) String() string
- func (m *QueryAllLiquidityTiersResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllLiquidityTiersResponse) XXX_DiscardUnknown()
- func (m *QueryAllLiquidityTiersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllLiquidityTiersResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllLiquidityTiersResponse) XXX_Size() int
- func (m *QueryAllLiquidityTiersResponse) XXX_Unmarshal(b []byte) error
- type QueryAllPerpetualsRequest
- func (*QueryAllPerpetualsRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllPerpetualsRequest) GetPagination() *query.PageRequest
- func (m *QueryAllPerpetualsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllPerpetualsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllPerpetualsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllPerpetualsRequest) ProtoMessage()
- func (m *QueryAllPerpetualsRequest) Reset()
- func (m *QueryAllPerpetualsRequest) Size() (n int)
- func (m *QueryAllPerpetualsRequest) String() string
- func (m *QueryAllPerpetualsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllPerpetualsRequest) XXX_DiscardUnknown()
- func (m *QueryAllPerpetualsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllPerpetualsRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllPerpetualsRequest) XXX_Size() int
- func (m *QueryAllPerpetualsRequest) XXX_Unmarshal(b []byte) error
- type QueryAllPerpetualsResponse
- func (*QueryAllPerpetualsResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllPerpetualsResponse) GetPagination() *query.PageResponse
- func (m *QueryAllPerpetualsResponse) GetPerpetual() []Perpetual
- func (m *QueryAllPerpetualsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllPerpetualsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllPerpetualsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllPerpetualsResponse) ProtoMessage()
- func (m *QueryAllPerpetualsResponse) Reset()
- func (m *QueryAllPerpetualsResponse) Size() (n int)
- func (m *QueryAllPerpetualsResponse) String() string
- func (m *QueryAllPerpetualsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllPerpetualsResponse) XXX_DiscardUnknown()
- func (m *QueryAllPerpetualsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllPerpetualsResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllPerpetualsResponse) XXX_Size() int
- func (m *QueryAllPerpetualsResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryPerpetualRequest
- func (*QueryPerpetualRequest) Descriptor() ([]byte, []int)
- func (m *QueryPerpetualRequest) GetId() uint32
- func (m *QueryPerpetualRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPerpetualRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPerpetualRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPerpetualRequest) ProtoMessage()
- func (m *QueryPerpetualRequest) Reset()
- func (m *QueryPerpetualRequest) Size() (n int)
- func (m *QueryPerpetualRequest) String() string
- func (m *QueryPerpetualRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPerpetualRequest) XXX_DiscardUnknown()
- func (m *QueryPerpetualRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPerpetualRequest) XXX_Merge(src proto.Message)
- func (m *QueryPerpetualRequest) XXX_Size() int
- func (m *QueryPerpetualRequest) XXX_Unmarshal(b []byte) error
- type QueryPerpetualResponse
- func (*QueryPerpetualResponse) Descriptor() ([]byte, []int)
- func (m *QueryPerpetualResponse) GetPerpetual() Perpetual
- func (m *QueryPerpetualResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPerpetualResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPerpetualResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPerpetualResponse) ProtoMessage()
- func (m *QueryPerpetualResponse) Reset()
- func (m *QueryPerpetualResponse) Size() (n int)
- func (m *QueryPerpetualResponse) String() string
- func (m *QueryPerpetualResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPerpetualResponse) XXX_DiscardUnknown()
- func (m *QueryPerpetualResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPerpetualResponse) XXX_Merge(src proto.Message)
- func (m *QueryPerpetualResponse) XXX_Size() int
- func (m *QueryPerpetualResponse) XXX_Unmarshal(b []byte) error
- type QueryPremiumSamplesRequest
- func (*QueryPremiumSamplesRequest) Descriptor() ([]byte, []int)
- func (m *QueryPremiumSamplesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPremiumSamplesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPremiumSamplesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPremiumSamplesRequest) ProtoMessage()
- func (m *QueryPremiumSamplesRequest) Reset()
- func (m *QueryPremiumSamplesRequest) Size() (n int)
- func (m *QueryPremiumSamplesRequest) String() string
- func (m *QueryPremiumSamplesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPremiumSamplesRequest) XXX_DiscardUnknown()
- func (m *QueryPremiumSamplesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPremiumSamplesRequest) XXX_Merge(src proto.Message)
- func (m *QueryPremiumSamplesRequest) XXX_Size() int
- func (m *QueryPremiumSamplesRequest) XXX_Unmarshal(b []byte) error
- type QueryPremiumSamplesResponse
- func (*QueryPremiumSamplesResponse) Descriptor() ([]byte, []int)
- func (m *QueryPremiumSamplesResponse) GetPremiumSamples() PremiumStore
- func (m *QueryPremiumSamplesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPremiumSamplesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPremiumSamplesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPremiumSamplesResponse) ProtoMessage()
- func (m *QueryPremiumSamplesResponse) Reset()
- func (m *QueryPremiumSamplesResponse) Size() (n int)
- func (m *QueryPremiumSamplesResponse) String() string
- func (m *QueryPremiumSamplesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPremiumSamplesResponse) XXX_DiscardUnknown()
- func (m *QueryPremiumSamplesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPremiumSamplesResponse) XXX_Merge(src proto.Message)
- func (m *QueryPremiumSamplesResponse) XXX_Size() int
- func (m *QueryPremiumSamplesResponse) XXX_Unmarshal(b []byte) error
- type QueryPremiumVotesRequest
- func (*QueryPremiumVotesRequest) Descriptor() ([]byte, []int)
- func (m *QueryPremiumVotesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPremiumVotesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPremiumVotesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPremiumVotesRequest) ProtoMessage()
- func (m *QueryPremiumVotesRequest) Reset()
- func (m *QueryPremiumVotesRequest) Size() (n int)
- func (m *QueryPremiumVotesRequest) String() string
- func (m *QueryPremiumVotesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPremiumVotesRequest) XXX_DiscardUnknown()
- func (m *QueryPremiumVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPremiumVotesRequest) XXX_Merge(src proto.Message)
- func (m *QueryPremiumVotesRequest) XXX_Size() int
- func (m *QueryPremiumVotesRequest) XXX_Unmarshal(b []byte) error
- type QueryPremiumVotesResponse
- func (*QueryPremiumVotesResponse) Descriptor() ([]byte, []int)
- func (m *QueryPremiumVotesResponse) GetPremiumVotes() PremiumStore
- func (m *QueryPremiumVotesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPremiumVotesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPremiumVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPremiumVotesResponse) ProtoMessage()
- func (m *QueryPremiumVotesResponse) Reset()
- func (m *QueryPremiumVotesResponse) Size() (n int)
- func (m *QueryPremiumVotesResponse) String() string
- func (m *QueryPremiumVotesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPremiumVotesResponse) XXX_DiscardUnknown()
- func (m *QueryPremiumVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPremiumVotesResponse) XXX_Merge(src proto.Message)
- func (m *QueryPremiumVotesResponse) XXX_Size() int
- func (m *QueryPremiumVotesResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) AddPremiumVotes(ctx context.Context, req *MsgAddPremiumVotes) (*MsgAddPremiumVotesResponse, error)
- func (*UnimplementedMsgServer) CreatePerpetual(ctx context.Context, req *MsgCreatePerpetual) (*MsgCreatePerpetualResponse, error)
- func (*UnimplementedMsgServer) SetLiquidityTier(ctx context.Context, req *MsgSetLiquidityTier) (*MsgSetLiquidityTierResponse, error)
- func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
- func (*UnimplementedMsgServer) UpdatePerpetualParams(ctx context.Context, req *MsgUpdatePerpetualParams) (*MsgUpdatePerpetualParamsResponse, error)
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) AllLiquidityTiers(ctx context.Context, req *QueryAllLiquidityTiersRequest) (*QueryAllLiquidityTiersResponse, error)
- func (*UnimplementedQueryServer) AllPerpetuals(ctx context.Context, req *QueryAllPerpetualsRequest) (*QueryAllPerpetualsResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) Perpetual(ctx context.Context, req *QueryPerpetualRequest) (*QueryPerpetualResponse, error)
- func (*UnimplementedQueryServer) PremiumSamples(ctx context.Context, req *QueryPremiumSamplesRequest) (*QueryPremiumSamplesResponse, error)
- func (*UnimplementedQueryServer) PremiumVotes(ctx context.Context, req *QueryPremiumVotesRequest) (*QueryPremiumVotesResponse, error)
Constants ¶
const ( // Clamp factor for 8-hour funding rate is by default 600%. DefaultFundingRateClampFactorPpm = 6 * lib.OneMillion // Clamp factor for premium vote is by default 6_000%. DefaultPremiumVoteClampFactorPpm = 60 * lib.OneMillion // Minimum number of votes per sample is by default 15. DefaultMinNumVotesPerSample = 15 // Maximum default funding rate magnitude is 100%. MaxDefaultFundingPpmAbs = lib.OneMillion // Liquidity-tier related constants MaxInitialMarginPpm = lib.OneMillion MaxMaintenanceFractionPpm = lib.OneMillion )
const ( // ModuleName defines the module name ModuleName = "perpetuals" // StoreKey defines the primary module store key StoreKey = ModuleName TransientStoreKey = "tmp_" + ModuleName )
Module name and store keys
const ( // PerpetualKeyPrefix is the prefix to retrieve all Perpetual PerpetualKeyPrefix = "Perp:" // PremiumVotesKey is the key to retrieve `PremiumStore` object // that represents existing premium sample votes during the current // `funding-sample` epoch. PremiumVotesKey = "PremVotes" // PremiumSamplesKey is the key to retrieve `PremiumStore` object // that represents existing premium samples during the current // `funding-tick` epoch. PremiumSamplesKey = "PremSamples" // LiquidityTierKeyPrefix is the prefix to retrieve all `LiquidityTier`s. LiquidityTierKeyPrefix = "LiqTier:" // ParamsKey is the key to retrieve all params for the module. ParamsKey = "Params" // UpdatedOIKeyPrefix is the key to retrieve the updated OI for the module. UpdatedOIKeyPrefix = "UpdatedOI" )
State
const (
// InsuranceFundName defines the root string for the insurance fund account address
InsuranceFundName = "insurance_fund"
)
Module Accounts
const ( // RemovedTailSampleRatioPpm is the percentage (in ppm) of funding samples to be removed on each // end of the sorted funding samples collected during a funding-tick epoch. // For example, if 60 funding sample entries were collected during an epoch, // `RemovedTailSamplePctPpm` of the top and bottom funding sample values are removed before // taking the average. // TODO(DEC-1105): Move this constant to state so that it can be changed via governance. RemovedTailSampleRatioPpm uint32 = 0 )
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(module.InterfaceRegistry) )
var ( ErrPerpetualDoesNotExist = errorsmod.Register( ModuleName, 1, "Perpetual does not exist", ) ErrMarketDoesNotExist = errorsmod.Register( ModuleName, 2, "MarketId on perpetual does not exist", ) ErrInitialMarginPpmExceedsMax = errorsmod.Register( ModuleName, 3, "InitialMarginPpm exceeds maximum value of 1e6", ) ErrMaintenanceFractionPpmExceedsMax = errorsmod.Register( ModuleName, 4, "MaintenanceFractionPpm exceeds maximum value of 1e6", ) ErrDefaultFundingPpmMagnitudeExceedsMax = errorsmod.Register( ModuleName, 5, "DefaultFundingPpm magnitude exceeds maximum value of 1e6", ) ErrTickerEmptyString = errorsmod.Register( ModuleName, 6, "Ticker must be non-empty string", ) ErrNoNewPremiumVotes = errorsmod.Register( ModuleName, 7, "No new premium votes were collected", ) ErrMoreFundingSamplesThanExpected = errorsmod.Register( ModuleName, 8, "Recorded more than expected funding samples in the past funding-tick epoch", ) ErrInvalidAddPremiumVotes = errorsmod.Register(ModuleName, 9, "MsgAddPremiumVotes is invalid") ErrPremiumVoteNotClamped = errorsmod.Register( ModuleName, 10, "Premium vote value is not clamped by MaxAbsPremiumVotePpm", ) ErrFundingRateInt32Overflow = errorsmod.Register( ModuleName, 11, "Funding rate int32 overflow", ) ErrLiquidityTierDoesNotExist = errorsmod.Register( ModuleName, 12, "Liquidity Tier does not exist", ) ErrFundingRateClampFactorPpmIsZero = errorsmod.Register( ModuleName, 14, "Funding rate clamp factor ppm is zero", ) ErrPremiumVoteClampFactorPpmIsZero = errorsmod.Register( ModuleName, 15, "Premium vote clamp factor ppm is zero", ) ErrImpactNotionalIsZero = errorsmod.Register( ModuleName, 16, "Impact notional is zero", ) ErrPerpetualAlreadyExists = errorsmod.Register( ModuleName, 17, "Perpetual already exists", ) ErrPremiumVoteForNonActiveMarket = errorsmod.Register( ModuleName, 18, "Premium votes are disallowed for non active markets", ) ErrInvalidAuthority = errorsmod.Register( ModuleName, 19, "Authority is invalid", ) ErrLiquidityTierAlreadyExists = errorsmod.Register( ModuleName, 20, "Liquidity tier already exists", ) ErrMaintenanceMarginLargerThanInitialMargin = errorsmod.Register( ModuleName, 21, "Maintenance margin fraction is larger than initial margin fraction", ) ErrMinNumVotesPerSampleIsZero = errorsmod.Register( ModuleName, 22, "MinNumVotesPerSample is zero", ) ErrInvalidMarketType = errorsmod.Register( ModuleName, 23, "Market type is invalid", ) ErrOpenInterestLowerCapLargerThanUpperCap = errorsmod.Register( ModuleName, 24, "open interest lower cap is larger than upper cap", ) ErrOpenInterestWouldBecomeNegative = errorsmod.Register( ModuleName, 25, "open interest would become negative after update", ) // Errors for Not Implemented ErrNotImplementedFunding = errorsmod.Register(ModuleName, 1001, "Not Implemented: Perpetuals Funding") )
x/perpetuals module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthPerpetual = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPerpetual = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPerpetual = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var (
InsuranceFundModuleAddress = authtypes.NewModuleAddress(InsuranceFundName)
)
var PerpetualMarketType_name = map[int32]string{
0: "PERPETUAL_MARKET_TYPE_CROSS",
1: "PERPETUAL_MARKET_TYPE_ISOLATED",
}
var PerpetualMarketType_value = map[string]int32{
"PERPETUAL_MARKET_TYPE_CROSS": 0,
"PERPETUAL_MARKET_TYPE_ISOLATED": 1,
}
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 EpochsKeeper ¶
type EpochsKeeper interface { NumBlocksSinceEpochStart( ctx sdk.Context, id epochstypes.EpochInfoName, ) (uint32, error) MustGetFundingTickEpochInfo( ctx sdk.Context, ) epochstypes.EpochInfo MustGetFundingSampleEpochInfo( ctx sdk.Context, ) epochstypes.EpochInfo }
EpochsKeeper defines the expected epochs keeper to get epoch info.
type FundingPremium ¶
type FundingPremium struct { // The id of the perpetual market. PerpetualId uint32 `protobuf:"varint,1,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"` // The sampled premium rate. In parts-per-million. PremiumPpm int32 `protobuf:"varint,2,opt,name=premium_ppm,json=premiumPpm,proto3" json:"premium_ppm,omitempty"` }
FundingPremium represents a funding premium value for a perpetual market. Can be used to represent a premium vote or a premium sample.
func NewFundingPremium ¶
func NewFundingPremium(id uint32, premiumPpm int32) *FundingPremium
func (*FundingPremium) Descriptor ¶
func (*FundingPremium) Descriptor() ([]byte, []int)
func (*FundingPremium) GetPerpetualId ¶
func (m *FundingPremium) GetPerpetualId() uint32
func (*FundingPremium) GetPremiumPpm ¶
func (m *FundingPremium) GetPremiumPpm() int32
func (*FundingPremium) Marshal ¶
func (m *FundingPremium) Marshal() (dAtA []byte, err error)
func (*FundingPremium) MarshalToSizedBuffer ¶
func (m *FundingPremium) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FundingPremium) ProtoMessage ¶
func (*FundingPremium) ProtoMessage()
func (*FundingPremium) Reset ¶
func (m *FundingPremium) Reset()
func (*FundingPremium) Size ¶
func (m *FundingPremium) Size() (n int)
func (*FundingPremium) String ¶
func (m *FundingPremium) String() string
func (*FundingPremium) Unmarshal ¶
func (m *FundingPremium) Unmarshal(dAtA []byte) error
func (*FundingPremium) XXX_DiscardUnknown ¶
func (m *FundingPremium) XXX_DiscardUnknown()
func (*FundingPremium) XXX_Marshal ¶
func (m *FundingPremium) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FundingPremium) XXX_Merge ¶
func (m *FundingPremium) XXX_Merge(src proto.Message)
func (*FundingPremium) XXX_Size ¶
func (m *FundingPremium) XXX_Size() int
func (*FundingPremium) XXX_Unmarshal ¶
func (m *FundingPremium) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct { Perpetuals []Perpetual `protobuf:"bytes,1,rep,name=perpetuals,proto3" json:"perpetuals"` LiquidityTiers []LiquidityTier `protobuf:"bytes,2,rep,name=liquidity_tiers,json=liquidityTiers,proto3" json:"liquidity_tiers"` Params Params `protobuf:"bytes,3,opt,name=params,proto3" json:"params"` }
GenesisState defines the perpetuals module's genesis state.
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default Perpetual genesis state
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetLiquidityTiers ¶
func (m *GenesisState) GetLiquidityTiers() []LiquidityTier
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetPerpetuals ¶
func (m *GenesisState) GetPerpetuals() []Perpetual
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 GetPricePremiumParams ¶
type GetPricePremiumParams struct { IndexPrice pricestypes.MarketPrice BaseAtomicResolution int32 QuoteAtomicResolution int32 ImpactNotionalQuoteQuantums *big.Int MaxAbsPremiumVotePpm *big.Int }
GetPricePremiumParams includes the parameters used by `ClobKeeper.GetPricePremiumForPerpetual` and `MemClob.GetPricePremium` to get the price premium.
type LiquidityTier ¶
type LiquidityTier struct { // Unique id. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // The name of the tier purely for mnemonic purposes, e.g. "Gold". Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The margin fraction needed to open a position. // In parts-per-million. InitialMarginPpm uint32 `protobuf:"varint,3,opt,name=initial_margin_ppm,json=initialMarginPpm,proto3" json:"initial_margin_ppm,omitempty"` // The fraction of the initial-margin that the maintenance-margin is, // e.g. 50%. In parts-per-million. MaintenanceFractionPpm uint32 `` /* 130-byte string literal not displayed */ // The maximum position size at which the margin requirements are // not increased over the default values. Above this position size, // the margin requirements increase at a rate of sqrt(size). // // Deprecated since v3.x. BasePositionNotional uint64 `protobuf:"varint,5,opt,name=base_position_notional,json=basePositionNotional,proto3" json:"base_position_notional,omitempty"` // Deprecated: Do not use. // The impact notional amount (in quote quantums) is used to determine impact // bid/ask prices and its recommended value is 500 USDC / initial margin // fraction. // - Impact bid price = average execution price for a market sell of the // impact notional value. // - Impact ask price = average execution price for a market buy of the // impact notional value. ImpactNotional uint64 `protobuf:"varint,6,opt,name=impact_notional,json=impactNotional,proto3" json:"impact_notional,omitempty"` // Lower cap for Open Interest Margin Fracton (OIMF), in quote quantums. // IMF is not affected when OI <= open_interest_lower_cap. OpenInterestLowerCap uint64 `` /* 126-byte string literal not displayed */ // Upper cap for Open Interest Margin Fracton (OIMF), in quote quantums. // IMF scales linearly to 100% as OI approaches open_interest_upper_cap. // If zero, then the IMF does not scale with OI. OpenInterestUpperCap uint64 `` /* 126-byte string literal not displayed */ }
LiquidityTier stores margin information.
func (*LiquidityTier) Descriptor ¶
func (*LiquidityTier) Descriptor() ([]byte, []int)
func (*LiquidityTier) GetBasePositionNotional
deprecated
func (m *LiquidityTier) GetBasePositionNotional() uint64
Deprecated: Do not use.
func (*LiquidityTier) GetId ¶
func (m *LiquidityTier) GetId() uint32
func (*LiquidityTier) GetImpactNotional ¶
func (m *LiquidityTier) GetImpactNotional() uint64
func (*LiquidityTier) GetInitialMarginPpm ¶
func (m *LiquidityTier) GetInitialMarginPpm() uint32
func (LiquidityTier) GetInitialMarginQuoteQuantums ¶
func (liquidityTier LiquidityTier) GetInitialMarginQuoteQuantums( bigQuoteQuantums *big.Int, openInterestQuoteQuantums *big.Int, ) *big.Int
GetInitialMarginQuoteQuantums returns initial margin requirement (IMR) in quote quantums.
Now that OIMF is introduced, the calculation of IMR is as follows:
- Each market has a `Lower Cap` and `Upper Cap` denominated in USDC. - Each market already has a `Base IMF`. - At any point in time, for each market:
- Define
- `Open Notional = Open Interest * Oracle Price`
- `Scaling Factor = (Open Notional - Lower Cap) / (Upper Cap - Lower Cap)`
- `IMF Increase = Scaling Factor * (1 - Base IMF)`
- Then a market’s `Effective IMF = Min(Base IMF + Max(IMF Increase, 0), 1.0)`
- I.e. the effective IMF is the base IMF while the OI < lower cap, and increases linearly until OI = Upper Cap, at which point the IMF stays at 1.0 (requiring 1:1 collateral for trading). - initialMarginQuoteQuantums = scaledInitialMarginPpm * quoteQuantums / 1_000_000
note: - divisions are delayed for precision purposes.
func (*LiquidityTier) GetMaintenanceFractionPpm ¶
func (m *LiquidityTier) GetMaintenanceFractionPpm() uint32
func (LiquidityTier) GetMaintenanceMarginPpm ¶
func (liquidityTier LiquidityTier) GetMaintenanceMarginPpm() uint32
`GetMaintenanceMarginPpm` calculates maintenance margin ppm based on initial margin ppm and maintenance fraction ppm.
func (LiquidityTier) GetMaxAbsFundingClampPpm ¶
func (liquidityTier LiquidityTier) GetMaxAbsFundingClampPpm(clampFactorPpm uint32) *big.Int
`GetMaxAbsFundingClampPpm` returns the maximum absolute value according to the funding clamp function: `|S| ≤ Clamp Factor * (Initial Margin - Maintenance Margin)`, which can be applied to both funding rate clamping and premium vote clamping, each having their own clamp factor.
func (*LiquidityTier) GetName ¶
func (m *LiquidityTier) GetName() string
func (*LiquidityTier) GetOpenInterestLowerCap ¶
func (m *LiquidityTier) GetOpenInterestLowerCap() uint64
func (*LiquidityTier) GetOpenInterestUpperCap ¶
func (m *LiquidityTier) GetOpenInterestUpperCap() uint64
func (*LiquidityTier) Marshal ¶
func (m *LiquidityTier) Marshal() (dAtA []byte, err error)
func (*LiquidityTier) MarshalToSizedBuffer ¶
func (m *LiquidityTier) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LiquidityTier) ProtoMessage ¶
func (*LiquidityTier) ProtoMessage()
func (*LiquidityTier) Reset ¶
func (m *LiquidityTier) Reset()
func (*LiquidityTier) Size ¶
func (m *LiquidityTier) Size() (n int)
func (*LiquidityTier) String ¶
func (m *LiquidityTier) String() string
func (*LiquidityTier) Unmarshal ¶
func (m *LiquidityTier) Unmarshal(dAtA []byte) error
func (LiquidityTier) Validate ¶
func (liquidityTier LiquidityTier) Validate() error
- Initial margin is less than or equal to 1. - Maintenance fraction is less than or equal to 1.
func (*LiquidityTier) XXX_DiscardUnknown ¶
func (m *LiquidityTier) XXX_DiscardUnknown()
func (*LiquidityTier) XXX_Marshal ¶
func (m *LiquidityTier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LiquidityTier) XXX_Merge ¶
func (m *LiquidityTier) XXX_Merge(src proto.Message)
func (*LiquidityTier) XXX_Size ¶
func (m *LiquidityTier) XXX_Size() int
func (*LiquidityTier) XXX_Unmarshal ¶
func (m *LiquidityTier) XXX_Unmarshal(b []byte) error
type MarketPremiums ¶
type MarketPremiums struct { // perpetual_id is the Id of the perpetual market. PerpetualId uint32 `protobuf:"varint,1,opt,name=perpetual_id,json=perpetualId,proto3" json:"perpetual_id,omitempty"` // premiums is a list of premium values for a perpetual market. Since most // premiums are zeros under "stable" market conditions, only non-zero values // are stored in this list. Premiums []int32 `protobuf:"zigzag32,2,rep,packed,name=premiums,proto3" json:"premiums,omitempty"` }
MarketPremiums stores a list of premiums for a single perpetual market.
func (*MarketPremiums) Descriptor ¶
func (*MarketPremiums) Descriptor() ([]byte, []int)
func (*MarketPremiums) GetPerpetualId ¶
func (m *MarketPremiums) GetPerpetualId() uint32
func (*MarketPremiums) GetPremiums ¶
func (m *MarketPremiums) GetPremiums() []int32
func (*MarketPremiums) Marshal ¶
func (m *MarketPremiums) Marshal() (dAtA []byte, err error)
func (*MarketPremiums) MarshalToSizedBuffer ¶
func (m *MarketPremiums) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MarketPremiums) ProtoMessage ¶
func (*MarketPremiums) ProtoMessage()
func (*MarketPremiums) Reset ¶
func (m *MarketPremiums) Reset()
func (*MarketPremiums) Size ¶
func (m *MarketPremiums) Size() (n int)
func (*MarketPremiums) String ¶
func (m *MarketPremiums) String() string
func (*MarketPremiums) Unmarshal ¶
func (m *MarketPremiums) Unmarshal(dAtA []byte) error
func (*MarketPremiums) XXX_DiscardUnknown ¶
func (m *MarketPremiums) XXX_DiscardUnknown()
func (*MarketPremiums) XXX_Marshal ¶
func (m *MarketPremiums) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MarketPremiums) XXX_Merge ¶
func (m *MarketPremiums) XXX_Merge(src proto.Message)
func (*MarketPremiums) XXX_Size ¶
func (m *MarketPremiums) XXX_Size() int
func (*MarketPremiums) XXX_Unmarshal ¶
func (m *MarketPremiums) XXX_Unmarshal(b []byte) error
type MsgAddPremiumVotes ¶
type MsgAddPremiumVotes struct {
Votes []FundingPremium `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes"`
}
MsgAddPremiumVotes is a request type for the AddPremiumVotes method.
func NewMsgAddPremiumVotes ¶
func NewMsgAddPremiumVotes(votes []FundingPremium) *MsgAddPremiumVotes
func (*MsgAddPremiumVotes) Descriptor ¶
func (*MsgAddPremiumVotes) Descriptor() ([]byte, []int)
func (*MsgAddPremiumVotes) GetVotes ¶
func (m *MsgAddPremiumVotes) GetVotes() []FundingPremium
func (*MsgAddPremiumVotes) Marshal ¶
func (m *MsgAddPremiumVotes) Marshal() (dAtA []byte, err error)
func (*MsgAddPremiumVotes) MarshalTo ¶
func (m *MsgAddPremiumVotes) MarshalTo(dAtA []byte) (int, error)
func (*MsgAddPremiumVotes) MarshalToSizedBuffer ¶
func (m *MsgAddPremiumVotes) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgAddPremiumVotes) ProtoMessage ¶
func (*MsgAddPremiumVotes) ProtoMessage()
func (*MsgAddPremiumVotes) Reset ¶
func (m *MsgAddPremiumVotes) Reset()
func (*MsgAddPremiumVotes) Size ¶
func (m *MsgAddPremiumVotes) Size() (n int)
func (*MsgAddPremiumVotes) String ¶
func (m *MsgAddPremiumVotes) String() string
func (*MsgAddPremiumVotes) Unmarshal ¶
func (m *MsgAddPremiumVotes) Unmarshal(dAtA []byte) error
func (*MsgAddPremiumVotes) ValidateBasic ¶
func (msg *MsgAddPremiumVotes) ValidateBasic() error
func (*MsgAddPremiumVotes) XXX_DiscardUnknown ¶
func (m *MsgAddPremiumVotes) XXX_DiscardUnknown()
func (*MsgAddPremiumVotes) XXX_Marshal ¶
func (m *MsgAddPremiumVotes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgAddPremiumVotes) XXX_Merge ¶
func (m *MsgAddPremiumVotes) XXX_Merge(src proto.Message)
func (*MsgAddPremiumVotes) XXX_Size ¶
func (m *MsgAddPremiumVotes) XXX_Size() int
func (*MsgAddPremiumVotes) XXX_Unmarshal ¶
func (m *MsgAddPremiumVotes) XXX_Unmarshal(b []byte) error
type MsgAddPremiumVotesResponse ¶
type MsgAddPremiumVotesResponse struct { }
MsgAddPremiumVotesResponse defines the AddPremiumVotes response type.
func (*MsgAddPremiumVotesResponse) Descriptor ¶
func (*MsgAddPremiumVotesResponse) Descriptor() ([]byte, []int)
func (*MsgAddPremiumVotesResponse) Marshal ¶
func (m *MsgAddPremiumVotesResponse) Marshal() (dAtA []byte, err error)
func (*MsgAddPremiumVotesResponse) MarshalTo ¶
func (m *MsgAddPremiumVotesResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgAddPremiumVotesResponse) MarshalToSizedBuffer ¶
func (m *MsgAddPremiumVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgAddPremiumVotesResponse) ProtoMessage ¶
func (*MsgAddPremiumVotesResponse) ProtoMessage()
func (*MsgAddPremiumVotesResponse) Reset ¶
func (m *MsgAddPremiumVotesResponse) Reset()
func (*MsgAddPremiumVotesResponse) Size ¶
func (m *MsgAddPremiumVotesResponse) Size() (n int)
func (*MsgAddPremiumVotesResponse) String ¶
func (m *MsgAddPremiumVotesResponse) String() string
func (*MsgAddPremiumVotesResponse) Unmarshal ¶
func (m *MsgAddPremiumVotesResponse) Unmarshal(dAtA []byte) error
func (*MsgAddPremiumVotesResponse) XXX_DiscardUnknown ¶
func (m *MsgAddPremiumVotesResponse) XXX_DiscardUnknown()
func (*MsgAddPremiumVotesResponse) XXX_Marshal ¶
func (m *MsgAddPremiumVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgAddPremiumVotesResponse) XXX_Merge ¶
func (m *MsgAddPremiumVotesResponse) XXX_Merge(src proto.Message)
func (*MsgAddPremiumVotesResponse) XXX_Size ¶
func (m *MsgAddPremiumVotesResponse) XXX_Size() int
func (*MsgAddPremiumVotesResponse) XXX_Unmarshal ¶
func (m *MsgAddPremiumVotesResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // AddPremiumVotes add new samples of the funding premiums to the // application. AddPremiumVotes(ctx context.Context, in *MsgAddPremiumVotes, opts ...grpc.CallOption) (*MsgAddPremiumVotesResponse, error) // CreatePerpetual creates a new perpetual object. CreatePerpetual(ctx context.Context, in *MsgCreatePerpetual, opts ...grpc.CallOption) (*MsgCreatePerpetualResponse, error) // SetLiquidityTier creates an liquidity tier if the ID doesn't exist, and // updates the existing liquidity tier otherwise. SetLiquidityTier(ctx context.Context, in *MsgSetLiquidityTier, opts ...grpc.CallOption) (*MsgSetLiquidityTierResponse, error) // UpdatePerpetualParams updates the parameters of a perpetual market. UpdatePerpetualParams(ctx context.Context, in *MsgUpdatePerpetualParams, opts ...grpc.CallOption) (*MsgUpdatePerpetualParamsResponse, error) // UpdateParams updates the parameters of perpetuals module. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgCreatePerpetual ¶
type MsgCreatePerpetual 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 perpetual market. Params PerpetualParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgCreatePerpetual is a message used by x/gov to create a new perpetual.
func (*MsgCreatePerpetual) Descriptor ¶
func (*MsgCreatePerpetual) Descriptor() ([]byte, []int)
func (*MsgCreatePerpetual) GetAuthority ¶
func (m *MsgCreatePerpetual) GetAuthority() string
func (*MsgCreatePerpetual) GetParams ¶
func (m *MsgCreatePerpetual) GetParams() PerpetualParams
func (*MsgCreatePerpetual) Marshal ¶
func (m *MsgCreatePerpetual) Marshal() (dAtA []byte, err error)
func (*MsgCreatePerpetual) MarshalTo ¶
func (m *MsgCreatePerpetual) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreatePerpetual) MarshalToSizedBuffer ¶
func (m *MsgCreatePerpetual) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreatePerpetual) ProtoMessage ¶
func (*MsgCreatePerpetual) ProtoMessage()
func (*MsgCreatePerpetual) Reset ¶
func (m *MsgCreatePerpetual) Reset()
func (*MsgCreatePerpetual) Size ¶
func (m *MsgCreatePerpetual) Size() (n int)
func (*MsgCreatePerpetual) String ¶
func (m *MsgCreatePerpetual) String() string
func (*MsgCreatePerpetual) Unmarshal ¶
func (m *MsgCreatePerpetual) Unmarshal(dAtA []byte) error
func (*MsgCreatePerpetual) ValidateBasic ¶
func (msg *MsgCreatePerpetual) ValidateBasic() error
func (*MsgCreatePerpetual) XXX_DiscardUnknown ¶
func (m *MsgCreatePerpetual) XXX_DiscardUnknown()
func (*MsgCreatePerpetual) XXX_Marshal ¶
func (m *MsgCreatePerpetual) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreatePerpetual) XXX_Merge ¶
func (m *MsgCreatePerpetual) XXX_Merge(src proto.Message)
func (*MsgCreatePerpetual) XXX_Size ¶
func (m *MsgCreatePerpetual) XXX_Size() int
func (*MsgCreatePerpetual) XXX_Unmarshal ¶
func (m *MsgCreatePerpetual) XXX_Unmarshal(b []byte) error
type MsgCreatePerpetualResponse ¶
type MsgCreatePerpetualResponse struct { }
MsgCreatePerpetualResponse defines the CreatePerpetual response type.
func (*MsgCreatePerpetualResponse) Descriptor ¶
func (*MsgCreatePerpetualResponse) Descriptor() ([]byte, []int)
func (*MsgCreatePerpetualResponse) Marshal ¶
func (m *MsgCreatePerpetualResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreatePerpetualResponse) MarshalTo ¶
func (m *MsgCreatePerpetualResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreatePerpetualResponse) MarshalToSizedBuffer ¶
func (m *MsgCreatePerpetualResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreatePerpetualResponse) ProtoMessage ¶
func (*MsgCreatePerpetualResponse) ProtoMessage()
func (*MsgCreatePerpetualResponse) Reset ¶
func (m *MsgCreatePerpetualResponse) Reset()
func (*MsgCreatePerpetualResponse) Size ¶
func (m *MsgCreatePerpetualResponse) Size() (n int)
func (*MsgCreatePerpetualResponse) String ¶
func (m *MsgCreatePerpetualResponse) String() string
func (*MsgCreatePerpetualResponse) Unmarshal ¶
func (m *MsgCreatePerpetualResponse) Unmarshal(dAtA []byte) error
func (*MsgCreatePerpetualResponse) XXX_DiscardUnknown ¶
func (m *MsgCreatePerpetualResponse) XXX_DiscardUnknown()
func (*MsgCreatePerpetualResponse) XXX_Marshal ¶
func (m *MsgCreatePerpetualResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreatePerpetualResponse) XXX_Merge ¶
func (m *MsgCreatePerpetualResponse) XXX_Merge(src proto.Message)
func (*MsgCreatePerpetualResponse) XXX_Size ¶
func (m *MsgCreatePerpetualResponse) XXX_Size() int
func (*MsgCreatePerpetualResponse) XXX_Unmarshal ¶
func (m *MsgCreatePerpetualResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // AddPremiumVotes add new samples of the funding premiums to the // application. AddPremiumVotes(context.Context, *MsgAddPremiumVotes) (*MsgAddPremiumVotesResponse, error) // CreatePerpetual creates a new perpetual object. CreatePerpetual(context.Context, *MsgCreatePerpetual) (*MsgCreatePerpetualResponse, error) // SetLiquidityTier creates an liquidity tier if the ID doesn't exist, and // updates the existing liquidity tier otherwise. SetLiquidityTier(context.Context, *MsgSetLiquidityTier) (*MsgSetLiquidityTierResponse, error) // UpdatePerpetualParams updates the parameters of a perpetual market. UpdatePerpetualParams(context.Context, *MsgUpdatePerpetualParams) (*MsgUpdatePerpetualParamsResponse, error) // UpdateParams updates the parameters of perpetuals module. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) }
MsgServer is the server API for Msg service.
type MsgSetLiquidityTier ¶
type MsgSetLiquidityTier struct { // The address that controls the module. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // The liquidity tier to create or update. LiquidityTier LiquidityTier `protobuf:"bytes,2,opt,name=liquidity_tier,json=liquidityTier,proto3" json:"liquidity_tier"` }
MsgSetLiquidityTier is a message used by x/gov to create or update a liquidity tier.
func (*MsgSetLiquidityTier) Descriptor ¶
func (*MsgSetLiquidityTier) Descriptor() ([]byte, []int)
func (*MsgSetLiquidityTier) GetAuthority ¶
func (m *MsgSetLiquidityTier) GetAuthority() string
func (*MsgSetLiquidityTier) GetLiquidityTier ¶
func (m *MsgSetLiquidityTier) GetLiquidityTier() LiquidityTier
func (*MsgSetLiquidityTier) Marshal ¶
func (m *MsgSetLiquidityTier) Marshal() (dAtA []byte, err error)
func (*MsgSetLiquidityTier) MarshalTo ¶
func (m *MsgSetLiquidityTier) MarshalTo(dAtA []byte) (int, error)
func (*MsgSetLiquidityTier) MarshalToSizedBuffer ¶
func (m *MsgSetLiquidityTier) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSetLiquidityTier) ProtoMessage ¶
func (*MsgSetLiquidityTier) ProtoMessage()
func (*MsgSetLiquidityTier) Reset ¶
func (m *MsgSetLiquidityTier) Reset()
func (*MsgSetLiquidityTier) Size ¶
func (m *MsgSetLiquidityTier) Size() (n int)
func (*MsgSetLiquidityTier) String ¶
func (m *MsgSetLiquidityTier) String() string
func (*MsgSetLiquidityTier) Unmarshal ¶
func (m *MsgSetLiquidityTier) Unmarshal(dAtA []byte) error
func (*MsgSetLiquidityTier) ValidateBasic ¶
func (msg *MsgSetLiquidityTier) ValidateBasic() error
func (*MsgSetLiquidityTier) XXX_DiscardUnknown ¶
func (m *MsgSetLiquidityTier) XXX_DiscardUnknown()
func (*MsgSetLiquidityTier) XXX_Marshal ¶
func (m *MsgSetLiquidityTier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSetLiquidityTier) XXX_Merge ¶
func (m *MsgSetLiquidityTier) XXX_Merge(src proto.Message)
func (*MsgSetLiquidityTier) XXX_Size ¶
func (m *MsgSetLiquidityTier) XXX_Size() int
func (*MsgSetLiquidityTier) XXX_Unmarshal ¶
func (m *MsgSetLiquidityTier) XXX_Unmarshal(b []byte) error
type MsgSetLiquidityTierResponse ¶
type MsgSetLiquidityTierResponse struct { }
MsgSetLiquidityTierResponse defines the SetLiquidityTier response type.
func (*MsgSetLiquidityTierResponse) Descriptor ¶
func (*MsgSetLiquidityTierResponse) Descriptor() ([]byte, []int)
func (*MsgSetLiquidityTierResponse) Marshal ¶
func (m *MsgSetLiquidityTierResponse) Marshal() (dAtA []byte, err error)
func (*MsgSetLiquidityTierResponse) MarshalTo ¶
func (m *MsgSetLiquidityTierResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSetLiquidityTierResponse) MarshalToSizedBuffer ¶
func (m *MsgSetLiquidityTierResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSetLiquidityTierResponse) ProtoMessage ¶
func (*MsgSetLiquidityTierResponse) ProtoMessage()
func (*MsgSetLiquidityTierResponse) Reset ¶
func (m *MsgSetLiquidityTierResponse) Reset()
func (*MsgSetLiquidityTierResponse) Size ¶
func (m *MsgSetLiquidityTierResponse) Size() (n int)
func (*MsgSetLiquidityTierResponse) String ¶
func (m *MsgSetLiquidityTierResponse) String() string
func (*MsgSetLiquidityTierResponse) Unmarshal ¶
func (m *MsgSetLiquidityTierResponse) Unmarshal(dAtA []byte) error
func (*MsgSetLiquidityTierResponse) XXX_DiscardUnknown ¶
func (m *MsgSetLiquidityTierResponse) XXX_DiscardUnknown()
func (*MsgSetLiquidityTierResponse) XXX_Marshal ¶
func (m *MsgSetLiquidityTierResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSetLiquidityTierResponse) XXX_Merge ¶
func (m *MsgSetLiquidityTierResponse) XXX_Merge(src proto.Message)
func (*MsgSetLiquidityTierResponse) XXX_Size ¶
func (m *MsgSetLiquidityTierResponse) XXX_Size() int
func (*MsgSetLiquidityTierResponse) XXX_Unmarshal ¶
func (m *MsgSetLiquidityTierResponse) XXX_Unmarshal(b []byte) error
type MsgUpdateParams ¶
type MsgUpdateParams struct { Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // The parameters to update. Each field must be set. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgUpdateParams is a message used by x/gov to update the parameters of the perpetuals module.
func (*MsgUpdateParams) Descriptor ¶
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶
func (m *MsgUpdateParams) GetParams() Params
func (*MsgUpdateParams) Marshal ¶
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) ValidateBasic ¶
func (msg *MsgUpdateParams) ValidateBasic() error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶
type MsgUpdateParamsResponse struct { }
MsgUpdateParamsResponse defines the UpdateParams response type.
func (*MsgUpdateParamsResponse) Descriptor ¶
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type MsgUpdatePerpetualParams ¶
type MsgUpdatePerpetualParams struct { Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // The perpetual to update. Each field must be set. PerpetualParams PerpetualParams `protobuf:"bytes,2,opt,name=perpetual_params,json=perpetualParams,proto3" json:"perpetual_params"` }
MsgUpdatePerpetualParams is a message used by x/gov to update the parameters of a perpetual.
func (*MsgUpdatePerpetualParams) Descriptor ¶
func (*MsgUpdatePerpetualParams) Descriptor() ([]byte, []int)
func (*MsgUpdatePerpetualParams) GetAuthority ¶
func (m *MsgUpdatePerpetualParams) GetAuthority() string
func (*MsgUpdatePerpetualParams) GetPerpetualParams ¶
func (m *MsgUpdatePerpetualParams) GetPerpetualParams() PerpetualParams
func (*MsgUpdatePerpetualParams) Marshal ¶
func (m *MsgUpdatePerpetualParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdatePerpetualParams) MarshalTo ¶
func (m *MsgUpdatePerpetualParams) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdatePerpetualParams) MarshalToSizedBuffer ¶
func (m *MsgUpdatePerpetualParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdatePerpetualParams) ProtoMessage ¶
func (*MsgUpdatePerpetualParams) ProtoMessage()
func (*MsgUpdatePerpetualParams) Reset ¶
func (m *MsgUpdatePerpetualParams) Reset()
func (*MsgUpdatePerpetualParams) Size ¶
func (m *MsgUpdatePerpetualParams) Size() (n int)
func (*MsgUpdatePerpetualParams) String ¶
func (m *MsgUpdatePerpetualParams) String() string
func (*MsgUpdatePerpetualParams) Unmarshal ¶
func (m *MsgUpdatePerpetualParams) Unmarshal(dAtA []byte) error
func (*MsgUpdatePerpetualParams) ValidateBasic ¶
func (msg *MsgUpdatePerpetualParams) ValidateBasic() error
func (*MsgUpdatePerpetualParams) XXX_DiscardUnknown ¶
func (m *MsgUpdatePerpetualParams) XXX_DiscardUnknown()
func (*MsgUpdatePerpetualParams) XXX_Marshal ¶
func (m *MsgUpdatePerpetualParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdatePerpetualParams) XXX_Merge ¶
func (m *MsgUpdatePerpetualParams) XXX_Merge(src proto.Message)
func (*MsgUpdatePerpetualParams) XXX_Size ¶
func (m *MsgUpdatePerpetualParams) XXX_Size() int
func (*MsgUpdatePerpetualParams) XXX_Unmarshal ¶
func (m *MsgUpdatePerpetualParams) XXX_Unmarshal(b []byte) error
type MsgUpdatePerpetualParamsResponse ¶
type MsgUpdatePerpetualParamsResponse struct { }
MsgUpdatePerpetualParamsResponse defines the UpdatePerpetualParams response type.
func (*MsgUpdatePerpetualParamsResponse) Descriptor ¶
func (*MsgUpdatePerpetualParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdatePerpetualParamsResponse) Marshal ¶
func (m *MsgUpdatePerpetualParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdatePerpetualParamsResponse) MarshalTo ¶
func (m *MsgUpdatePerpetualParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdatePerpetualParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdatePerpetualParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdatePerpetualParamsResponse) ProtoMessage ¶
func (*MsgUpdatePerpetualParamsResponse) ProtoMessage()
func (*MsgUpdatePerpetualParamsResponse) Reset ¶
func (m *MsgUpdatePerpetualParamsResponse) Reset()
func (*MsgUpdatePerpetualParamsResponse) Size ¶
func (m *MsgUpdatePerpetualParamsResponse) Size() (n int)
func (*MsgUpdatePerpetualParamsResponse) String ¶
func (m *MsgUpdatePerpetualParamsResponse) String() string
func (*MsgUpdatePerpetualParamsResponse) Unmarshal ¶
func (m *MsgUpdatePerpetualParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdatePerpetualParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdatePerpetualParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdatePerpetualParamsResponse) XXX_Marshal ¶
func (m *MsgUpdatePerpetualParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdatePerpetualParamsResponse) XXX_Merge ¶
func (m *MsgUpdatePerpetualParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdatePerpetualParamsResponse) XXX_Size ¶
func (m *MsgUpdatePerpetualParamsResponse) XXX_Size() int
func (*MsgUpdatePerpetualParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdatePerpetualParamsResponse) XXX_Unmarshal(b []byte) error
type OpenInterestDelta ¶
type OpenInterestDelta struct { // The `Id` of the `Perpetual`. PerpetualId uint32 // Delta of open interest (in base quantums). BaseQuantums *big.Int }
OpenInterestDelta represents a (perpId, openInterestDelta) tuple.
type Params ¶
type Params struct { // Funding rate clamp factor in parts-per-million, used for clamping 8-hour // funding rates according to equation: |R| <= funding_rate_clamp_factor * // (initial margin - maintenance margin). FundingRateClampFactorPpm uint32 `` /* 143-byte string literal not displayed */ // Premium vote clamp factor in parts-per-million, used for clamping premium // votes according to equation: |V| <= premium_vote_clamp_factor * // (initial margin - maintenance margin). PremiumVoteClampFactorPpm uint32 `` /* 143-byte string literal not displayed */ // Minimum number of premium votes per premium sample. If number of premium // votes is smaller than this number, pad with zeros up to this number. MinNumVotesPerSample uint32 `` /* 128-byte string literal not displayed */ }
Params defines the parameters for x/perpetuals module.
func (*Params) Descriptor ¶
func (*Params) GetFundingRateClampFactorPpm ¶
func (*Params) GetMinNumVotesPerSample ¶
func (*Params) GetPremiumVoteClampFactorPpm ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type Perpetual ¶
type Perpetual struct { // PerpetualParams is the parameters of the perpetual. Params PerpetualParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // The current index determined by the cumulative all-time // history of the funding mechanism. Starts at zero. FundingIndex github_com_StreamFinance_Protocol_stream_chain_protocol_dtypes.SerializableInt `` /* 177-byte string literal not displayed */ // Total size of open long contracts, measured in base_quantums. OpenInterest github_com_StreamFinance_Protocol_stream_chain_protocol_dtypes.SerializableInt `` /* 177-byte string literal not displayed */ LastFundingRate github_com_StreamFinance_Protocol_stream_chain_protocol_dtypes.SerializableInt `` /* 188-byte string literal not displayed */ }
Perpetual represents a perpetual on the dYdX exchange.
func (*Perpetual) Descriptor ¶
func (*Perpetual) GetParams ¶
func (m *Perpetual) GetParams() PerpetualParams
func (*Perpetual) MarshalToSizedBuffer ¶
func (*Perpetual) ProtoMessage ¶
func (*Perpetual) ProtoMessage()
func (*Perpetual) XXX_DiscardUnknown ¶
func (m *Perpetual) XXX_DiscardUnknown()
func (*Perpetual) XXX_Marshal ¶
func (*Perpetual) XXX_Unmarshal ¶
type PerpetualMarketType ¶
type PerpetualMarketType int32
const ( // Market type for cross margin perpetual markets. PerpetualMarketType_PERPETUAL_MARKET_TYPE_CROSS PerpetualMarketType = 0 // Market type for isolated margin perpetual markets. PerpetualMarketType_PERPETUAL_MARKET_TYPE_ISOLATED PerpetualMarketType = 1 )
func (PerpetualMarketType) EnumDescriptor ¶
func (PerpetualMarketType) EnumDescriptor() ([]byte, []int)
func (PerpetualMarketType) String ¶
func (x PerpetualMarketType) String() string
type PerpetualParams ¶
type PerpetualParams struct { // Unique, sequentially-generated. Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // The name of the `Perpetual` (e.g. `BTC-USD`). Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"` // The market associated with this `Perpetual`. It // acts as the oracle price for the purposes of calculating // collateral, margin requirements, and funding rates. MarketId uint32 `protobuf:"varint,3,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` // The exponent for converting an atomic amount (`size = 1`) // to a full coin. For example, if `AtomicResolution = -8` // then a `PerpetualPosition` with `size = 1e8` is equivalent to // a position size of one full coin. AtomicResolution int32 `protobuf:"zigzag32,4,opt,name=atomic_resolution,json=atomicResolution,proto3" json:"atomic_resolution,omitempty"` // The default funding payment if there is no price premium. In // parts-per-million. DefaultFundingPpm int32 `protobuf:"zigzag32,5,opt,name=default_funding_ppm,json=defaultFundingPpm,proto3" json:"default_funding_ppm,omitempty"` // The liquidity_tier that this perpetual is associated with. LiquidityTier uint32 `protobuf:"varint,6,opt,name=liquidity_tier,json=liquidityTier,proto3" json:"liquidity_tier,omitempty"` // The market type specifying if this perpetual is cross or isolated MarketType PerpetualMarketType `` /* 141-byte string literal not displayed */ }
PerpetualParams represents the parameters of a perpetual on the dYdX exchange.
func (*PerpetualParams) Descriptor ¶
func (*PerpetualParams) Descriptor() ([]byte, []int)
func (*PerpetualParams) GetAtomicResolution ¶
func (m *PerpetualParams) GetAtomicResolution() int32
func (*PerpetualParams) GetDefaultFundingPpm ¶
func (m *PerpetualParams) GetDefaultFundingPpm() int32
func (*PerpetualParams) GetId ¶
func (m *PerpetualParams) GetId() uint32
func (*PerpetualParams) GetLiquidityTier ¶
func (m *PerpetualParams) GetLiquidityTier() uint32
func (*PerpetualParams) GetMarketId ¶
func (m *PerpetualParams) GetMarketId() uint32
func (*PerpetualParams) GetMarketType ¶
func (m *PerpetualParams) GetMarketType() PerpetualMarketType
func (*PerpetualParams) GetTicker ¶
func (m *PerpetualParams) GetTicker() string
func (*PerpetualParams) Marshal ¶
func (m *PerpetualParams) Marshal() (dAtA []byte, err error)
func (*PerpetualParams) MarshalToSizedBuffer ¶
func (m *PerpetualParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PerpetualParams) ProtoMessage ¶
func (*PerpetualParams) ProtoMessage()
func (*PerpetualParams) Reset ¶
func (m *PerpetualParams) Reset()
func (*PerpetualParams) Size ¶
func (m *PerpetualParams) Size() (n int)
func (*PerpetualParams) String ¶
func (m *PerpetualParams) String() string
func (*PerpetualParams) Unmarshal ¶
func (m *PerpetualParams) Unmarshal(dAtA []byte) error
func (*PerpetualParams) Validate ¶
func (p *PerpetualParams) Validate() error
Stateless validation on Perpetual params.
func (*PerpetualParams) XXX_DiscardUnknown ¶
func (m *PerpetualParams) XXX_DiscardUnknown()
func (*PerpetualParams) XXX_Marshal ¶
func (m *PerpetualParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PerpetualParams) XXX_Merge ¶
func (m *PerpetualParams) XXX_Merge(src proto.Message)
func (*PerpetualParams) XXX_Size ¶
func (m *PerpetualParams) XXX_Size() int
func (*PerpetualParams) XXX_Unmarshal ¶
func (m *PerpetualParams) XXX_Unmarshal(b []byte) error
type PerpetualsClobKeeper ¶
type PerpetualsClobKeeper interface { GetPricePremiumForPerpetual( ctx sdk.Context, perpetualId uint32, params GetPricePremiumParams, ) ( premiumPpm int32, err error, ) IsPerpetualClobPairActive( ctx sdk.Context, perpetualId uint32, ) ( isActive bool, err error, ) }
PerpetualsClobKeeper defines the expected interface for the clob keeper.
type PerpetualsKeeper ¶
type PerpetualsKeeper interface { MaybeProcessNewFundingTickEpoch(ctx sdk.Context) MaybeProcessNewFundingSampleEpoch(ctx sdk.Context) AddPremiumVotes(ctx sdk.Context, votes []FundingPremium) error GetNetNotional( ctx sdk.Context, id uint32, bigQuantums *big.Int, ) ( bigNetNotionalQuoteQuantums *big.Int, err error, ) GetNotionalInBaseQuantums( ctx sdk.Context, id uint32, bigQuoteQuantums *big.Int, ) ( bigBaseQuantums *big.Int, err error, ) GetNetCollateral( ctx sdk.Context, id uint32, bigQuantums *big.Int, ) ( bigNetCollateralQuoteQuantums *big.Int, err error, ) GetMarginRequirements( ctx sdk.Context, id uint32, bigQuantums *big.Int, ) ( bigInitialMarginQuoteQuantums *big.Int, bigMaintenanceMarginQuoteQuantums *big.Int, err error, ) GetAddPremiumVotes( ctx sdk.Context, ) ( msgAddPremiumVotes *MsgAddPremiumVotes, ) PerformStatefulPremiumVotesValidation( ctx sdk.Context, msg *MsgAddPremiumVotes, ) ( err error, ) HasAuthority(authority string) bool CreatePerpetual( ctx sdk.Context, id uint32, ticker string, marketId uint32, atomicResolution int32, defaultFundingPpm int32, liquidityTier uint32, marketType PerpetualMarketType, ) (Perpetual, error) ModifyPerpetual( ctx sdk.Context, id uint32, ticker string, marketId uint32, defaultFundingPpm int32, liquidityTier uint32, ) (Perpetual, error) ModifyOpenInterest( ctx sdk.Context, perpetualId uint32, openInterestDeltaBaseQuantums *big.Int, ) ( err error, ) SetLiquidityTier( ctx sdk.Context, id uint32, name string, initialMarginPpm uint32, maintenanceFractionPpm uint32, impactNotional uint64, openInterestLowerCap uint64, openInterestUpperCap uint64, ) ( liquidityTier LiquidityTier, err error, ) SetParams( ctx sdk.Context, params Params, ) error GetAllPerpetuals( ctx sdk.Context, ) []Perpetual GetAllLiquidityTiers(ctx sdk.Context) (list []LiquidityTier) SendOIUpdatesToIndexer(ctx sdk.Context) ValidateAndSetPerpetual( ctx sdk.Context, perpetual Perpetual, ) error }
Interface used by ABCI calls to access the perpetuals keeper.
type PremiumStore ¶
type PremiumStore struct { // all_market_premiums a list of `MarketPremiums`, each corresponding to // a perpetual market. AllMarketPremiums []MarketPremiums `protobuf:"bytes,1,rep,name=all_market_premiums,json=allMarketPremiums,proto3" json:"all_market_premiums"` // number of rounds where premium values were added. This value indicates // the total number of premiums (zeros and non-zeros) for each // `MarketPremiums` struct. Note that in the edge case a perpetual market was // added in the middle of a epoch, we don't keep a seperate count for that // market. This means we treat this market as having zero premiums before it // was added. NumPremiums uint32 `protobuf:"varint,2,opt,name=num_premiums,json=numPremiums,proto3" json:"num_premiums,omitempty"` }
PremiumStore is a struct to store a perpetual premiums for all perpetual markets. It stores a list of `MarketPremiums`, each of which corresponds to a perpetual market and stores a list of non-zero premium values for that market. This struct can either be used to store `PremiumVotes` or `PremiumSamples`.
func NewPremiumStoreFromMarketPremiumMap ¶
func NewPremiumStoreFromMarketPremiumMap( m map[uint32]MarketPremiums, numPremiums uint32, ) *PremiumStore
NewPremiumStoreFromMarketPremiumMap returns a new `PremiumStore` struct from a MarketPremiumMap.
func (*PremiumStore) Descriptor ¶
func (*PremiumStore) Descriptor() ([]byte, []int)
func (*PremiumStore) GetAllMarketPremiums ¶
func (m *PremiumStore) GetAllMarketPremiums() []MarketPremiums
func (*PremiumStore) GetMarketPremiumsMap ¶
func (ps *PremiumStore) GetMarketPremiumsMap() map[uint32]MarketPremiums
GetMarketPremiumsMap converts the `MarketPremiums` list stored in `PremiumStore` to a map form `perpetualId` to `MarketPremiums`.
func (*PremiumStore) GetNumPremiums ¶
func (m *PremiumStore) GetNumPremiums() uint32
func (*PremiumStore) Marshal ¶
func (m *PremiumStore) Marshal() (dAtA []byte, err error)
func (*PremiumStore) MarshalToSizedBuffer ¶
func (m *PremiumStore) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PremiumStore) ProtoMessage ¶
func (*PremiumStore) ProtoMessage()
func (*PremiumStore) Reset ¶
func (m *PremiumStore) Reset()
func (*PremiumStore) Size ¶
func (m *PremiumStore) Size() (n int)
func (*PremiumStore) String ¶
func (m *PremiumStore) String() string
func (*PremiumStore) Unmarshal ¶
func (m *PremiumStore) Unmarshal(dAtA []byte) error
func (*PremiumStore) XXX_DiscardUnknown ¶
func (m *PremiumStore) XXX_DiscardUnknown()
func (*PremiumStore) XXX_Marshal ¶
func (m *PremiumStore) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PremiumStore) XXX_Merge ¶
func (m *PremiumStore) XXX_Merge(src proto.Message)
func (*PremiumStore) XXX_Size ¶
func (m *PremiumStore) XXX_Size() int
func (*PremiumStore) XXX_Unmarshal ¶
func (m *PremiumStore) XXX_Unmarshal(b []byte) error
type PricesKeeper ¶
type PricesKeeper interface { GetMarketPrice( ctx sdk.Context, id uint32, ) (marketPrice pricestypes.MarketPrice, err error) GetMarketIdToValidIndexPrice( ctx sdk.Context, ) map[uint32]pricestypes.MarketSpotPrice }
type QueryAllLiquidityTiersRequest ¶
type QueryAllLiquidityTiersRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
Queries a list of LiquidityTier items.
func (*QueryAllLiquidityTiersRequest) Descriptor ¶
func (*QueryAllLiquidityTiersRequest) Descriptor() ([]byte, []int)
func (*QueryAllLiquidityTiersRequest) GetPagination ¶
func (m *QueryAllLiquidityTiersRequest) GetPagination() *query.PageRequest
func (*QueryAllLiquidityTiersRequest) Marshal ¶
func (m *QueryAllLiquidityTiersRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllLiquidityTiersRequest) MarshalTo ¶
func (m *QueryAllLiquidityTiersRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllLiquidityTiersRequest) MarshalToSizedBuffer ¶
func (m *QueryAllLiquidityTiersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllLiquidityTiersRequest) ProtoMessage ¶
func (*QueryAllLiquidityTiersRequest) ProtoMessage()
func (*QueryAllLiquidityTiersRequest) Reset ¶
func (m *QueryAllLiquidityTiersRequest) Reset()
func (*QueryAllLiquidityTiersRequest) Size ¶
func (m *QueryAllLiquidityTiersRequest) Size() (n int)
func (*QueryAllLiquidityTiersRequest) String ¶
func (m *QueryAllLiquidityTiersRequest) String() string
func (*QueryAllLiquidityTiersRequest) Unmarshal ¶
func (m *QueryAllLiquidityTiersRequest) Unmarshal(dAtA []byte) error
func (*QueryAllLiquidityTiersRequest) XXX_DiscardUnknown ¶
func (m *QueryAllLiquidityTiersRequest) XXX_DiscardUnknown()
func (*QueryAllLiquidityTiersRequest) XXX_Marshal ¶
func (m *QueryAllLiquidityTiersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllLiquidityTiersRequest) XXX_Merge ¶
func (m *QueryAllLiquidityTiersRequest) XXX_Merge(src proto.Message)
func (*QueryAllLiquidityTiersRequest) XXX_Size ¶
func (m *QueryAllLiquidityTiersRequest) XXX_Size() int
func (*QueryAllLiquidityTiersRequest) XXX_Unmarshal ¶
func (m *QueryAllLiquidityTiersRequest) XXX_Unmarshal(b []byte) error
type QueryAllLiquidityTiersResponse ¶
type QueryAllLiquidityTiersResponse struct { LiquidityTiers []LiquidityTier `protobuf:"bytes,1,rep,name=liquidity_tiers,json=liquidityTiers,proto3" json:"liquidity_tiers"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAllLiquidityTiersResponse is response type for the AllLiquidityTiers RPC method.
func (*QueryAllLiquidityTiersResponse) Descriptor ¶
func (*QueryAllLiquidityTiersResponse) Descriptor() ([]byte, []int)
func (*QueryAllLiquidityTiersResponse) GetLiquidityTiers ¶
func (m *QueryAllLiquidityTiersResponse) GetLiquidityTiers() []LiquidityTier
func (*QueryAllLiquidityTiersResponse) GetPagination ¶
func (m *QueryAllLiquidityTiersResponse) GetPagination() *query.PageResponse
func (*QueryAllLiquidityTiersResponse) Marshal ¶
func (m *QueryAllLiquidityTiersResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllLiquidityTiersResponse) MarshalTo ¶
func (m *QueryAllLiquidityTiersResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllLiquidityTiersResponse) MarshalToSizedBuffer ¶
func (m *QueryAllLiquidityTiersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllLiquidityTiersResponse) ProtoMessage ¶
func (*QueryAllLiquidityTiersResponse) ProtoMessage()
func (*QueryAllLiquidityTiersResponse) Reset ¶
func (m *QueryAllLiquidityTiersResponse) Reset()
func (*QueryAllLiquidityTiersResponse) Size ¶
func (m *QueryAllLiquidityTiersResponse) Size() (n int)
func (*QueryAllLiquidityTiersResponse) String ¶
func (m *QueryAllLiquidityTiersResponse) String() string
func (*QueryAllLiquidityTiersResponse) Unmarshal ¶
func (m *QueryAllLiquidityTiersResponse) Unmarshal(dAtA []byte) error
func (*QueryAllLiquidityTiersResponse) XXX_DiscardUnknown ¶
func (m *QueryAllLiquidityTiersResponse) XXX_DiscardUnknown()
func (*QueryAllLiquidityTiersResponse) XXX_Marshal ¶
func (m *QueryAllLiquidityTiersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllLiquidityTiersResponse) XXX_Merge ¶
func (m *QueryAllLiquidityTiersResponse) XXX_Merge(src proto.Message)
func (*QueryAllLiquidityTiersResponse) XXX_Size ¶
func (m *QueryAllLiquidityTiersResponse) XXX_Size() int
func (*QueryAllLiquidityTiersResponse) XXX_Unmarshal ¶
func (m *QueryAllLiquidityTiersResponse) XXX_Unmarshal(b []byte) error
type QueryAllPerpetualsRequest ¶
type QueryAllPerpetualsRequest struct {
Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}
Queries a list of Perpetual items.
func (*QueryAllPerpetualsRequest) Descriptor ¶
func (*QueryAllPerpetualsRequest) Descriptor() ([]byte, []int)
func (*QueryAllPerpetualsRequest) GetPagination ¶
func (m *QueryAllPerpetualsRequest) GetPagination() *query.PageRequest
func (*QueryAllPerpetualsRequest) Marshal ¶
func (m *QueryAllPerpetualsRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllPerpetualsRequest) MarshalTo ¶
func (m *QueryAllPerpetualsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllPerpetualsRequest) MarshalToSizedBuffer ¶
func (m *QueryAllPerpetualsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllPerpetualsRequest) ProtoMessage ¶
func (*QueryAllPerpetualsRequest) ProtoMessage()
func (*QueryAllPerpetualsRequest) Reset ¶
func (m *QueryAllPerpetualsRequest) Reset()
func (*QueryAllPerpetualsRequest) Size ¶
func (m *QueryAllPerpetualsRequest) Size() (n int)
func (*QueryAllPerpetualsRequest) String ¶
func (m *QueryAllPerpetualsRequest) String() string
func (*QueryAllPerpetualsRequest) Unmarshal ¶
func (m *QueryAllPerpetualsRequest) Unmarshal(dAtA []byte) error
func (*QueryAllPerpetualsRequest) XXX_DiscardUnknown ¶
func (m *QueryAllPerpetualsRequest) XXX_DiscardUnknown()
func (*QueryAllPerpetualsRequest) XXX_Marshal ¶
func (m *QueryAllPerpetualsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllPerpetualsRequest) XXX_Merge ¶
func (m *QueryAllPerpetualsRequest) XXX_Merge(src proto.Message)
func (*QueryAllPerpetualsRequest) XXX_Size ¶
func (m *QueryAllPerpetualsRequest) XXX_Size() int
func (*QueryAllPerpetualsRequest) XXX_Unmarshal ¶
func (m *QueryAllPerpetualsRequest) XXX_Unmarshal(b []byte) error
type QueryAllPerpetualsResponse ¶
type QueryAllPerpetualsResponse struct { Perpetual []Perpetual `protobuf:"bytes,1,rep,name=perpetual,proto3" json:"perpetual"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAllPerpetualsResponse is response type for the AllPerpetuals RPC method.
func (*QueryAllPerpetualsResponse) Descriptor ¶
func (*QueryAllPerpetualsResponse) Descriptor() ([]byte, []int)
func (*QueryAllPerpetualsResponse) GetPagination ¶
func (m *QueryAllPerpetualsResponse) GetPagination() *query.PageResponse
func (*QueryAllPerpetualsResponse) GetPerpetual ¶
func (m *QueryAllPerpetualsResponse) GetPerpetual() []Perpetual
func (*QueryAllPerpetualsResponse) Marshal ¶
func (m *QueryAllPerpetualsResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllPerpetualsResponse) MarshalTo ¶
func (m *QueryAllPerpetualsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllPerpetualsResponse) MarshalToSizedBuffer ¶
func (m *QueryAllPerpetualsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllPerpetualsResponse) ProtoMessage ¶
func (*QueryAllPerpetualsResponse) ProtoMessage()
func (*QueryAllPerpetualsResponse) Reset ¶
func (m *QueryAllPerpetualsResponse) Reset()
func (*QueryAllPerpetualsResponse) Size ¶
func (m *QueryAllPerpetualsResponse) Size() (n int)
func (*QueryAllPerpetualsResponse) String ¶
func (m *QueryAllPerpetualsResponse) String() string
func (*QueryAllPerpetualsResponse) Unmarshal ¶
func (m *QueryAllPerpetualsResponse) Unmarshal(dAtA []byte) error
func (*QueryAllPerpetualsResponse) XXX_DiscardUnknown ¶
func (m *QueryAllPerpetualsResponse) XXX_DiscardUnknown()
func (*QueryAllPerpetualsResponse) XXX_Marshal ¶
func (m *QueryAllPerpetualsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllPerpetualsResponse) XXX_Merge ¶
func (m *QueryAllPerpetualsResponse) XXX_Merge(src proto.Message)
func (*QueryAllPerpetualsResponse) XXX_Size ¶
func (m *QueryAllPerpetualsResponse) XXX_Size() int
func (*QueryAllPerpetualsResponse) XXX_Unmarshal ¶
func (m *QueryAllPerpetualsResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Queries a Perpetual by id. Perpetual(ctx context.Context, in *QueryPerpetualRequest, opts ...grpc.CallOption) (*QueryPerpetualResponse, error) // Queries a list of Perpetual items. AllPerpetuals(ctx context.Context, in *QueryAllPerpetualsRequest, opts ...grpc.CallOption) (*QueryAllPerpetualsResponse, error) // Queries a list of LiquidityTiers. AllLiquidityTiers(ctx context.Context, in *QueryAllLiquidityTiersRequest, opts ...grpc.CallOption) (*QueryAllLiquidityTiersResponse, error) // Queries a list of premium votes. PremiumVotes(ctx context.Context, in *QueryPremiumVotesRequest, opts ...grpc.CallOption) (*QueryPremiumVotesResponse, error) // Queries a list of premium samples. PremiumSamples(ctx context.Context, in *QueryPremiumSamplesRequest, opts ...grpc.CallOption) (*QueryPremiumSamplesResponse, error) // Queries the perpetual params. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsResponse is the response type for the Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse is the response type for the Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryPerpetualRequest ¶
type QueryPerpetualRequest struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
Queries a Perpetual by id.
func (*QueryPerpetualRequest) Descriptor ¶
func (*QueryPerpetualRequest) Descriptor() ([]byte, []int)
func (*QueryPerpetualRequest) GetId ¶
func (m *QueryPerpetualRequest) GetId() uint32
func (*QueryPerpetualRequest) Marshal ¶
func (m *QueryPerpetualRequest) Marshal() (dAtA []byte, err error)
func (*QueryPerpetualRequest) MarshalTo ¶
func (m *QueryPerpetualRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPerpetualRequest) MarshalToSizedBuffer ¶
func (m *QueryPerpetualRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPerpetualRequest) ProtoMessage ¶
func (*QueryPerpetualRequest) ProtoMessage()
func (*QueryPerpetualRequest) Reset ¶
func (m *QueryPerpetualRequest) Reset()
func (*QueryPerpetualRequest) Size ¶
func (m *QueryPerpetualRequest) Size() (n int)
func (*QueryPerpetualRequest) String ¶
func (m *QueryPerpetualRequest) String() string
func (*QueryPerpetualRequest) Unmarshal ¶
func (m *QueryPerpetualRequest) Unmarshal(dAtA []byte) error
func (*QueryPerpetualRequest) XXX_DiscardUnknown ¶
func (m *QueryPerpetualRequest) XXX_DiscardUnknown()
func (*QueryPerpetualRequest) XXX_Marshal ¶
func (m *QueryPerpetualRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPerpetualRequest) XXX_Merge ¶
func (m *QueryPerpetualRequest) XXX_Merge(src proto.Message)
func (*QueryPerpetualRequest) XXX_Size ¶
func (m *QueryPerpetualRequest) XXX_Size() int
func (*QueryPerpetualRequest) XXX_Unmarshal ¶
func (m *QueryPerpetualRequest) XXX_Unmarshal(b []byte) error
type QueryPerpetualResponse ¶
type QueryPerpetualResponse struct {
Perpetual Perpetual `protobuf:"bytes,1,opt,name=perpetual,proto3" json:"perpetual"`
}
QueryPerpetualResponse is response type for the Perpetual RPC method.
func (*QueryPerpetualResponse) Descriptor ¶
func (*QueryPerpetualResponse) Descriptor() ([]byte, []int)
func (*QueryPerpetualResponse) GetPerpetual ¶
func (m *QueryPerpetualResponse) GetPerpetual() Perpetual
func (*QueryPerpetualResponse) Marshal ¶
func (m *QueryPerpetualResponse) Marshal() (dAtA []byte, err error)
func (*QueryPerpetualResponse) MarshalTo ¶
func (m *QueryPerpetualResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPerpetualResponse) MarshalToSizedBuffer ¶
func (m *QueryPerpetualResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPerpetualResponse) ProtoMessage ¶
func (*QueryPerpetualResponse) ProtoMessage()
func (*QueryPerpetualResponse) Reset ¶
func (m *QueryPerpetualResponse) Reset()
func (*QueryPerpetualResponse) Size ¶
func (m *QueryPerpetualResponse) Size() (n int)
func (*QueryPerpetualResponse) String ¶
func (m *QueryPerpetualResponse) String() string
func (*QueryPerpetualResponse) Unmarshal ¶
func (m *QueryPerpetualResponse) Unmarshal(dAtA []byte) error
func (*QueryPerpetualResponse) XXX_DiscardUnknown ¶
func (m *QueryPerpetualResponse) XXX_DiscardUnknown()
func (*QueryPerpetualResponse) XXX_Marshal ¶
func (m *QueryPerpetualResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPerpetualResponse) XXX_Merge ¶
func (m *QueryPerpetualResponse) XXX_Merge(src proto.Message)
func (*QueryPerpetualResponse) XXX_Size ¶
func (m *QueryPerpetualResponse) XXX_Size() int
func (*QueryPerpetualResponse) XXX_Unmarshal ¶
func (m *QueryPerpetualResponse) XXX_Unmarshal(b []byte) error
type QueryPremiumSamplesRequest ¶
type QueryPremiumSamplesRequest struct { }
QueryPremiumSamplesRequest is the request type for the PremiumSamples RPC method.
func (*QueryPremiumSamplesRequest) Descriptor ¶
func (*QueryPremiumSamplesRequest) Descriptor() ([]byte, []int)
func (*QueryPremiumSamplesRequest) Marshal ¶
func (m *QueryPremiumSamplesRequest) Marshal() (dAtA []byte, err error)
func (*QueryPremiumSamplesRequest) MarshalTo ¶
func (m *QueryPremiumSamplesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPremiumSamplesRequest) MarshalToSizedBuffer ¶
func (m *QueryPremiumSamplesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPremiumSamplesRequest) ProtoMessage ¶
func (*QueryPremiumSamplesRequest) ProtoMessage()
func (*QueryPremiumSamplesRequest) Reset ¶
func (m *QueryPremiumSamplesRequest) Reset()
func (*QueryPremiumSamplesRequest) Size ¶
func (m *QueryPremiumSamplesRequest) Size() (n int)
func (*QueryPremiumSamplesRequest) String ¶
func (m *QueryPremiumSamplesRequest) String() string
func (*QueryPremiumSamplesRequest) Unmarshal ¶
func (m *QueryPremiumSamplesRequest) Unmarshal(dAtA []byte) error
func (*QueryPremiumSamplesRequest) XXX_DiscardUnknown ¶
func (m *QueryPremiumSamplesRequest) XXX_DiscardUnknown()
func (*QueryPremiumSamplesRequest) XXX_Marshal ¶
func (m *QueryPremiumSamplesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPremiumSamplesRequest) XXX_Merge ¶
func (m *QueryPremiumSamplesRequest) XXX_Merge(src proto.Message)
func (*QueryPremiumSamplesRequest) XXX_Size ¶
func (m *QueryPremiumSamplesRequest) XXX_Size() int
func (*QueryPremiumSamplesRequest) XXX_Unmarshal ¶
func (m *QueryPremiumSamplesRequest) XXX_Unmarshal(b []byte) error
type QueryPremiumSamplesResponse ¶
type QueryPremiumSamplesResponse struct {
PremiumSamples PremiumStore `protobuf:"bytes,1,opt,name=premium_samples,json=premiumSamples,proto3" json:"premium_samples"`
}
QueryPremiumSamplesResponse is the response type for the PremiumSamples RPC method.
func (*QueryPremiumSamplesResponse) Descriptor ¶
func (*QueryPremiumSamplesResponse) Descriptor() ([]byte, []int)
func (*QueryPremiumSamplesResponse) GetPremiumSamples ¶
func (m *QueryPremiumSamplesResponse) GetPremiumSamples() PremiumStore
func (*QueryPremiumSamplesResponse) Marshal ¶
func (m *QueryPremiumSamplesResponse) Marshal() (dAtA []byte, err error)
func (*QueryPremiumSamplesResponse) MarshalTo ¶
func (m *QueryPremiumSamplesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPremiumSamplesResponse) MarshalToSizedBuffer ¶
func (m *QueryPremiumSamplesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPremiumSamplesResponse) ProtoMessage ¶
func (*QueryPremiumSamplesResponse) ProtoMessage()
func (*QueryPremiumSamplesResponse) Reset ¶
func (m *QueryPremiumSamplesResponse) Reset()
func (*QueryPremiumSamplesResponse) Size ¶
func (m *QueryPremiumSamplesResponse) Size() (n int)
func (*QueryPremiumSamplesResponse) String ¶
func (m *QueryPremiumSamplesResponse) String() string
func (*QueryPremiumSamplesResponse) Unmarshal ¶
func (m *QueryPremiumSamplesResponse) Unmarshal(dAtA []byte) error
func (*QueryPremiumSamplesResponse) XXX_DiscardUnknown ¶
func (m *QueryPremiumSamplesResponse) XXX_DiscardUnknown()
func (*QueryPremiumSamplesResponse) XXX_Marshal ¶
func (m *QueryPremiumSamplesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPremiumSamplesResponse) XXX_Merge ¶
func (m *QueryPremiumSamplesResponse) XXX_Merge(src proto.Message)
func (*QueryPremiumSamplesResponse) XXX_Size ¶
func (m *QueryPremiumSamplesResponse) XXX_Size() int
func (*QueryPremiumSamplesResponse) XXX_Unmarshal ¶
func (m *QueryPremiumSamplesResponse) XXX_Unmarshal(b []byte) error
type QueryPremiumVotesRequest ¶
type QueryPremiumVotesRequest struct { }
QueryPremiumVotesRequest is the request type for the PremiumVotes RPC method.
func (*QueryPremiumVotesRequest) Descriptor ¶
func (*QueryPremiumVotesRequest) Descriptor() ([]byte, []int)
func (*QueryPremiumVotesRequest) Marshal ¶
func (m *QueryPremiumVotesRequest) Marshal() (dAtA []byte, err error)
func (*QueryPremiumVotesRequest) MarshalTo ¶
func (m *QueryPremiumVotesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPremiumVotesRequest) MarshalToSizedBuffer ¶
func (m *QueryPremiumVotesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPremiumVotesRequest) ProtoMessage ¶
func (*QueryPremiumVotesRequest) ProtoMessage()
func (*QueryPremiumVotesRequest) Reset ¶
func (m *QueryPremiumVotesRequest) Reset()
func (*QueryPremiumVotesRequest) Size ¶
func (m *QueryPremiumVotesRequest) Size() (n int)
func (*QueryPremiumVotesRequest) String ¶
func (m *QueryPremiumVotesRequest) String() string
func (*QueryPremiumVotesRequest) Unmarshal ¶
func (m *QueryPremiumVotesRequest) Unmarshal(dAtA []byte) error
func (*QueryPremiumVotesRequest) XXX_DiscardUnknown ¶
func (m *QueryPremiumVotesRequest) XXX_DiscardUnknown()
func (*QueryPremiumVotesRequest) XXX_Marshal ¶
func (m *QueryPremiumVotesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPremiumVotesRequest) XXX_Merge ¶
func (m *QueryPremiumVotesRequest) XXX_Merge(src proto.Message)
func (*QueryPremiumVotesRequest) XXX_Size ¶
func (m *QueryPremiumVotesRequest) XXX_Size() int
func (*QueryPremiumVotesRequest) XXX_Unmarshal ¶
func (m *QueryPremiumVotesRequest) XXX_Unmarshal(b []byte) error
type QueryPremiumVotesResponse ¶
type QueryPremiumVotesResponse struct {
PremiumVotes PremiumStore `protobuf:"bytes,1,opt,name=premium_votes,json=premiumVotes,proto3" json:"premium_votes"`
}
QueryPremiumVotesResponse is the response type for the PremiumVotes RPC method.
func (*QueryPremiumVotesResponse) Descriptor ¶
func (*QueryPremiumVotesResponse) Descriptor() ([]byte, []int)
func (*QueryPremiumVotesResponse) GetPremiumVotes ¶
func (m *QueryPremiumVotesResponse) GetPremiumVotes() PremiumStore
func (*QueryPremiumVotesResponse) Marshal ¶
func (m *QueryPremiumVotesResponse) Marshal() (dAtA []byte, err error)
func (*QueryPremiumVotesResponse) MarshalTo ¶
func (m *QueryPremiumVotesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPremiumVotesResponse) MarshalToSizedBuffer ¶
func (m *QueryPremiumVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPremiumVotesResponse) ProtoMessage ¶
func (*QueryPremiumVotesResponse) ProtoMessage()
func (*QueryPremiumVotesResponse) Reset ¶
func (m *QueryPremiumVotesResponse) Reset()
func (*QueryPremiumVotesResponse) Size ¶
func (m *QueryPremiumVotesResponse) Size() (n int)
func (*QueryPremiumVotesResponse) String ¶
func (m *QueryPremiumVotesResponse) String() string
func (*QueryPremiumVotesResponse) Unmarshal ¶
func (m *QueryPremiumVotesResponse) Unmarshal(dAtA []byte) error
func (*QueryPremiumVotesResponse) XXX_DiscardUnknown ¶
func (m *QueryPremiumVotesResponse) XXX_DiscardUnknown()
func (*QueryPremiumVotesResponse) XXX_Marshal ¶
func (m *QueryPremiumVotesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPremiumVotesResponse) XXX_Merge ¶
func (m *QueryPremiumVotesResponse) XXX_Merge(src proto.Message)
func (*QueryPremiumVotesResponse) XXX_Size ¶
func (m *QueryPremiumVotesResponse) XXX_Size() int
func (*QueryPremiumVotesResponse) XXX_Unmarshal ¶
func (m *QueryPremiumVotesResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Queries a Perpetual by id. Perpetual(context.Context, *QueryPerpetualRequest) (*QueryPerpetualResponse, error) // Queries a list of Perpetual items. AllPerpetuals(context.Context, *QueryAllPerpetualsRequest) (*QueryAllPerpetualsResponse, error) // Queries a list of LiquidityTiers. AllLiquidityTiers(context.Context, *QueryAllLiquidityTiersRequest) (*QueryAllLiquidityTiersResponse, error) // Queries a list of premium votes. PremiumVotes(context.Context, *QueryPremiumVotesRequest) (*QueryPremiumVotesResponse, error) // Queries a list of premium samples. PremiumSamples(context.Context, *QueryPremiumSamplesRequest) (*QueryPremiumSamplesResponse, error) // Queries the perpetual params. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, 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) AddPremiumVotes ¶
func (*UnimplementedMsgServer) AddPremiumVotes(ctx context.Context, req *MsgAddPremiumVotes) (*MsgAddPremiumVotesResponse, error)
func (*UnimplementedMsgServer) CreatePerpetual ¶
func (*UnimplementedMsgServer) CreatePerpetual(ctx context.Context, req *MsgCreatePerpetual) (*MsgCreatePerpetualResponse, error)
func (*UnimplementedMsgServer) SetLiquidityTier ¶
func (*UnimplementedMsgServer) SetLiquidityTier(ctx context.Context, req *MsgSetLiquidityTier) (*MsgSetLiquidityTierResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
func (*UnimplementedMsgServer) UpdatePerpetualParams ¶
func (*UnimplementedMsgServer) UpdatePerpetualParams(ctx context.Context, req *MsgUpdatePerpetualParams) (*MsgUpdatePerpetualParamsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) AllLiquidityTiers ¶
func (*UnimplementedQueryServer) AllLiquidityTiers(ctx context.Context, req *QueryAllLiquidityTiersRequest) (*QueryAllLiquidityTiersResponse, error)
func (*UnimplementedQueryServer) AllPerpetuals ¶
func (*UnimplementedQueryServer) AllPerpetuals(ctx context.Context, req *QueryAllPerpetualsRequest) (*QueryAllPerpetualsResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Perpetual ¶
func (*UnimplementedQueryServer) Perpetual(ctx context.Context, req *QueryPerpetualRequest) (*QueryPerpetualResponse, error)
func (*UnimplementedQueryServer) PremiumSamples ¶
func (*UnimplementedQueryServer) PremiumSamples(ctx context.Context, req *QueryPremiumSamplesRequest) (*QueryPremiumSamplesResponse, error)
func (*UnimplementedQueryServer) PremiumVotes ¶
func (*UnimplementedQueryServer) PremiumVotes(ctx context.Context, req *QueryPremiumVotesRequest) (*QueryPremiumVotesResponse, error)
Source Files ¶
- addresses.go
- codec.go
- constants.go
- errors.go
- expected_keepers.go
- genesis.go
- genesis.pb.go
- keys.go
- liquidity_tier.go
- message_add_premium_votes.go
- message_create_perpetual.go
- message_set_liquidity_tier.go
- message_update_params.go
- message_update_perpetual_params.go
- params.go
- params.pb.go
- perpetual.go
- perpetual.pb.go
- premium_store.go
- query.pb.go
- query.pb.gw.go
- tx.pb.go
- types.go