types

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeApplyMarketMaker     = "apply_market_maker"
	EventTypeClaimIncentives      = "claim_incentives"
	EventTypeIncludeMarketMaker   = "include_market_maker"
	EventTypeExcludeMarketMaker   = "exclude_market_maker"
	EventTypeRejectMarketMaker    = "reject_market_maker"
	EventTypeDistributeIncentives = "distribute_incentives"

	AttributeKeyAddress         = "address"
	AttributeKeyPairIds         = "pair_ids"
	AttributeKeyPairId          = "pair_id"
	AttributeKeyBudgetAddress   = "budget_address"
	AttributeKeyTotalIncentives = "total_incentives"

	AttributeValueCategory = ModuleName
)

Event types for the marketmaker module.

View Source
const (
	// ModuleName is the name of the marketmaker module
	ModuleName = "marketmaker"

	// RouterKey is the message router key for the marketmaker module
	RouterKey = ModuleName

	// StoreKey is the default store key for the marketmaker module
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the marketmaker module
	QuerierRoute = ModuleName
)
View Source
const (
	TypeMsgApplyMarketMaker = "apply_market_maker"
	TypeMsgClaimIncentives  = "claim_incentives"
)

Message types for the marketmaker module

View Source
const (
	AddressType                             = farmingtypes.AddressType32Bytes
	ClaimableIncentiveReserveAccName string = "ClaimableIncentiveReserveAcc"
)
View Source
const (
	ProposalTypeMarketMaker string = "MarketMaker"
)

Variables

View Source
var (
	ErrAlreadyExistMarketMaker = sdkerrors.Register(ModuleName, 2, "already exist market maker")
	ErrEmptyClaimableIncentive = sdkerrors.Register(ModuleName, 3, "empty claimable incentives")
	ErrNotExistMarketMaker     = sdkerrors.Register(ModuleName, 4, "not exist market maker")
	ErrInvalidPairId           = sdkerrors.Register(ModuleName, 5, "invalid pair id")
	ErrUnregisteredPairId      = sdkerrors.Register(ModuleName, 6, "unregistered pair id")
	ErrInvalidDeposit          = sdkerrors.Register(ModuleName, 7, "invalid apply deposit")
	ErrInvalidInclusion        = sdkerrors.Register(ModuleName, 8, "invalid inclusion, already eligible")
	ErrInvalidExclusion        = sdkerrors.Register(ModuleName, 9, "invalid exclusion, not eligible")
	ErrInvalidRejection        = sdkerrors.Register(ModuleName, 10, "invalid rejection, already eligible")
	ErrNotEligibleMarketMaker  = sdkerrors.Register(ModuleName, 11, "invalid distribution, not eligible")
)

marketmaker module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	MarketMakerKeyPrefix              = []byte{0xc0}
	MarketMakerIndexByPairIdKeyPrefix = []byte{0xc1}
	DepositKeyPrefix                  = []byte{0xc2}

	IncentiveKeyPrefix = []byte{0xc5}
)

keys for marketmaker store prefixes

View Source
var (
	ErrInvalidLengthMarketmaker        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMarketmaker          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMarketmaker = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyIncentiveBudgetAddress = []byte("IncentiveBudgetAddress")
	KeyDepositAmount          = []byte("DepositAmount")
	KeyCommon                 = []byte("Common")
	KeyIncentivePairs         = []byte("IncentivePairs")

	DefaultIncentiveBudgetAddress = farmingtypes.DeriveAddress(AddressType, farmingtypes.ModuleName, "ecosystem_incentive_mm")
	DefaultDepositAmount          = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(1000000000)))
	DefaultCommon                 = Common{
		MinOpenRatio:      sdk.MustNewDecFromStr("0.5"),
		MinOpenDepthRatio: sdk.MustNewDecFromStr("0.1"),
		MaxDowntime:       uint32(20),
		MaxTotalDowntime:  uint32(100),
		MinHours:          uint32(16),
		MinDays:           uint32(22),
	}

	ClaimableIncentiveReserveAcc = farmingtypes.DeriveAddress(AddressType, ModuleName, ClaimableIncentiveReserveAccName)
	DepositReserveAcc            = sdk.AccAddress(crypto.AddressHash([]byte(ModuleName)))
)

Parameter store keys

View Source
var (
	ErrInvalidLengthProposal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// ModuleCdc references the global x/marketmaker module codec. Note, the codec
	// should ONLY be used in certain instances of tests and for JSON encoding as Amino
	// is still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/marketmaker and
	// defined at the application level.
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func GetAccAddress

func GetAccAddress(address string) sdk.AccAddress

func GetDepositKey

func GetDepositKey(mmAddr sdk.AccAddress, pairId uint64) []byte

GetDepositKey returns a key for a market maker record.

func GetIncentiveKey

func GetIncentiveKey(mmAddr sdk.AccAddress) []byte

GetIncentiveKey returns kv indexing key of the incentive

func GetMarketMakerByAddrPrefix

func GetMarketMakerByAddrPrefix(mmAddr sdk.AccAddress) []byte

GetMarketMakerByAddrPrefix returns a key prefix used to iterate market makers by a address.

func GetMarketMakerByPairIdPrefix

func GetMarketMakerByPairIdPrefix(pairId uint64) []byte

GetMarketMakerByPairIdPrefix returns a key prefix used to iterate market makers by a pair id.

func GetMarketMakerIndexByPairIdKey

func GetMarketMakerIndexByPairIdKey(pairId uint64, mmAddress sdk.AccAddress) []byte

GetMarketMakerIndexByPairIdKey returns a key for a market maker record.

func GetMarketMakerKey

func GetMarketMakerKey(mmAddr sdk.AccAddress, pairId uint64) []byte

GetMarketMakerKey returns a key for a market maker record.

func ParamKeyTable

func ParamKeyTable() paramstypes.KeyTable

ParamKeyTable returns the parameter key table.

func ParseDepositKey

func ParseDepositKey(key []byte) (mmAddr sdk.AccAddress, pairId uint64)

ParseDepositKey parses a deposit key.

func ParseMarketMakerIndexByPairIdKey

func ParseMarketMakerIndexByPairIdKey(key []byte) (pairId uint64, mmAddr sdk.AccAddress)

ParseMarketMakerIndexByPairIdKey parses a market maker index by pair id key.

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the x/marketmaker interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/marketmaker interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateDepositRecords

func ValidateDepositRecords(mms []MarketMaker, DepositRecords []DepositRecord) error

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates GenesisState.

func ValidateMarketMaker

func ValidateMarketMaker(address string, pairId uint64) error

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	GetModuleAddress(name string) sdk.AccAddress
}

AccountKeeper defines the expected account keeper

type BankKeeper

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	// MintCoins is used only for simulation test codes
	MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
}

BankKeeper defines the expected bank send keeper

type Common

type Common struct {
	// Minimum ratio to maintain the tick order
	MinOpenRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 161-byte string literal not displayed */
	// Minimum ratio of open amount to MinDepth
	MinOpenDepthRatio github_com_cosmos_cosmos_sdk_types.Dec `` /* 184-byte string literal not displayed */
	// Maximum allowable consecutive blocks of outage
	MaxDowntime uint32 `protobuf:"varint,3,opt,name=max_downtime,json=maxDowntime,proto3" json:"max_downtime,omitempty" yaml:"max_downtime"`
	// Maximum allowable sum of blocks in an hour
	MaxTotalDowntime uint32 `` /* 138-byte string literal not displayed */
	// Minimum value of LiveHour to achieve LiveDay
	MinHours uint32 `protobuf:"varint,5,opt,name=min_hours,json=minHours,proto3" json:"min_hours,omitempty" yaml:"min_hours"`
	// Minimum value of LiveDay to maintain MM eligibility
	MinDays uint32 `protobuf:"varint,6,opt,name=min_days,json=minDays,proto3" json:"min_days,omitempty" yaml:"min_days"`
}

func (*Common) Descriptor

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

func (*Common) Marshal

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

func (*Common) MarshalTo

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

func (*Common) MarshalToSizedBuffer

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

func (*Common) ProtoMessage

func (*Common) ProtoMessage()

func (*Common) Reset

func (m *Common) Reset()

func (*Common) Size

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

func (*Common) String

func (m *Common) String() string

func (*Common) Unmarshal

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

func (*Common) XXX_DiscardUnknown

func (m *Common) XXX_DiscardUnknown()

func (*Common) XXX_Marshal

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

func (*Common) XXX_Merge

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

func (*Common) XXX_Size

func (m *Common) XXX_Size() int

func (*Common) XXX_Unmarshal

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

type Deposit

type Deposit struct {
	Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"`
}

stores apply deposit amount for a future refund

func (*Deposit) Descriptor

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

func (*Deposit) Marshal

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

func (*Deposit) MarshalTo

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

func (*Deposit) MarshalToSizedBuffer

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

func (*Deposit) ProtoMessage

func (*Deposit) ProtoMessage()

func (*Deposit) Reset

func (m *Deposit) Reset()

func (*Deposit) Size

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

func (*Deposit) String

func (m *Deposit) String() string

func (*Deposit) Unmarshal

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

func (*Deposit) XXX_DiscardUnknown

func (m *Deposit) XXX_DiscardUnknown()

func (*Deposit) XXX_Marshal

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

func (*Deposit) XXX_Merge

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

func (*Deposit) XXX_Size

func (m *Deposit) XXX_Size() int

func (*Deposit) XXX_Unmarshal

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

type DepositRecord

type DepositRecord struct {
	Address string                                   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	PairId  uint64                                   `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty" yaml:"pair_id"`
	Amount  github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"`
}

func (*DepositRecord) Descriptor

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

func (DepositRecord) GetAccAddress

func (idr DepositRecord) GetAccAddress() sdk.AccAddress

func (*DepositRecord) Marshal

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

func (*DepositRecord) MarshalTo

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

func (*DepositRecord) MarshalToSizedBuffer

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

func (*DepositRecord) ProtoMessage

func (*DepositRecord) ProtoMessage()

func (*DepositRecord) Reset

func (m *DepositRecord) Reset()

func (*DepositRecord) Size

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

func (*DepositRecord) String

func (m *DepositRecord) String() string

func (*DepositRecord) Unmarshal

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

func (DepositRecord) Validate

func (idr DepositRecord) Validate() error

func (*DepositRecord) XXX_DiscardUnknown

func (m *DepositRecord) XXX_DiscardUnknown()

func (*DepositRecord) XXX_Marshal

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

func (*DepositRecord) XXX_Merge

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

func (*DepositRecord) XXX_Size

func (m *DepositRecord) XXX_Size() int

func (*DepositRecord) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// params defines all the parameters for the marketmaker module
	Params         Params          `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	MarketMakers   []MarketMaker   `protobuf:"bytes,2,rep,name=market_makers,json=marketMakers,proto3" json:"market_makers" yaml:"market_makers"`
	Incentives     []Incentive     `protobuf:"bytes,3,rep,name=incentives,proto3" json:"incentives" yaml:"incentives"`
	DepositRecords []DepositRecord `protobuf:"bytes,4,rep,name=deposit_records,json=depositRecords,proto3" json:"deposit_records" yaml:"deposit_records"`
}

GenesisState defines the marketmaker module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns the default genesis state.

func NewGenesisState

func NewGenesisState(
	params Params, marketMakers []MarketMaker, incentives []Incentive, depositRecords []DepositRecord,
) *GenesisState

NewGenesisState returns new GenesisState.

func (*GenesisState) Descriptor

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

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (*GenesisState) 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 Incentive

type Incentive struct {
	Address   string                                   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	Claimable github_com_cosmos_cosmos_sdk_types.Coins `` /* 132-byte string literal not displayed */
}

Store the total amount of incentives distributed through `MarketMakerProposal`, and it can be claimed at once through `MsgClaimIncentives`

func (*Incentive) Descriptor

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

func (Incentive) GetAccAddress

func (i Incentive) GetAccAddress() sdk.AccAddress

func (*Incentive) Marshal

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

func (*Incentive) MarshalTo

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

func (*Incentive) MarshalToSizedBuffer

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

func (*Incentive) ProtoMessage

func (*Incentive) ProtoMessage()

func (*Incentive) Reset

func (m *Incentive) Reset()

func (*Incentive) Size

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

func (*Incentive) String

func (m *Incentive) String() string

func (*Incentive) Unmarshal

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

func (Incentive) Validate

func (i Incentive) Validate() error

func (*Incentive) XXX_DiscardUnknown

func (m *Incentive) XXX_DiscardUnknown()

func (*Incentive) XXX_Marshal

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

func (*Incentive) XXX_Merge

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

func (*Incentive) XXX_Size

func (m *Incentive) XXX_Size() int

func (*Incentive) XXX_Unmarshal

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

type IncentiveDistribution

type IncentiveDistribution struct {
	Address string                                   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	PairId  uint64                                   `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty" yaml:"pair_id"`
	Amount  github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"`
}

func (*IncentiveDistribution) Descriptor

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

func (IncentiveDistribution) GetAccAddress

func (id IncentiveDistribution) GetAccAddress() sdk.AccAddress

func (*IncentiveDistribution) Marshal

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

func (*IncentiveDistribution) MarshalTo

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

func (*IncentiveDistribution) MarshalToSizedBuffer

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

func (*IncentiveDistribution) ProtoMessage

func (*IncentiveDistribution) ProtoMessage()

func (*IncentiveDistribution) Reset

func (m *IncentiveDistribution) Reset()

func (*IncentiveDistribution) Size

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

func (*IncentiveDistribution) String

func (m *IncentiveDistribution) String() string

func (*IncentiveDistribution) Unmarshal

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

func (IncentiveDistribution) Validate

func (id IncentiveDistribution) Validate() error

func (*IncentiveDistribution) XXX_DiscardUnknown

func (m *IncentiveDistribution) XXX_DiscardUnknown()

func (*IncentiveDistribution) XXX_Marshal

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

func (*IncentiveDistribution) XXX_Merge

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

func (*IncentiveDistribution) XXX_Size

func (m *IncentiveDistribution) XXX_Size() int

func (*IncentiveDistribution) XXX_Unmarshal

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

type IncentivePair

type IncentivePair struct {
	// Pair id of liquidity module
	PairId uint64 `protobuf:"varint,1,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty" yaml:"pair_id"`
	// Time the pair variables start to be applied to the scoring system
	UpdateTime time.Time `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,stdtime" json:"update_time" yaml:"update_time"`
	// Incentive weights for each pair
	IncentiveWeight github_com_cosmos_cosmos_sdk_types.Dec `` /* 170-byte string literal not displayed */
	// Maximum allowable spread between bid and ask
	MaxSpread github_com_cosmos_cosmos_sdk_types.Dec `` /* 146-byte string literal not displayed */
	// Minimum allowable price difference of high and low on both side of orders
	MinWidth github_com_cosmos_cosmos_sdk_types.Dec `` /* 142-byte string literal not displayed */
	// Minimum allowable order depth on each side
	MinDepth github_com_cosmos_cosmos_sdk_types.Int `` /* 142-byte string literal not displayed */
}

func (*IncentivePair) Descriptor

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

func (*IncentivePair) Marshal

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

func (*IncentivePair) MarshalTo

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

func (*IncentivePair) MarshalToSizedBuffer

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

func (*IncentivePair) ProtoMessage

func (*IncentivePair) ProtoMessage()

func (*IncentivePair) Reset

func (m *IncentivePair) Reset()

func (*IncentivePair) Size

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

func (*IncentivePair) String

func (m *IncentivePair) String() string

func (*IncentivePair) Unmarshal

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

func (*IncentivePair) XXX_DiscardUnknown

func (m *IncentivePair) XXX_DiscardUnknown()

func (*IncentivePair) XXX_Marshal

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

func (*IncentivePair) XXX_Merge

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

func (*IncentivePair) XXX_Size

func (m *IncentivePair) XXX_Size() int

func (*IncentivePair) XXX_Unmarshal

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

type MarketMaker

type MarketMaker struct {
	Address  string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	PairId   uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty" yaml:"pair_id"`
	Eligible bool   `protobuf:"varint,3,opt,name=eligible,proto3" json:"eligible,omitempty" yaml:"eligible"`
}

Market maker object created by applying, if included through `MarketMakerProposal`, eligible becomes true and is deleted if rejected or excluded

func UnmarshalMarketMaker

func UnmarshalMarketMaker(cdc codec.BinaryCodec, value []byte) (mm MarketMaker, err error)

func (*MarketMaker) Descriptor

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

func (MarketMaker) GetAccAddress

func (mm MarketMaker) GetAccAddress() sdk.AccAddress

func (*MarketMaker) Marshal

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

func (*MarketMaker) MarshalTo

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

func (*MarketMaker) MarshalToSizedBuffer

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

func (*MarketMaker) ProtoMessage

func (*MarketMaker) ProtoMessage()

func (*MarketMaker) Reset

func (m *MarketMaker) Reset()

func (*MarketMaker) Size

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

func (*MarketMaker) String

func (m *MarketMaker) String() string

func (*MarketMaker) Unmarshal

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

func (MarketMaker) Validate

func (mm MarketMaker) Validate() error

func (*MarketMaker) XXX_DiscardUnknown

func (m *MarketMaker) XXX_DiscardUnknown()

func (*MarketMaker) XXX_Marshal

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

func (*MarketMaker) XXX_Merge

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

func (*MarketMaker) XXX_Size

func (m *MarketMaker) XXX_Size() int

func (*MarketMaker) XXX_Unmarshal

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

type MarketMakerHandle

type MarketMakerHandle struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	PairId  uint64 `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty" yaml:"pair_id"`
}

func (*MarketMakerHandle) Descriptor

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

func (MarketMakerHandle) GetAccAddress

func (mm MarketMakerHandle) GetAccAddress() sdk.AccAddress

func (*MarketMakerHandle) Marshal

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

func (*MarketMakerHandle) MarshalTo

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

func (*MarketMakerHandle) MarshalToSizedBuffer

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

func (*MarketMakerHandle) ProtoMessage

func (*MarketMakerHandle) ProtoMessage()

func (*MarketMakerHandle) Reset

func (m *MarketMakerHandle) Reset()

func (*MarketMakerHandle) Size

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

func (*MarketMakerHandle) String

func (m *MarketMakerHandle) String() string

func (*MarketMakerHandle) Unmarshal

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

func (MarketMakerHandle) Validate

func (mm MarketMakerHandle) Validate() error

func (*MarketMakerHandle) XXX_DiscardUnknown

func (m *MarketMakerHandle) XXX_DiscardUnknown()

func (*MarketMakerHandle) XXX_Marshal

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

func (*MarketMakerHandle) XXX_Merge

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

func (*MarketMakerHandle) XXX_Size

func (m *MarketMakerHandle) XXX_Size() int

func (*MarketMakerHandle) XXX_Unmarshal

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

type MarketMakerProposal

type MarketMakerProposal struct {
	// title specifies the title of the proposal
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// description specifies the description of the proposal
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// set the market makers to eligible, refund deposit
	Inclusions []MarketMakerHandle `protobuf:"bytes,3,rep,name=inclusions,proto3" json:"inclusions" yaml:"inclusions"`
	// delete existing eligible market makers
	Exclusions []MarketMakerHandle `protobuf:"bytes,4,rep,name=exclusions,proto3" json:"exclusions" yaml:"exclusions"`
	// delete the not eligible market makers, refund deposit
	Rejections []MarketMakerHandle `protobuf:"bytes,5,rep,name=rejections,proto3" json:"rejections" yaml:"rejections"`
	// distribute claimable incentive to eligible market makers
	Distributions []IncentiveDistribution `protobuf:"bytes,6,rep,name=distributions,proto3" json:"distributions" yaml:"distributions"`
}

func NewMarketMakerProposal

func NewMarketMakerProposal(
	title string,
	description string,
	inclusions []MarketMakerHandle,
	exclusions []MarketMakerHandle,
	rejections []MarketMakerHandle,
	distributions []IncentiveDistribution,
) *MarketMakerProposal

NewMarketMakerProposal creates a new MarketMakerProposal object.

func (*MarketMakerProposal) Descriptor

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

func (*MarketMakerProposal) GetDescription

func (p *MarketMakerProposal) GetDescription() string

func (*MarketMakerProposal) GetTitle

func (p *MarketMakerProposal) GetTitle() string

func (*MarketMakerProposal) Marshal

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

func (*MarketMakerProposal) MarshalTo

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

func (*MarketMakerProposal) MarshalToSizedBuffer

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

func (*MarketMakerProposal) ProposalRoute

func (p *MarketMakerProposal) ProposalRoute() string

func (*MarketMakerProposal) ProposalType

func (p *MarketMakerProposal) ProposalType() string

func (*MarketMakerProposal) ProtoMessage

func (*MarketMakerProposal) ProtoMessage()

func (*MarketMakerProposal) Reset

func (m *MarketMakerProposal) Reset()

func (*MarketMakerProposal) Size

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

func (MarketMakerProposal) String

func (p MarketMakerProposal) String() string

func (*MarketMakerProposal) Unmarshal

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

func (*MarketMakerProposal) ValidateBasic

func (p *MarketMakerProposal) ValidateBasic() error

func (*MarketMakerProposal) XXX_DiscardUnknown

func (m *MarketMakerProposal) XXX_DiscardUnknown()

func (*MarketMakerProposal) XXX_Marshal

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

func (*MarketMakerProposal) XXX_Merge

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

func (*MarketMakerProposal) XXX_Size

func (m *MarketMakerProposal) XXX_Size() int

func (*MarketMakerProposal) XXX_Unmarshal

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

type MsgApplyMarketMaker

type MsgApplyMarketMaker struct {
	Address string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	PairIds []uint64 `protobuf:"varint,2,rep,packed,name=pair_ids,json=pairIds,proto3" json:"pair_ids,omitempty" yaml:"pair_ids"`
}

func NewMsgApplyMarketMaker

func NewMsgApplyMarketMaker(
	marketMaker sdk.AccAddress,
	pairIds []uint64,
) *MsgApplyMarketMaker

NewMsgApplyMarketMaker creates a new MsgApplyMarketMaker.

func (*MsgApplyMarketMaker) Descriptor

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

func (MsgApplyMarketMaker) GetAddress

func (msg MsgApplyMarketMaker) GetAddress() sdk.AccAddress

func (MsgApplyMarketMaker) GetSignBytes

func (msg MsgApplyMarketMaker) GetSignBytes() []byte

func (MsgApplyMarketMaker) GetSigners

func (msg MsgApplyMarketMaker) GetSigners() []sdk.AccAddress

func (*MsgApplyMarketMaker) Marshal

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

func (*MsgApplyMarketMaker) MarshalTo

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

func (*MsgApplyMarketMaker) MarshalToSizedBuffer

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

func (*MsgApplyMarketMaker) ProtoMessage

func (*MsgApplyMarketMaker) ProtoMessage()

func (*MsgApplyMarketMaker) Reset

func (m *MsgApplyMarketMaker) Reset()

func (MsgApplyMarketMaker) Route

func (msg MsgApplyMarketMaker) Route() string

func (*MsgApplyMarketMaker) Size

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

func (*MsgApplyMarketMaker) String

func (m *MsgApplyMarketMaker) String() string

func (MsgApplyMarketMaker) Type

func (msg MsgApplyMarketMaker) Type() string

func (*MsgApplyMarketMaker) Unmarshal

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

func (MsgApplyMarketMaker) ValidateBasic

func (msg MsgApplyMarketMaker) ValidateBasic() error

func (*MsgApplyMarketMaker) XXX_DiscardUnknown

func (m *MsgApplyMarketMaker) XXX_DiscardUnknown()

func (*MsgApplyMarketMaker) XXX_Marshal

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

func (*MsgApplyMarketMaker) XXX_Merge

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

func (*MsgApplyMarketMaker) XXX_Size

func (m *MsgApplyMarketMaker) XXX_Size() int

func (*MsgApplyMarketMaker) XXX_Unmarshal

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

type MsgApplyMarketMakerResponse

type MsgApplyMarketMakerResponse struct {
}

func (*MsgApplyMarketMakerResponse) Descriptor

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

func (*MsgApplyMarketMakerResponse) Marshal

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

func (*MsgApplyMarketMakerResponse) MarshalTo

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

func (*MsgApplyMarketMakerResponse) MarshalToSizedBuffer

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

func (*MsgApplyMarketMakerResponse) ProtoMessage

func (*MsgApplyMarketMakerResponse) ProtoMessage()

func (*MsgApplyMarketMakerResponse) Reset

func (m *MsgApplyMarketMakerResponse) Reset()

func (*MsgApplyMarketMakerResponse) Size

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

func (*MsgApplyMarketMakerResponse) String

func (m *MsgApplyMarketMakerResponse) String() string

func (*MsgApplyMarketMakerResponse) Unmarshal

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

func (*MsgApplyMarketMakerResponse) XXX_DiscardUnknown

func (m *MsgApplyMarketMakerResponse) XXX_DiscardUnknown()

func (*MsgApplyMarketMakerResponse) XXX_Marshal

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

func (*MsgApplyMarketMakerResponse) XXX_Merge

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

func (*MsgApplyMarketMakerResponse) XXX_Size

func (m *MsgApplyMarketMakerResponse) XXX_Size() int

func (*MsgApplyMarketMakerResponse) XXX_Unmarshal

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

type MsgClaimIncentives

type MsgClaimIncentives struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

func NewMsgClaimIncentives

func NewMsgClaimIncentives(
	marketMaker sdk.AccAddress,
) *MsgClaimIncentives

NewMsgClaimIncentives creates a new MsgClaimIncentives.

func (*MsgClaimIncentives) Descriptor

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

func (MsgClaimIncentives) GetAddress

func (msg MsgClaimIncentives) GetAddress() sdk.AccAddress

func (MsgClaimIncentives) GetSignBytes

func (msg MsgClaimIncentives) GetSignBytes() []byte

func (MsgClaimIncentives) GetSigners

func (msg MsgClaimIncentives) GetSigners() []sdk.AccAddress

func (*MsgClaimIncentives) Marshal

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

func (*MsgClaimIncentives) MarshalTo

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

func (*MsgClaimIncentives) MarshalToSizedBuffer

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

func (*MsgClaimIncentives) ProtoMessage

func (*MsgClaimIncentives) ProtoMessage()

func (*MsgClaimIncentives) Reset

func (m *MsgClaimIncentives) Reset()

func (MsgClaimIncentives) Route

func (msg MsgClaimIncentives) Route() string

func (*MsgClaimIncentives) Size

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

func (*MsgClaimIncentives) String

func (m *MsgClaimIncentives) String() string

func (MsgClaimIncentives) Type

func (msg MsgClaimIncentives) Type() string

func (*MsgClaimIncentives) Unmarshal

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

func (MsgClaimIncentives) ValidateBasic

func (msg MsgClaimIncentives) ValidateBasic() error

func (*MsgClaimIncentives) XXX_DiscardUnknown

func (m *MsgClaimIncentives) XXX_DiscardUnknown()

func (*MsgClaimIncentives) XXX_Marshal

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

func (*MsgClaimIncentives) XXX_Merge

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

func (*MsgClaimIncentives) XXX_Size

func (m *MsgClaimIncentives) XXX_Size() int

func (*MsgClaimIncentives) XXX_Unmarshal

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

type MsgClaimIncentivesResponse

type MsgClaimIncentivesResponse struct {
}

func (*MsgClaimIncentivesResponse) Descriptor

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

func (*MsgClaimIncentivesResponse) Marshal

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

func (*MsgClaimIncentivesResponse) MarshalTo

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

func (*MsgClaimIncentivesResponse) MarshalToSizedBuffer

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

func (*MsgClaimIncentivesResponse) ProtoMessage

func (*MsgClaimIncentivesResponse) ProtoMessage()

func (*MsgClaimIncentivesResponse) Reset

func (m *MsgClaimIncentivesResponse) Reset()

func (*MsgClaimIncentivesResponse) Size

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

func (*MsgClaimIncentivesResponse) String

func (m *MsgClaimIncentivesResponse) String() string

func (*MsgClaimIncentivesResponse) Unmarshal

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

func (*MsgClaimIncentivesResponse) XXX_DiscardUnknown

func (m *MsgClaimIncentivesResponse) XXX_DiscardUnknown()

func (*MsgClaimIncentivesResponse) XXX_Marshal

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

func (*MsgClaimIncentivesResponse) XXX_Merge

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

func (*MsgClaimIncentivesResponse) XXX_Size

func (m *MsgClaimIncentivesResponse) XXX_Size() int

func (*MsgClaimIncentivesResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	ApplyMarketMaker(ctx context.Context, in *MsgApplyMarketMaker, opts ...grpc.CallOption) (*MsgApplyMarketMakerResponse, error)
	ClaimIncentives(ctx context.Context, in *MsgClaimIncentives, opts ...grpc.CallOption) (*MsgClaimIncentivesResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgServer

type MsgServer interface {
	ApplyMarketMaker(context.Context, *MsgApplyMarketMaker) (*MsgApplyMarketMakerResponse, error)
	ClaimIncentives(context.Context, *MsgClaimIncentives) (*MsgClaimIncentivesResponse, error)
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
	// Address containing the funds used to distribute incentives
	IncentiveBudgetAddress string `` /* 161-byte string literal not displayed */
	// The amount of deposit to be applied to the market maker, which is calculated per pair and is refunded when the
	// market maker included or rejected through the MarketMaker Proposal
	DepositAmount github_com_cosmos_cosmos_sdk_types.Coins `` /* 166-byte string literal not displayed */
	// Common variables used in market maker scoring system
	Common Common `protobuf:"bytes,3,opt,name=common,proto3" json:"common" yaml:"common"`
	// Include the pairs that are incentive target pairs and the variables used in market maker scoring system
	IncentivePairs []IncentivePair `protobuf:"bytes,4,rep,name=incentive_pairs,json=incentivePairs,proto3" json:"incentive_pairs" yaml:"incentive_pairs"`
}

Params defines the set of params for the marketmaker module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns the default marketmaker module parameters.

func (*Params) Descriptor

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

func (Params) IncentiveBudgetAcc

func (p Params) IncentiveBudgetAcc() sdk.AccAddress

func (Params) IncentivePairsMap

func (p Params) IncentivePairsMap() map[uint64]IncentivePair

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramstypes.ParamSetPairs

ParamSetPairs implements paramstypes.ParamSet.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String returns a human-readable string representation of the parameters.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates parameters.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params returns parameters of the marketmaker module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// MarketMakers returns all market makers.
	MarketMakers(ctx context.Context, in *QueryMarketMakersRequest, opts ...grpc.CallOption) (*QueryMarketMakersResponse, error)
	// Incentive returns a specific incentive.
	Incentive(ctx context.Context, in *QueryIncentiveRequest, opts ...grpc.CallOption) (*QueryIncentiveResponse, 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 QueryIncentiveRequest

type QueryIncentiveRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryIncentiveRequest is the request type for the Query/Incentive RPC method.

func (*QueryIncentiveRequest) Descriptor

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

func (*QueryIncentiveRequest) GetAddress

func (m *QueryIncentiveRequest) GetAddress() string

func (*QueryIncentiveRequest) Marshal

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

func (*QueryIncentiveRequest) MarshalTo

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

func (*QueryIncentiveRequest) MarshalToSizedBuffer

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

func (*QueryIncentiveRequest) ProtoMessage

func (*QueryIncentiveRequest) ProtoMessage()

func (*QueryIncentiveRequest) Reset

func (m *QueryIncentiveRequest) Reset()

func (*QueryIncentiveRequest) Size

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

func (*QueryIncentiveRequest) String

func (m *QueryIncentiveRequest) String() string

func (*QueryIncentiveRequest) Unmarshal

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

func (*QueryIncentiveRequest) XXX_DiscardUnknown

func (m *QueryIncentiveRequest) XXX_DiscardUnknown()

func (*QueryIncentiveRequest) XXX_Marshal

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

func (*QueryIncentiveRequest) XXX_Merge

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

func (*QueryIncentiveRequest) XXX_Size

func (m *QueryIncentiveRequest) XXX_Size() int

func (*QueryIncentiveRequest) XXX_Unmarshal

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

type QueryIncentiveResponse

type QueryIncentiveResponse struct {
	Incentive Incentive `protobuf:"bytes,1,opt,name=incentive,proto3" json:"incentive"`
}

QueryIncentiveResponse is the response type for the Query/Incentive RPC method.

func (*QueryIncentiveResponse) Descriptor

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

func (*QueryIncentiveResponse) GetIncentive

func (m *QueryIncentiveResponse) GetIncentive() Incentive

func (*QueryIncentiveResponse) Marshal

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

func (*QueryIncentiveResponse) MarshalTo

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

func (*QueryIncentiveResponse) MarshalToSizedBuffer

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

func (*QueryIncentiveResponse) ProtoMessage

func (*QueryIncentiveResponse) ProtoMessage()

func (*QueryIncentiveResponse) Reset

func (m *QueryIncentiveResponse) Reset()

func (*QueryIncentiveResponse) Size

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

func (*QueryIncentiveResponse) String

func (m *QueryIncentiveResponse) String() string

func (*QueryIncentiveResponse) Unmarshal

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

func (*QueryIncentiveResponse) XXX_DiscardUnknown

func (m *QueryIncentiveResponse) XXX_DiscardUnknown()

func (*QueryIncentiveResponse) XXX_Marshal

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

func (*QueryIncentiveResponse) XXX_Merge

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

func (*QueryIncentiveResponse) XXX_Size

func (m *QueryIncentiveResponse) XXX_Size() int

func (*QueryIncentiveResponse) XXX_Unmarshal

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

type QueryMarketMakersRequest

type QueryMarketMakersRequest struct {
	Address    string             `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	PairId     uint64             `protobuf:"varint,2,opt,name=pair_id,json=pairId,proto3" json:"pair_id,omitempty"`
	Eligible   string             `protobuf:"bytes,3,opt,name=eligible,proto3" json:"eligible,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryMarketMakersRequest is the request type for the Query/MarketMakers RPC method.

func (*QueryMarketMakersRequest) Descriptor

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

func (*QueryMarketMakersRequest) GetAddress

func (m *QueryMarketMakersRequest) GetAddress() string

func (*QueryMarketMakersRequest) GetEligible

func (m *QueryMarketMakersRequest) GetEligible() string

func (*QueryMarketMakersRequest) GetPagination

func (m *QueryMarketMakersRequest) GetPagination() *query.PageRequest

func (*QueryMarketMakersRequest) GetPairId

func (m *QueryMarketMakersRequest) GetPairId() uint64

func (*QueryMarketMakersRequest) Marshal

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

func (*QueryMarketMakersRequest) MarshalTo

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

func (*QueryMarketMakersRequest) MarshalToSizedBuffer

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

func (*QueryMarketMakersRequest) ProtoMessage

func (*QueryMarketMakersRequest) ProtoMessage()

func (*QueryMarketMakersRequest) Reset

func (m *QueryMarketMakersRequest) Reset()

func (*QueryMarketMakersRequest) Size

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

func (*QueryMarketMakersRequest) String

func (m *QueryMarketMakersRequest) String() string

func (*QueryMarketMakersRequest) Unmarshal

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

func (*QueryMarketMakersRequest) XXX_DiscardUnknown

func (m *QueryMarketMakersRequest) XXX_DiscardUnknown()

func (*QueryMarketMakersRequest) XXX_Marshal

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

func (*QueryMarketMakersRequest) XXX_Merge

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

func (*QueryMarketMakersRequest) XXX_Size

func (m *QueryMarketMakersRequest) XXX_Size() int

func (*QueryMarketMakersRequest) XXX_Unmarshal

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

type QueryMarketMakersResponse

type QueryMarketMakersResponse struct {
	Marketmakers []MarketMaker `protobuf:"bytes,1,rep,name=marketmakers,proto3" json:"marketmakers"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryMarketMakersResponse is the response type for the Query/MarketMakers RPC method.

func (*QueryMarketMakersResponse) Descriptor

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

func (*QueryMarketMakersResponse) GetMarketmakers

func (m *QueryMarketMakersResponse) GetMarketmakers() []MarketMaker

func (*QueryMarketMakersResponse) GetPagination

func (m *QueryMarketMakersResponse) GetPagination() *query.PageResponse

func (*QueryMarketMakersResponse) Marshal

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

func (*QueryMarketMakersResponse) MarshalTo

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

func (*QueryMarketMakersResponse) MarshalToSizedBuffer

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

func (*QueryMarketMakersResponse) ProtoMessage

func (*QueryMarketMakersResponse) ProtoMessage()

func (*QueryMarketMakersResponse) Reset

func (m *QueryMarketMakersResponse) Reset()

func (*QueryMarketMakersResponse) Size

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

func (*QueryMarketMakersResponse) String

func (m *QueryMarketMakersResponse) String() string

func (*QueryMarketMakersResponse) Unmarshal

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

func (*QueryMarketMakersResponse) XXX_DiscardUnknown

func (m *QueryMarketMakersResponse) XXX_DiscardUnknown()

func (*QueryMarketMakersResponse) XXX_Marshal

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

func (*QueryMarketMakersResponse) XXX_Merge

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

func (*QueryMarketMakersResponse) XXX_Size

func (m *QueryMarketMakersResponse) XXX_Size() int

func (*QueryMarketMakersResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params returns parameters of the marketmaker module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// MarketMakers returns all market makers.
	MarketMakers(context.Context, *QueryMarketMakersRequest) (*QueryMarketMakersResponse, error)
	// Incentive returns a specific incentive.
	Incentive(context.Context, *QueryIncentiveRequest) (*QueryIncentiveResponse, 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) ApplyMarketMaker

func (*UnimplementedMsgServer) ClaimIncentives

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Incentive

func (*UnimplementedQueryServer) MarketMakers

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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