types

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 38 Imported by: 1

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventOpen                 = "perpetual/mtp_open"
	EventClose                = "perpetual/mtp_close"
	EventForceCloseUnhealthy  = "perpetual/mtp_force_close_unhealthy"
	EventForceCloseStopLoss   = "perpetual/mtp_force_close_stopLoss"
	EventForceCloseTakeprofit = "perpetual/mtp_force_close_takeprofit"
	EventIncrementalPayFund   = "perpetual/incremental_pay_fund"
	EventRepayFund            = "perpetual/repay_fund"
	EventClosePositions       = "perpetual/close_positions"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "perpetual"

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

	// ParamsKey is the prefix for parameters of perpetual module
	ParamsKey = "perpetual_params"

	LegacyPoolKeyPrefix = "Pool/value/"
)
View Source
const (
	InfinitePriceString = "infinite"
	ZeroPriceString     = "zero"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

View Source
const MaxPageLimit = 10000

Variables

View Source
var (
	ErrMTPDoesNotExist        = errorsmod.Register(ModuleName, 1, "mtp not found")
	ErrMTPInvalid             = errorsmod.Register(ModuleName, 2, "mtp invalid")
	ErrMTPDisabled            = errorsmod.Register(ModuleName, 3, "perpetual not enabled for pool")
	ErrUnknownRequest         = errorsmod.Register(ModuleName, 4, "unknown request")
	ErrMTPHealthy             = errorsmod.Register(ModuleName, 5, "mtp health above force close threshold")
	ErrInvalidPosition        = errorsmod.Register(ModuleName, 6, "mtp position invalid")
	ErrMaxOpenPositions       = errorsmod.Register(ModuleName, 7, "max open positions reached")
	ErrUnauthorised           = errorsmod.Register(ModuleName, 8, "address not on whitelist")
	ErrBorrowTooLow           = errorsmod.Register(ModuleName, 9, "borrowed amount is too low")
	ErrBorrowTooHigh          = errorsmod.Register(ModuleName, 10, "borrowed amount is higher than pool depth")
	ErrCustodyTooHigh         = errorsmod.Register(ModuleName, 11, "custody amount is higher than pool depth")
	ErrMTPUnhealthy           = errorsmod.Register(ModuleName, 12, "mtp health would be too low for safety factor")
	ErrInvalidCollateralAsset = errorsmod.Register(ModuleName, 13, "invalid collateral asset")
	ErrInvalidBorrowingAsset  = errorsmod.Register(ModuleName, 14, "invalid borrowing asset")
	ErrPoolDoesNotExist       = errorsmod.Register(ModuleName, 15, "perpetual pool does not exist")
	ErrBalanceNotAvailable    = errorsmod.Register(ModuleName, 18, "user does not have enough balance of the required coin")
	ErrAmountTooLow           = errorsmod.Register(ModuleName, 32, "Tx amount is too low")
	ErrPerpetualDisabled      = errorsmod.Register(ModuleName, 33, "perpetual disabled pool")
	ErrDenomNotFound          = errorsmod.Register(ModuleName, 34, "denom not found")
	ErrInvalidLeverage        = errorsmod.Register(ModuleName, 35, "invalid leverage")
	ErrInvalidCloseSize       = errorsmod.Register(ModuleName, 36, "invalid close size")
	ErrCalcMinCollateral      = errorsmod.Register(ModuleName, 37, "error calculating min collateral")
	ErrInvalidTakeProfitPrice = errorsmod.Register(ModuleName, 38, "error invalid profit price ")
	ErrInvalidTradingAsset    = errorsmod.Register(ModuleName, 39, "invalid trading asset")
	ErrInvalidAmount          = errorsmod.Register(ModuleName, 40, "invalid amount")
	ErrInvalidPrice           = errorsmod.Register(ModuleName, 41, "error invalid price ")
	ErrPoolHasToBeOracle      = errorsmod.Register(ModuleName, 42, "pool has to be oracle enabled")
	ErrZeroCustodyAmount      = errorsmod.Register(ModuleName, 43, "Custody amount is zero")
)

x/perpetual 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 (
	TakeProfitPriceDefault = math.LegacyMustNewDecFromStr("10000000000000000000000000000000000000000") // 10^40
	StopLossPriceDefault   = math.LegacyZeroDec()
)
View Source
var (
	MTPPrefix          = []byte{0x01}
	MTPCountPrefix     = []byte{0x02}
	OpenMTPCountPrefix = []byte{0x04}
	WhitelistPrefix    = []byte{0x05}
	PoolKeyPrefix      = []byte{0x06}

	InterestRatePrefix = []byte{0x07}
	FundingRatePrefix  = []byte{0x08}
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPool        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPool          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPool = 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 (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Position_name = map[int32]string{
	0: "UNSPECIFIED",
	1: "LONG",
	2: "SHORT",
}
View Source
var Position_value = map[string]int32{
	"UNSPECIFIED": 0,
	"LONG":        1,
	"SHORT":       2,
}

Functions

func AddOrAppendCoin

func AddOrAppendCoin(coins sdk.Coins, coin sdk.Coin) sdk.Coins

Utility function to add a new coin or aggregate the amount if coin with same denom already exists

func CalcFundingRate

func CalcFundingRate(longAmount, shortAmount sdkmath.Int, baseRate, maxRate, minRate sdkmath.LegacyDec) sdkmath.LegacyDec

CalcFundingRate calculates and returns the funding rate based on long and short amounts

func CalcMTPTakeProfitCustody

func CalcMTPTakeProfitCustody(mtp MTP) math.Int

func CalcTakeAmount

func CalcTakeAmount(custodyAmount sdkmath.Int, fundingRate sdkmath.LegacyDec) sdkmath.Int

CalcTakeAmount calculates the take amount in the custody asset based on the funding rate

func CheckLegacyDecNilAndNegative added in v0.52.0

func CheckLegacyDecNilAndNegative(value math.LegacyDec, name string) error

func CheckLongAssets

func CheckLongAssets(collateralAsset string, borrowAsset string, baseCurrency string) error

func CheckShortAssets

func CheckShortAssets(collateralAsset string, borrowAsset string, baseCurrency string) error

func GenerateCloseEvent added in v0.29.3

func GenerateCloseEvent(mtp *MTP, repayAmount math.Int, closingRatio math.LegacyDec) sdk.Event

func GenerateOpenEvent

func GenerateOpenEvent(mtp *MTP) sdk.Event

func GetFundingRateKey added in v0.45.0

func GetFundingRateKey(block uint64, pool uint64) []byte

func GetInterestRateKey added in v0.45.0

func GetInterestRateKey(block uint64, pool uint64) []byte

func GetLegacyWhitelistKey added in v0.45.0

func GetLegacyWhitelistKey(address string) []byte

func GetMTPKey

func GetMTPKey(addr sdk.AccAddress, id uint64) []byte

func GetMTPPrefixForAddress

func GetMTPPrefixForAddress(addr sdk.AccAddress) []byte

func GetPoolKey added in v0.45.0

func GetPoolKey(index uint64) []byte

func GetUint64Bytes

func GetUint64Bytes(ID uint64) []byte

GetUint64Bytes returns the byte representation of the ID

func GetUint64FromBytes

func GetUint64FromBytes(bz []byte) uint64

GetUint64FromBytes returns ID in uint64 format from a byte array

func GetWhitelistKey

func GetWhitelistKey(addr sdk.AccAddress) []byte

func HasSufficientPoolBalance

func HasSufficientPoolBalance(ammPool ammtypes.Pool, assetDenom string, requiredAmount math.Int) bool

Check if amm pool has sufficcient balance

func IsTakeProfitPriceInfinite added in v0.48.0

func IsTakeProfitPriceInfinite(mtp MTP) bool

func KeyPrefix

func KeyPrefix(p string) []byte

func ReachedTakeProfitPrice

func ReachedTakeProfitPrice(mtp *MTP, assetPrice math.LegacyDec) bool

ReachedTakeProfitPrice tells if the take profit price is reached

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateCollateralAsset

func ValidateCollateralAsset(collateralAsset string, baseCurrency string) error

Types

type AccountKeeper

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

type AmmKeeper

type AmmKeeper interface {
	// GetPool returns a pool from its index
	GetPool(sdk.Context, uint64) (ammtypes.Pool, bool)
	// Get all pools
	GetAllPool(sdk.Context) []ammtypes.Pool

	GetAccountedPoolSnapshotOrSet(ctx sdk.Context, pool ammtypes.Pool) (val ammtypes.Pool)

	SwapOutAmtGivenIn(ctx sdk.Context, poolId uint64, oracle ammtypes.OracleKeeper, snapshot *ammtypes.Pool, tokensIn sdk.Coins, tokenOutDenom string, swapFee math.LegacyDec, weightBreakingFeePerpetualFactor math.LegacyDec) (tokenOut sdk.Coin, slippage math.LegacyDec, slippageAmount math.LegacyDec, weightBalanceBonus, oracleOut math.LegacyDec, err error)
	SwapInAmtGivenOut(ctx sdk.Context, poolId uint64, oracle ammtypes.OracleKeeper, snapshot *ammtypes.Pool, tokensOut sdk.Coins, tokenInDenom string, swapFee math.LegacyDec, weightBreakingFeePerpetualFactor math.LegacyDec) (tokenIn sdk.Coin, slippage, slippageAmount math.LegacyDec, weightBalanceBonus, oracleIn math.LegacyDec, err error)

	AddToPoolBalanceAndUpdateLiquidity(ctx sdk.Context, pool *ammtypes.Pool, addShares math.Int, coins sdk.Coins) error
	RemoveFromPoolBalanceAndUpdateLiquidity(ctx sdk.Context, pool *ammtypes.Pool, removeShares math.Int, coins sdk.Coins) error
}

type AssetProfileKeeper

type AssetProfileKeeper interface {
	// GetEntry returns a entry from its index
	GetEntry(ctx sdk.Context, baseDenom string) (val atypes.Entry, found bool)
	// GetEntryByDenom returns a entry from its denom value
	GetEntryByDenom(ctx sdk.Context, denom string) (val atypes.Entry, found bool)
}

type BankKeeper

type BankKeeper interface {
	GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin

	SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins

	SendCoinsFromModuleToModule(ctx context.Context, senderModule string, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoins(ctx context.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error

	BlockedAddr(addr sdk.AccAddress) bool
	HasBalance(ctx context.Context, addr sdk.AccAddress, amt sdk.Coin) bool
}

type Fees added in v0.48.0

type Fees struct {
	TotalFeesBaseCurrency            cosmossdk_io_math.Int `` /* 151-byte string literal not displayed */
	BorrowInterestFeesLiabilityAsset cosmossdk_io_math.Int `` /* 186-byte string literal not displayed */
	BorrowInterestFeesBaseCurrency   cosmossdk_io_math.Int `` /* 180-byte string literal not displayed */
	FundingFeesLiquidityAsset        cosmossdk_io_math.Int `` /* 163-byte string literal not displayed */
	FundingFeesBaseCurrency          cosmossdk_io_math.Int `` /* 157-byte string literal not displayed */
}

func (*Fees) Descriptor added in v0.48.0

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

func (*Fees) Marshal added in v0.48.0

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

func (*Fees) MarshalTo added in v0.48.0

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

func (*Fees) MarshalToSizedBuffer added in v0.48.0

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

func (*Fees) ProtoMessage added in v0.48.0

func (*Fees) ProtoMessage()

func (*Fees) Reset added in v0.48.0

func (m *Fees) Reset()

func (*Fees) Size added in v0.48.0

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

func (*Fees) String added in v0.48.0

func (m *Fees) String() string

func (*Fees) Unmarshal added in v0.48.0

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

func (*Fees) XXX_DiscardUnknown added in v0.48.0

func (m *Fees) XXX_DiscardUnknown()

func (*Fees) XXX_Marshal added in v0.48.0

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

func (*Fees) XXX_Merge added in v0.48.0

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

func (*Fees) XXX_Size added in v0.48.0

func (m *Fees) XXX_Size() int

func (*Fees) XXX_Unmarshal added in v0.48.0

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

type FundingRateBlock added in v0.45.0

type FundingRateBlock struct {
	FundingRateLong    cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */
	FundingRateShort   cosmossdk_io_math.LegacyDec `` /* 140-byte string literal not displayed */
	FundingAmountShort cosmossdk_io_math.LegacyDec `` /* 146-byte string literal not displayed */
	FundingAmountLong  cosmossdk_io_math.LegacyDec `` /* 143-byte string literal not displayed */
	BlockHeight        int64                       `protobuf:"varint,5,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	BlockTime          int64                       `protobuf:"varint,6,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"`
}

func (*FundingRateBlock) Descriptor added in v0.45.0

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

func (*FundingRateBlock) GetBlockHeight added in v0.45.0

func (m *FundingRateBlock) GetBlockHeight() int64

func (*FundingRateBlock) GetBlockTime added in v0.48.0

func (m *FundingRateBlock) GetBlockTime() int64

func (*FundingRateBlock) Marshal added in v0.45.0

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

func (*FundingRateBlock) MarshalTo added in v0.45.0

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

func (*FundingRateBlock) MarshalToSizedBuffer added in v0.45.0

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

func (*FundingRateBlock) ProtoMessage added in v0.45.0

func (*FundingRateBlock) ProtoMessage()

func (*FundingRateBlock) Reset added in v0.45.0

func (m *FundingRateBlock) Reset()

func (*FundingRateBlock) Size added in v0.45.0

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

func (*FundingRateBlock) String added in v0.45.0

func (m *FundingRateBlock) String() string

func (*FundingRateBlock) Unmarshal added in v0.45.0

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

func (*FundingRateBlock) XXX_DiscardUnknown added in v0.45.0

func (m *FundingRateBlock) XXX_DiscardUnknown()

func (*FundingRateBlock) XXX_Marshal added in v0.45.0

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

func (*FundingRateBlock) XXX_Merge added in v0.45.0

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

func (*FundingRateBlock) XXX_Size added in v0.45.0

func (m *FundingRateBlock) XXX_Size() int

func (*FundingRateBlock) XXX_Unmarshal added in v0.45.0

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

type GenesisState

type GenesisState struct {
	Params           Params   `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	PoolList         []Pool   `protobuf:"bytes,2,rep,name=pool_list,json=poolList,proto3" json:"pool_list"`
	MtpList          []MTP    `protobuf:"bytes,3,rep,name=mtp_list,json=mtpList,proto3" json:"mtp_list"`
	AddressWhitelist []string `protobuf:"bytes,4,rep,name=address_whitelist,json=addressWhitelist,proto3" json:"address_whitelist,omitempty"`
}

GenesisState defines the perpetual module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAddressWhitelist

func (m *GenesisState) GetAddressWhitelist() []string

func (*GenesisState) GetMtpList

func (m *GenesisState) GetMtpList() []MTP

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPoolList

func (m *GenesisState) GetPoolList() []Pool

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type InterestBlock added in v0.45.0

type InterestBlock struct {
	InterestRate cosmossdk_io_math.LegacyDec `` /* 126-byte string literal not displayed */
	BlockHeight  int64                       `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	BlockTime    int64                       `protobuf:"varint,3,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"`
}

func (*InterestBlock) Descriptor added in v0.45.0

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

func (*InterestBlock) GetBlockHeight added in v0.45.0

func (m *InterestBlock) GetBlockHeight() int64

func (*InterestBlock) GetBlockTime added in v0.48.0

func (m *InterestBlock) GetBlockTime() int64

func (*InterestBlock) Marshal added in v0.45.0

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

func (*InterestBlock) MarshalTo added in v0.45.0

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

func (*InterestBlock) MarshalToSizedBuffer added in v0.45.0

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

func (*InterestBlock) ProtoMessage added in v0.45.0

func (*InterestBlock) ProtoMessage()

func (*InterestBlock) Reset added in v0.45.0

func (m *InterestBlock) Reset()

func (*InterestBlock) Size added in v0.45.0

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

func (*InterestBlock) String added in v0.45.0

func (m *InterestBlock) String() string

func (*InterestBlock) Unmarshal added in v0.45.0

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

func (*InterestBlock) XXX_DiscardUnknown added in v0.45.0

func (m *InterestBlock) XXX_DiscardUnknown()

func (*InterestBlock) XXX_Marshal added in v0.45.0

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

func (*InterestBlock) XXX_Merge added in v0.45.0

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

func (*InterestBlock) XXX_Size added in v0.45.0

func (m *InterestBlock) XXX_Size() int

func (*InterestBlock) XXX_Unmarshal added in v0.45.0

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

type IsWhitelistedRequest

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

func (*IsWhitelistedRequest) Descriptor

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

func (*IsWhitelistedRequest) GetAddress

func (m *IsWhitelistedRequest) GetAddress() string

func (*IsWhitelistedRequest) Marshal

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

func (*IsWhitelistedRequest) MarshalTo

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

func (*IsWhitelistedRequest) MarshalToSizedBuffer

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

func (*IsWhitelistedRequest) ProtoMessage

func (*IsWhitelistedRequest) ProtoMessage()

func (*IsWhitelistedRequest) Reset

func (m *IsWhitelistedRequest) Reset()

func (*IsWhitelistedRequest) Size

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

func (*IsWhitelistedRequest) String

func (m *IsWhitelistedRequest) String() string

func (*IsWhitelistedRequest) Unmarshal

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

func (*IsWhitelistedRequest) XXX_DiscardUnknown

func (m *IsWhitelistedRequest) XXX_DiscardUnknown()

func (*IsWhitelistedRequest) XXX_Marshal

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

func (*IsWhitelistedRequest) XXX_Merge

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

func (*IsWhitelistedRequest) XXX_Size

func (m *IsWhitelistedRequest) XXX_Size() int

func (*IsWhitelistedRequest) XXX_Unmarshal

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

type IsWhitelistedResponse

type IsWhitelistedResponse struct {
	Address       string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	IsWhitelisted bool   `protobuf:"varint,2,opt,name=is_whitelisted,json=isWhitelisted,proto3" json:"is_whitelisted,omitempty"`
}

func (*IsWhitelistedResponse) Descriptor

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

func (*IsWhitelistedResponse) GetAddress

func (m *IsWhitelistedResponse) GetAddress() string

func (*IsWhitelistedResponse) GetIsWhitelisted

func (m *IsWhitelistedResponse) GetIsWhitelisted() bool

func (*IsWhitelistedResponse) Marshal

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

func (*IsWhitelistedResponse) MarshalTo

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

func (*IsWhitelistedResponse) MarshalToSizedBuffer

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

func (*IsWhitelistedResponse) ProtoMessage

func (*IsWhitelistedResponse) ProtoMessage()

func (*IsWhitelistedResponse) Reset

func (m *IsWhitelistedResponse) Reset()

func (*IsWhitelistedResponse) Size

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

func (*IsWhitelistedResponse) String

func (m *IsWhitelistedResponse) String() string

func (*IsWhitelistedResponse) Unmarshal

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

func (*IsWhitelistedResponse) XXX_DiscardUnknown

func (m *IsWhitelistedResponse) XXX_DiscardUnknown()

func (*IsWhitelistedResponse) XXX_Marshal

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

func (*IsWhitelistedResponse) XXX_Merge

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

func (*IsWhitelistedResponse) XXX_Size

func (m *IsWhitelistedResponse) XXX_Size() int

func (*IsWhitelistedResponse) XXX_Unmarshal

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

type LegacyParams added in v0.46.0

type LegacyParams struct {
	LeverageMax                                    cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=leverage_max,json=leverageMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage_max"`
	BorrowInterestRateMax                          cosmossdk_io_math.LegacyDec `` /* 157-byte string literal not displayed */
	BorrowInterestRateMin                          cosmossdk_io_math.LegacyDec `` /* 157-byte string literal not displayed */
	BorrowInterestRateIncrease                     cosmossdk_io_math.LegacyDec `` /* 172-byte string literal not displayed */
	BorrowInterestRateDecrease                     cosmossdk_io_math.LegacyDec `` /* 172-byte string literal not displayed */
	HealthGainFactor                               cosmossdk_io_math.LegacyDec `` /* 140-byte string literal not displayed */
	MaxOpenPositions                               int64                       `protobuf:"varint,7,opt,name=max_open_positions,json=maxOpenPositions,proto3" json:"max_open_positions,omitempty"`
	PoolOpenThreshold                              cosmossdk_io_math.LegacyDec `` /* 143-byte string literal not displayed */
	ForceCloseFundPercentage                       cosmossdk_io_math.LegacyDec `` /* 166-byte string literal not displayed */
	ForceCloseFundAddress                          string                      `` /* 129-byte string literal not displayed */
	IncrementalBorrowInterestPaymentFundPercentage cosmossdk_io_math.LegacyDec `` /* 237-byte string literal not displayed */
	IncrementalBorrowInterestPaymentFundAddress    string                      `` /* 199-byte string literal not displayed */
	SafetyFactor                                   cosmossdk_io_math.LegacyDec `` /* 127-byte string literal not displayed */
	IncrementalBorrowInterestPaymentEnabled        bool                        `` /* 186-byte string literal not displayed */
	WhitelistingEnabled                            bool                        `protobuf:"varint,15,opt,name=whitelisting_enabled,json=whitelistingEnabled,proto3" json:"whitelisting_enabled,omitempty"`
	PerpetualSwapFee                               cosmossdk_io_math.LegacyDec `` /* 141-byte string literal not displayed */
	MaxLimitOrder                                  int64                       `protobuf:"varint,17,opt,name=max_limit_order,json=maxLimitOrder,proto3" json:"max_limit_order,omitempty"`
	FixedFundingRate                               cosmossdk_io_math.LegacyDec `` /* 141-byte string literal not displayed */
	// minimum value for take_profit_price/current price for long, should be
	// greater than 1
	MinimumLongTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `` /* 192-byte string literal not displayed */
	// max value for take_profit_price/current price for long, should be greater
	// than 1
	MaximumLongTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `` /* 192-byte string literal not displayed */
	// max value for take_profit_price/current price for short, should be less
	// than 1
	MaximumShortTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `` /* 195-byte string literal not displayed */
	// No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in
	// validate message
	EnableTakeProfitCustodyLiabilities bool `` /* 171-byte string literal not displayed */
	// We create this and send this value to estimate swap ONLY when opening and
	// closing the position Ideally this value is set to half. When trader open a
	// position if they receive a weight balance bonus (which is half of weight
	// breaking fee, ideally) then while closing position they are charged weight
	// breaking fee. So we just directly apply half weight breaking fee on
	// perpetual swaps Question: does each need to have separate value of this
	// because PoolParams.WeightRecoveryFeePortion can be different Also, if
	// trader has no bonus only fee, then overall we are only applying the fee
	// half time
	WeightBreakingFeeFactor cosmossdk_io_math.LegacyDec `` /* 164-byte string literal not displayed */
}

Params defines the parameters for the module.

func (*LegacyParams) Descriptor added in v0.46.0

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

func (*LegacyParams) GetEnableTakeProfitCustodyLiabilities added in v0.54.0

func (m *LegacyParams) GetEnableTakeProfitCustodyLiabilities() bool

func (*LegacyParams) GetForceCloseFundAddress added in v0.46.0

func (m *LegacyParams) GetForceCloseFundAddress() string

func (*LegacyParams) GetIncrementalBorrowInterestPaymentEnabled added in v0.46.0

func (m *LegacyParams) GetIncrementalBorrowInterestPaymentEnabled() bool

func (*LegacyParams) GetIncrementalBorrowInterestPaymentFundAddress added in v0.46.0

func (m *LegacyParams) GetIncrementalBorrowInterestPaymentFundAddress() string

func (*LegacyParams) GetMaxLimitOrder added in v0.54.0

func (m *LegacyParams) GetMaxLimitOrder() int64

func (*LegacyParams) GetMaxOpenPositions added in v0.46.0

func (m *LegacyParams) GetMaxOpenPositions() int64

func (*LegacyParams) GetWhitelistingEnabled added in v0.46.0

func (m *LegacyParams) GetWhitelistingEnabled() bool

func (*LegacyParams) Marshal added in v0.46.0

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

func (*LegacyParams) MarshalTo added in v0.46.0

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

func (*LegacyParams) MarshalToSizedBuffer added in v0.46.0

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

func (*LegacyParams) ProtoMessage added in v0.46.0

func (*LegacyParams) ProtoMessage()

func (*LegacyParams) Reset added in v0.46.0

func (m *LegacyParams) Reset()

func (*LegacyParams) Size added in v0.46.0

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

func (*LegacyParams) String added in v0.46.0

func (m *LegacyParams) String() string

func (*LegacyParams) Unmarshal added in v0.46.0

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

func (*LegacyParams) XXX_DiscardUnknown added in v0.46.0

func (m *LegacyParams) XXX_DiscardUnknown()

func (*LegacyParams) XXX_Marshal added in v0.46.0

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

func (*LegacyParams) XXX_Merge added in v0.46.0

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

func (*LegacyParams) XXX_Size added in v0.46.0

func (m *LegacyParams) XXX_Size() int

func (*LegacyParams) XXX_Unmarshal added in v0.46.0

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

type LeverageLpKeeper added in v0.48.0

type LeverageLpKeeper interface {
	GetPool(ctx sdk.Context, poolId uint64) (leveragelpmoduletypes.Pool, bool)
}

type MTP

type MTP struct {
	Address                       string                      `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	CollateralAsset               string                      `protobuf:"bytes,2,opt,name=collateral_asset,json=collateralAsset,proto3" json:"collateral_asset,omitempty"`
	TradingAsset                  string                      `protobuf:"bytes,3,opt,name=trading_asset,json=tradingAsset,proto3" json:"trading_asset,omitempty"`
	LiabilitiesAsset              string                      `protobuf:"bytes,4,opt,name=liabilities_asset,json=liabilitiesAsset,proto3" json:"liabilities_asset,omitempty"`
	CustodyAsset                  string                      `protobuf:"bytes,5,opt,name=custody_asset,json=custodyAsset,proto3" json:"custody_asset,omitempty"`
	Collateral                    cosmossdk_io_math.Int       `protobuf:"bytes,6,opt,name=collateral,proto3,customtype=cosmossdk.io/math.Int" json:"collateral"`
	Liabilities                   cosmossdk_io_math.Int       `protobuf:"bytes,7,opt,name=liabilities,proto3,customtype=cosmossdk.io/math.Int" json:"liabilities"`
	BorrowInterestPaidCustody     cosmossdk_io_math.Int       `` /* 163-byte string literal not displayed */
	BorrowInterestUnpaidLiability cosmossdk_io_math.Int       `` /* 176-byte string literal not displayed */
	Custody                       cosmossdk_io_math.Int       `protobuf:"bytes,11,opt,name=custody,proto3,customtype=cosmossdk.io/math.Int" json:"custody"`
	TakeProfitLiabilities         cosmossdk_io_math.Int       `` /* 150-byte string literal not displayed */
	TakeProfitCustody             cosmossdk_io_math.Int       `` /* 138-byte string literal not displayed */
	MtpHealth                     cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=mtp_health,json=mtpHealth,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"mtp_health"`
	Position                      Position                    `protobuf:"varint,15,opt,name=position,proto3,enum=elys.perpetual.Position" json:"position,omitempty"`
	Id                            uint64                      `protobuf:"varint,16,opt,name=id,proto3" json:"id,omitempty"`
	AmmPoolId                     uint64                      `protobuf:"varint,17,opt,name=amm_pool_id,json=ammPoolId,proto3" json:"amm_pool_id,omitempty"`
	TakeProfitPrice               cosmossdk_io_math.LegacyDec `` /* 138-byte string literal not displayed */
	TakeProfitBorrowFactor        cosmossdk_io_math.LegacyDec `` /* 161-byte string literal not displayed */
	FundingFeePaidCustody         cosmossdk_io_math.Int       `` /* 152-byte string literal not displayed */
	FundingFeeReceivedCustody     cosmossdk_io_math.Int       `` /* 164-byte string literal not displayed */
	OpenPrice                     cosmossdk_io_math.LegacyDec `protobuf:"bytes,22,opt,name=open_price,json=openPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"open_price"`
	StopLossPrice                 cosmossdk_io_math.LegacyDec `` /* 132-byte string literal not displayed */
	LastInterestCalcTime          uint64                      `` /* 127-byte string literal not displayed */
	LastInterestCalcBlock         uint64                      `` /* 130-byte string literal not displayed */
	LastFundingCalcTime           uint64                      `protobuf:"varint,26,opt,name=last_funding_calc_time,json=lastFundingCalcTime,proto3" json:"last_funding_calc_time,omitempty"`
	LastFundingCalcBlock          uint64                      `` /* 127-byte string literal not displayed */
}

func NewMTP

func NewMTP(ctx sdk.Context, signer, collateralAsset, tradingAsset, liabilitiesAsset, custodyAsset string, position Position, takeProfitPrice sdkmath.LegacyDec, poolId uint64) *MTP

func (MTP) CalcMTPTakeProfitBorrowFactor added in v0.49.4

func (mtp MTP) CalcMTPTakeProfitBorrowFactor() (sdkmath.LegacyDec, error)

func (*MTP) Descriptor

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

func (MTP) GetAccountAddress added in v0.45.0

func (mtp MTP) GetAccountAddress() sdk.AccAddress

func (*MTP) GetAddress

func (m *MTP) GetAddress() string

func (*MTP) GetAmmPoolId

func (m *MTP) GetAmmPoolId() uint64

func (*MTP) GetAndSetOpenPrice added in v0.49.0

func (mtp *MTP) GetAndSetOpenPrice()

func (MTP) GetBorrowInterestAmountAsCustodyAsset added in v0.49.4

func (mtp MTP) GetBorrowInterestAmountAsCustodyAsset(tradingAssetPrice sdkmath.LegacyDec) (sdkmath.Int, error)

func (*MTP) GetCollateralAsset

func (m *MTP) GetCollateralAsset() string

func (*MTP) GetCustodyAsset

func (m *MTP) GetCustodyAsset() string

func (*MTP) GetId

func (m *MTP) GetId() uint64

func (*MTP) GetLastFundingCalcBlock added in v0.45.0

func (m *MTP) GetLastFundingCalcBlock() uint64

func (*MTP) GetLastFundingCalcTime added in v0.45.0

func (m *MTP) GetLastFundingCalcTime() uint64

func (*MTP) GetLastInterestCalcBlock added in v0.45.0

func (m *MTP) GetLastInterestCalcBlock() uint64

func (*MTP) GetLastInterestCalcTime added in v0.45.0

func (m *MTP) GetLastInterestCalcTime() uint64

func (*MTP) GetLiabilitiesAsset

func (m *MTP) GetLiabilitiesAsset() string

func (*MTP) GetPosition

func (m *MTP) GetPosition() Position

func (*MTP) GetTradingAsset

func (m *MTP) GetTradingAsset() string

func (*MTP) Marshal

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

func (*MTP) MarshalTo

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

func (*MTP) MarshalToSizedBuffer

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

func (*MTP) ProtoMessage

func (*MTP) ProtoMessage()

func (*MTP) Reset

func (m *MTP) Reset()

func (*MTP) Size

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

func (*MTP) String

func (m *MTP) String() string

func (*MTP) Unmarshal

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

func (*MTP) UpdateMTPTakeProfitBorrowFactor added in v0.49.4

func (mtp *MTP) UpdateMTPTakeProfitBorrowFactor() error

func (MTP) Validate

func (mtp MTP) Validate() error

func (*MTP) XXX_DiscardUnknown

func (m *MTP) XXX_DiscardUnknown()

func (*MTP) XXX_Marshal

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

func (*MTP) XXX_Merge

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

func (*MTP) XXX_Size

func (m *MTP) XXX_Size() int

func (*MTP) XXX_Unmarshal

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

type MTPRequest

type MTPRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Id      uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

func (*MTPRequest) Descriptor

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

func (*MTPRequest) GetAddress

func (m *MTPRequest) GetAddress() string

func (*MTPRequest) GetId

func (m *MTPRequest) GetId() uint64

func (*MTPRequest) Marshal

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

func (*MTPRequest) MarshalTo

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

func (*MTPRequest) MarshalToSizedBuffer

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

func (*MTPRequest) ProtoMessage

func (*MTPRequest) ProtoMessage()

func (*MTPRequest) Reset

func (m *MTPRequest) Reset()

func (*MTPRequest) Size

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

func (*MTPRequest) String

func (m *MTPRequest) String() string

func (*MTPRequest) Unmarshal

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

func (*MTPRequest) XXX_DiscardUnknown

func (m *MTPRequest) XXX_DiscardUnknown()

func (*MTPRequest) XXX_Marshal

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

func (*MTPRequest) XXX_Merge

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

func (*MTPRequest) XXX_Size

func (m *MTPRequest) XXX_Size() int

func (*MTPRequest) XXX_Unmarshal

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

type MTPResponse

type MTPResponse struct {
	Mtp *MtpAndPrice `protobuf:"bytes,1,opt,name=mtp,proto3" json:"mtp,omitempty"`
}

func (*MTPResponse) Descriptor

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

func (*MTPResponse) GetMtp

func (m *MTPResponse) GetMtp() *MtpAndPrice

func (*MTPResponse) Marshal

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

func (*MTPResponse) MarshalTo

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

func (*MTPResponse) MarshalToSizedBuffer

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

func (*MTPResponse) ProtoMessage

func (*MTPResponse) ProtoMessage()

func (*MTPResponse) Reset

func (m *MTPResponse) Reset()

func (*MTPResponse) Size

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

func (*MTPResponse) String

func (m *MTPResponse) String() string

func (*MTPResponse) Unmarshal

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

func (*MTPResponse) XXX_DiscardUnknown

func (m *MTPResponse) XXX_DiscardUnknown()

func (*MTPResponse) XXX_Marshal

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

func (*MTPResponse) XXX_Merge

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

func (*MTPResponse) XXX_Size

func (m *MTPResponse) XXX_Size() int

func (*MTPResponse) XXX_Unmarshal

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

type MsgClient

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 MsgClose

type MsgClose struct {
	Creator string                `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Id      uint64                `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Amount  cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
}

func NewMsgClose

func NewMsgClose(creator string, id uint64, amount math.Int) *MsgClose

func (*MsgClose) Descriptor

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

func (*MsgClose) GetCreator

func (m *MsgClose) GetCreator() string

func (*MsgClose) GetId

func (m *MsgClose) GetId() uint64

func (*MsgClose) Marshal

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

func (*MsgClose) MarshalTo

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

func (*MsgClose) MarshalToSizedBuffer

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

func (*MsgClose) ProtoMessage

func (*MsgClose) ProtoMessage()

func (*MsgClose) Reset

func (m *MsgClose) Reset()

func (*MsgClose) Size

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

func (*MsgClose) String

func (m *MsgClose) String() string

func (*MsgClose) Unmarshal

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

func (*MsgClose) ValidateBasic

func (msg *MsgClose) ValidateBasic() error

func (*MsgClose) XXX_DiscardUnknown

func (m *MsgClose) XXX_DiscardUnknown()

func (*MsgClose) XXX_Marshal

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

func (*MsgClose) XXX_Merge

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

func (*MsgClose) XXX_Size

func (m *MsgClose) XXX_Size() int

func (*MsgClose) XXX_Unmarshal

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

type MsgClosePositions added in v0.45.0

type MsgClosePositions struct {
	Creator    string            `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Liquidate  []PositionRequest `protobuf:"bytes,2,rep,name=liquidate,proto3" json:"liquidate"`
	StopLoss   []PositionRequest `protobuf:"bytes,3,rep,name=stop_loss,json=stopLoss,proto3" json:"stop_loss"`
	TakeProfit []PositionRequest `protobuf:"bytes,4,rep,name=take_profit,json=takeProfit,proto3" json:"take_profit"`
}

func NewMsgClosePositions added in v0.45.0

func NewMsgClosePositions(creator string, liquidate []PositionRequest, stopLoss []PositionRequest, takeProfit []PositionRequest) *MsgClosePositions

func (*MsgClosePositions) Descriptor added in v0.45.0

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

func (*MsgClosePositions) GetCreator added in v0.45.0

func (m *MsgClosePositions) GetCreator() string

func (*MsgClosePositions) GetLiquidate added in v0.45.0

func (m *MsgClosePositions) GetLiquidate() []PositionRequest

func (*MsgClosePositions) GetStopLoss added in v0.45.0

func (m *MsgClosePositions) GetStopLoss() []PositionRequest

func (*MsgClosePositions) GetTakeProfit added in v0.48.0

func (m *MsgClosePositions) GetTakeProfit() []PositionRequest

func (*MsgClosePositions) Marshal added in v0.45.0

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

func (*MsgClosePositions) MarshalTo added in v0.45.0

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

func (*MsgClosePositions) MarshalToSizedBuffer added in v0.45.0

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

func (*MsgClosePositions) ProtoMessage added in v0.45.0

func (*MsgClosePositions) ProtoMessage()

func (*MsgClosePositions) Reset added in v0.45.0

func (m *MsgClosePositions) Reset()

func (*MsgClosePositions) Size added in v0.45.0

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

func (*MsgClosePositions) String added in v0.45.0

func (m *MsgClosePositions) String() string

func (*MsgClosePositions) Unmarshal added in v0.45.0

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

func (*MsgClosePositions) ValidateBasic added in v0.45.0

func (msg *MsgClosePositions) ValidateBasic() error

func (*MsgClosePositions) XXX_DiscardUnknown added in v0.45.0

func (m *MsgClosePositions) XXX_DiscardUnknown()

func (*MsgClosePositions) XXX_Marshal added in v0.45.0

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

func (*MsgClosePositions) XXX_Merge added in v0.45.0

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

func (*MsgClosePositions) XXX_Size added in v0.45.0

func (m *MsgClosePositions) XXX_Size() int

func (*MsgClosePositions) XXX_Unmarshal added in v0.45.0

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

type MsgClosePositionsResponse added in v0.45.0

type MsgClosePositionsResponse struct {
}

func (*MsgClosePositionsResponse) Descriptor added in v0.45.0

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

func (*MsgClosePositionsResponse) Marshal added in v0.45.0

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

func (*MsgClosePositionsResponse) MarshalTo added in v0.45.0

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

func (*MsgClosePositionsResponse) MarshalToSizedBuffer added in v0.45.0

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

func (*MsgClosePositionsResponse) ProtoMessage added in v0.45.0

func (*MsgClosePositionsResponse) ProtoMessage()

func (*MsgClosePositionsResponse) Reset added in v0.45.0

func (m *MsgClosePositionsResponse) Reset()

func (*MsgClosePositionsResponse) Size added in v0.45.0

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

func (*MsgClosePositionsResponse) String added in v0.45.0

func (m *MsgClosePositionsResponse) String() string

func (*MsgClosePositionsResponse) Unmarshal added in v0.45.0

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

func (*MsgClosePositionsResponse) XXX_DiscardUnknown added in v0.45.0

func (m *MsgClosePositionsResponse) XXX_DiscardUnknown()

func (*MsgClosePositionsResponse) XXX_Marshal added in v0.45.0

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

func (*MsgClosePositionsResponse) XXX_Merge added in v0.45.0

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

func (*MsgClosePositionsResponse) XXX_Size added in v0.45.0

func (m *MsgClosePositionsResponse) XXX_Size() int

func (*MsgClosePositionsResponse) XXX_Unmarshal added in v0.45.0

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

type MsgCloseResponse

type MsgCloseResponse struct {
	Id     uint64                `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
}

func (*MsgCloseResponse) Descriptor

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

func (*MsgCloseResponse) GetId

func (m *MsgCloseResponse) GetId() uint64

func (*MsgCloseResponse) Marshal

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

func (*MsgCloseResponse) MarshalTo

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

func (*MsgCloseResponse) MarshalToSizedBuffer

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

func (*MsgCloseResponse) ProtoMessage

func (*MsgCloseResponse) ProtoMessage()

func (*MsgCloseResponse) Reset

func (m *MsgCloseResponse) Reset()

func (*MsgCloseResponse) Size

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

func (*MsgCloseResponse) String

func (m *MsgCloseResponse) String() string

func (*MsgCloseResponse) Unmarshal

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

func (*MsgCloseResponse) XXX_DiscardUnknown

func (m *MsgCloseResponse) XXX_DiscardUnknown()

func (*MsgCloseResponse) XXX_Marshal

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

func (*MsgCloseResponse) XXX_Merge

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

func (*MsgCloseResponse) XXX_Size

func (m *MsgCloseResponse) XXX_Size() int

func (*MsgCloseResponse) XXX_Unmarshal

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

type MsgDewhitelist

type MsgDewhitelist struct {
	Authority          string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	WhitelistedAddress string `protobuf:"bytes,2,opt,name=whitelisted_address,json=whitelistedAddress,proto3" json:"whitelisted_address,omitempty"`
}

func NewMsgDewhitelist

func NewMsgDewhitelist(signer string, whitelistedAddress string) *MsgDewhitelist

func (*MsgDewhitelist) Descriptor

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

func (*MsgDewhitelist) GetAuthority

func (m *MsgDewhitelist) GetAuthority() string

func (*MsgDewhitelist) GetWhitelistedAddress

func (m *MsgDewhitelist) GetWhitelistedAddress() string

func (*MsgDewhitelist) Marshal

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

func (*MsgDewhitelist) MarshalTo

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

func (*MsgDewhitelist) MarshalToSizedBuffer

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

func (*MsgDewhitelist) ProtoMessage

func (*MsgDewhitelist) ProtoMessage()

func (*MsgDewhitelist) Reset

func (m *MsgDewhitelist) Reset()

func (*MsgDewhitelist) Size

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

func (*MsgDewhitelist) String

func (m *MsgDewhitelist) String() string

func (*MsgDewhitelist) Unmarshal

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

func (*MsgDewhitelist) ValidateBasic

func (msg *MsgDewhitelist) ValidateBasic() error

func (*MsgDewhitelist) XXX_DiscardUnknown

func (m *MsgDewhitelist) XXX_DiscardUnknown()

func (*MsgDewhitelist) XXX_Marshal

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

func (*MsgDewhitelist) XXX_Merge

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

func (*MsgDewhitelist) XXX_Size

func (m *MsgDewhitelist) XXX_Size() int

func (*MsgDewhitelist) XXX_Unmarshal

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

type MsgDewhitelistResponse

type MsgDewhitelistResponse struct {
}

func (*MsgDewhitelistResponse) Descriptor

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

func (*MsgDewhitelistResponse) Marshal

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

func (*MsgDewhitelistResponse) MarshalTo

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

func (*MsgDewhitelistResponse) MarshalToSizedBuffer

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

func (*MsgDewhitelistResponse) ProtoMessage

func (*MsgDewhitelistResponse) ProtoMessage()

func (*MsgDewhitelistResponse) Reset

func (m *MsgDewhitelistResponse) Reset()

func (*MsgDewhitelistResponse) Size

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

func (*MsgDewhitelistResponse) String

func (m *MsgDewhitelistResponse) String() string

func (*MsgDewhitelistResponse) Unmarshal

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

func (*MsgDewhitelistResponse) XXX_DiscardUnknown

func (m *MsgDewhitelistResponse) XXX_DiscardUnknown()

func (*MsgDewhitelistResponse) XXX_Marshal

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

func (*MsgDewhitelistResponse) XXX_Merge

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

func (*MsgDewhitelistResponse) XXX_Size

func (m *MsgDewhitelistResponse) XXX_Size() int

func (*MsgDewhitelistResponse) XXX_Unmarshal

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

type MsgOpen

type MsgOpen struct {
	Creator         string                      `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Position        Position                    `protobuf:"varint,2,opt,name=position,proto3,enum=elys.perpetual.Position" json:"position,omitempty"`
	Leverage        cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=leverage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage"`
	TradingAsset    string                      `protobuf:"bytes,4,opt,name=trading_asset,json=tradingAsset,proto3" json:"trading_asset,omitempty"`
	Collateral      types.Coin                  `protobuf:"bytes,5,opt,name=collateral,proto3" json:"collateral"`
	TakeProfitPrice cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */
	StopLossPrice   cosmossdk_io_math.LegacyDec `` /* 131-byte string literal not displayed */
	PoolId          uint64                      `protobuf:"varint,8,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
}

func NewMsgOpen

func NewMsgOpen(creator string, position Position, leverage sdkmath.LegacyDec, poolId uint64, tradingAsset string, collateral sdk.Coin, takeProfitPrice sdkmath.LegacyDec, stopLossPrice sdkmath.LegacyDec) *MsgOpen

func (*MsgOpen) Descriptor

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

func (*MsgOpen) GetCollateral

func (m *MsgOpen) GetCollateral() types.Coin

func (*MsgOpen) GetCreator

func (m *MsgOpen) GetCreator() string

func (*MsgOpen) GetPoolId added in v0.48.0

func (m *MsgOpen) GetPoolId() uint64

func (*MsgOpen) GetPosition

func (m *MsgOpen) GetPosition() Position

func (*MsgOpen) GetTradingAsset

func (m *MsgOpen) GetTradingAsset() string

func (*MsgOpen) Marshal

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

func (*MsgOpen) MarshalTo

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

func (*MsgOpen) MarshalToSizedBuffer

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

func (*MsgOpen) ProtoMessage

func (*MsgOpen) ProtoMessage()

func (*MsgOpen) Reset

func (m *MsgOpen) Reset()

func (*MsgOpen) Size

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

func (*MsgOpen) String

func (m *MsgOpen) String() string

func (*MsgOpen) Unmarshal

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

func (*MsgOpen) ValidateBasic

func (msg *MsgOpen) ValidateBasic() error

func (*MsgOpen) XXX_DiscardUnknown

func (m *MsgOpen) XXX_DiscardUnknown()

func (*MsgOpen) XXX_Marshal

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

func (*MsgOpen) XXX_Merge

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

func (*MsgOpen) XXX_Size

func (m *MsgOpen) XXX_Size() int

func (*MsgOpen) XXX_Unmarshal

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

type MsgOpenResponse

type MsgOpenResponse struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

func (*MsgOpenResponse) Descriptor

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

func (*MsgOpenResponse) GetId

func (m *MsgOpenResponse) GetId() uint64

func (*MsgOpenResponse) Marshal

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

func (*MsgOpenResponse) MarshalTo

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

func (*MsgOpenResponse) MarshalToSizedBuffer

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

func (*MsgOpenResponse) ProtoMessage

func (*MsgOpenResponse) ProtoMessage()

func (*MsgOpenResponse) Reset

func (m *MsgOpenResponse) Reset()

func (*MsgOpenResponse) Size

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

func (*MsgOpenResponse) String

func (m *MsgOpenResponse) String() string

func (*MsgOpenResponse) Unmarshal

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

func (*MsgOpenResponse) XXX_DiscardUnknown

func (m *MsgOpenResponse) XXX_DiscardUnknown()

func (*MsgOpenResponse) XXX_Marshal

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

func (*MsgOpenResponse) XXX_Merge

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

func (*MsgOpenResponse) XXX_Size

func (m *MsgOpenResponse) XXX_Size() int

func (*MsgOpenResponse) XXX_Unmarshal

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

type MsgUpdateParams

type MsgUpdateParams struct {
	// authority is the address that controls the module (defaults to x/gov unless
	// overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// NOTE: All parameters must be supplied.
	Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
}

func NewMsgUpdateParams

func NewMsgUpdateParams(signer string, params *Params) *MsgUpdateParams

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

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

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

type MsgUpdateStopLoss struct {
	Creator string                      `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Id      uint64                      `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Price   cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"`
}

func NewMsgUpdateStopLoss added in v0.45.0

func NewMsgUpdateStopLoss(creator string, id uint64, price sdkmath.LegacyDec) *MsgUpdateStopLoss

func (*MsgUpdateStopLoss) Descriptor added in v0.45.0

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

func (*MsgUpdateStopLoss) GetCreator added in v0.45.0

func (m *MsgUpdateStopLoss) GetCreator() string

func (*MsgUpdateStopLoss) GetId added in v0.45.0

func (m *MsgUpdateStopLoss) GetId() uint64

func (*MsgUpdateStopLoss) Marshal added in v0.45.0

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

func (*MsgUpdateStopLoss) MarshalTo added in v0.45.0

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

func (*MsgUpdateStopLoss) MarshalToSizedBuffer added in v0.45.0

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

func (*MsgUpdateStopLoss) ProtoMessage added in v0.45.0

func (*MsgUpdateStopLoss) ProtoMessage()

func (*MsgUpdateStopLoss) Reset added in v0.45.0

func (m *MsgUpdateStopLoss) Reset()

func (*MsgUpdateStopLoss) Size added in v0.45.0

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

func (*MsgUpdateStopLoss) String added in v0.45.0

func (m *MsgUpdateStopLoss) String() string

func (*MsgUpdateStopLoss) Unmarshal added in v0.45.0

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

func (*MsgUpdateStopLoss) ValidateBasic added in v0.45.0

func (msg *MsgUpdateStopLoss) ValidateBasic() error

func (*MsgUpdateStopLoss) XXX_DiscardUnknown added in v0.45.0

func (m *MsgUpdateStopLoss) XXX_DiscardUnknown()

func (*MsgUpdateStopLoss) XXX_Marshal added in v0.45.0

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

func (*MsgUpdateStopLoss) XXX_Merge added in v0.45.0

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

func (*MsgUpdateStopLoss) XXX_Size added in v0.45.0

func (m *MsgUpdateStopLoss) XXX_Size() int

func (*MsgUpdateStopLoss) XXX_Unmarshal added in v0.45.0

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

type MsgUpdateStopLossResponse added in v0.45.0

type MsgUpdateStopLossResponse struct {
}

func (*MsgUpdateStopLossResponse) Descriptor added in v0.45.0

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

func (*MsgUpdateStopLossResponse) Marshal added in v0.45.0

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

func (*MsgUpdateStopLossResponse) MarshalTo added in v0.45.0

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

func (*MsgUpdateStopLossResponse) MarshalToSizedBuffer added in v0.45.0

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

func (*MsgUpdateStopLossResponse) ProtoMessage added in v0.45.0

func (*MsgUpdateStopLossResponse) ProtoMessage()

func (*MsgUpdateStopLossResponse) Reset added in v0.45.0

func (m *MsgUpdateStopLossResponse) Reset()

func (*MsgUpdateStopLossResponse) Size added in v0.45.0

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

func (*MsgUpdateStopLossResponse) String added in v0.45.0

func (m *MsgUpdateStopLossResponse) String() string

func (*MsgUpdateStopLossResponse) Unmarshal added in v0.45.0

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

func (*MsgUpdateStopLossResponse) XXX_DiscardUnknown added in v0.45.0

func (m *MsgUpdateStopLossResponse) XXX_DiscardUnknown()

func (*MsgUpdateStopLossResponse) XXX_Marshal added in v0.45.0

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

func (*MsgUpdateStopLossResponse) XXX_Merge added in v0.45.0

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

func (*MsgUpdateStopLossResponse) XXX_Size added in v0.45.0

func (m *MsgUpdateStopLossResponse) XXX_Size() int

func (*MsgUpdateStopLossResponse) XXX_Unmarshal added in v0.45.0

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

type MsgUpdateTakeProfitPrice added in v0.46.0

type MsgUpdateTakeProfitPrice struct {
	Creator string                      `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Id      uint64                      `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Price   cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=price,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price"`
}

func NewMsgUpdateTakeProfitPrice added in v0.46.0

func NewMsgUpdateTakeProfitPrice(creator string, id uint64, price sdkmath.LegacyDec) *MsgUpdateTakeProfitPrice

func (*MsgUpdateTakeProfitPrice) Descriptor added in v0.46.0

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

func (*MsgUpdateTakeProfitPrice) GetCreator added in v0.46.0

func (m *MsgUpdateTakeProfitPrice) GetCreator() string

func (*MsgUpdateTakeProfitPrice) GetId added in v0.46.0

func (m *MsgUpdateTakeProfitPrice) GetId() uint64

func (*MsgUpdateTakeProfitPrice) Marshal added in v0.46.0

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

func (*MsgUpdateTakeProfitPrice) MarshalTo added in v0.46.0

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

func (*MsgUpdateTakeProfitPrice) MarshalToSizedBuffer added in v0.46.0

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

func (*MsgUpdateTakeProfitPrice) ProtoMessage added in v0.46.0

func (*MsgUpdateTakeProfitPrice) ProtoMessage()

func (*MsgUpdateTakeProfitPrice) Reset added in v0.46.0

func (m *MsgUpdateTakeProfitPrice) Reset()

func (*MsgUpdateTakeProfitPrice) Size added in v0.46.0

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

func (*MsgUpdateTakeProfitPrice) String added in v0.46.0

func (m *MsgUpdateTakeProfitPrice) String() string

func (*MsgUpdateTakeProfitPrice) Unmarshal added in v0.46.0

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

func (*MsgUpdateTakeProfitPrice) ValidateBasic added in v0.46.0

func (msg *MsgUpdateTakeProfitPrice) ValidateBasic() error

func (*MsgUpdateTakeProfitPrice) XXX_DiscardUnknown added in v0.46.0

func (m *MsgUpdateTakeProfitPrice) XXX_DiscardUnknown()

func (*MsgUpdateTakeProfitPrice) XXX_Marshal added in v0.46.0

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

func (*MsgUpdateTakeProfitPrice) XXX_Merge added in v0.46.0

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

func (*MsgUpdateTakeProfitPrice) XXX_Size added in v0.46.0

func (m *MsgUpdateTakeProfitPrice) XXX_Size() int

func (*MsgUpdateTakeProfitPrice) XXX_Unmarshal added in v0.46.0

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

type MsgUpdateTakeProfitPriceResponse added in v0.46.0

type MsgUpdateTakeProfitPriceResponse struct {
}

func (*MsgUpdateTakeProfitPriceResponse) Descriptor added in v0.46.0

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

func (*MsgUpdateTakeProfitPriceResponse) Marshal added in v0.46.0

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

func (*MsgUpdateTakeProfitPriceResponse) MarshalTo added in v0.46.0

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

func (*MsgUpdateTakeProfitPriceResponse) MarshalToSizedBuffer added in v0.46.0

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

func (*MsgUpdateTakeProfitPriceResponse) ProtoMessage added in v0.46.0

func (*MsgUpdateTakeProfitPriceResponse) ProtoMessage()

func (*MsgUpdateTakeProfitPriceResponse) Reset added in v0.46.0

func (*MsgUpdateTakeProfitPriceResponse) Size added in v0.46.0

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

func (*MsgUpdateTakeProfitPriceResponse) String added in v0.46.0

func (*MsgUpdateTakeProfitPriceResponse) Unmarshal added in v0.46.0

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

func (*MsgUpdateTakeProfitPriceResponse) XXX_DiscardUnknown added in v0.46.0

func (m *MsgUpdateTakeProfitPriceResponse) XXX_DiscardUnknown()

func (*MsgUpdateTakeProfitPriceResponse) XXX_Marshal added in v0.46.0

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

func (*MsgUpdateTakeProfitPriceResponse) XXX_Merge added in v0.46.0

func (*MsgUpdateTakeProfitPriceResponse) XXX_Size added in v0.46.0

func (m *MsgUpdateTakeProfitPriceResponse) XXX_Size() int

func (*MsgUpdateTakeProfitPriceResponse) XXX_Unmarshal added in v0.46.0

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

type MsgWhitelist

type MsgWhitelist struct {
	Authority          string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	WhitelistedAddress string `protobuf:"bytes,2,opt,name=whitelisted_address,json=whitelistedAddress,proto3" json:"whitelisted_address,omitempty"`
}

func NewMsgWhitelist

func NewMsgWhitelist(signer string, whitelistedAddress string) *MsgWhitelist

func (*MsgWhitelist) Descriptor

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

func (*MsgWhitelist) GetAuthority

func (m *MsgWhitelist) GetAuthority() string

func (*MsgWhitelist) GetWhitelistedAddress

func (m *MsgWhitelist) GetWhitelistedAddress() string

func (*MsgWhitelist) Marshal

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

func (*MsgWhitelist) MarshalTo

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

func (*MsgWhitelist) MarshalToSizedBuffer

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

func (*MsgWhitelist) ProtoMessage

func (*MsgWhitelist) ProtoMessage()

func (*MsgWhitelist) Reset

func (m *MsgWhitelist) Reset()

func (*MsgWhitelist) Size

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

func (*MsgWhitelist) String

func (m *MsgWhitelist) String() string

func (*MsgWhitelist) Unmarshal

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

func (*MsgWhitelist) ValidateBasic

func (msg *MsgWhitelist) ValidateBasic() error

func (*MsgWhitelist) XXX_DiscardUnknown

func (m *MsgWhitelist) XXX_DiscardUnknown()

func (*MsgWhitelist) XXX_Marshal

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

func (*MsgWhitelist) XXX_Merge

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

func (*MsgWhitelist) XXX_Size

func (m *MsgWhitelist) XXX_Size() int

func (*MsgWhitelist) XXX_Unmarshal

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

type MsgWhitelistResponse

type MsgWhitelistResponse struct {
}

func (*MsgWhitelistResponse) Descriptor

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

func (*MsgWhitelistResponse) Marshal

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

func (*MsgWhitelistResponse) MarshalTo

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

func (*MsgWhitelistResponse) MarshalToSizedBuffer

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

func (*MsgWhitelistResponse) ProtoMessage

func (*MsgWhitelistResponse) ProtoMessage()

func (*MsgWhitelistResponse) Reset

func (m *MsgWhitelistResponse) Reset()

func (*MsgWhitelistResponse) Size

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

func (*MsgWhitelistResponse) String

func (m *MsgWhitelistResponse) String() string

func (*MsgWhitelistResponse) Unmarshal

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

func (*MsgWhitelistResponse) XXX_DiscardUnknown

func (m *MsgWhitelistResponse) XXX_DiscardUnknown()

func (*MsgWhitelistResponse) XXX_Marshal

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

func (*MsgWhitelistResponse) XXX_Merge

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

func (*MsgWhitelistResponse) XXX_Size

func (m *MsgWhitelistResponse) XXX_Size() int

func (*MsgWhitelistResponse) XXX_Unmarshal

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

type MtpAndPrice added in v0.46.0

type MtpAndPrice struct {
	Mtp               *MTP                        `protobuf:"bytes,1,opt,name=mtp,proto3" json:"mtp,omitempty"`
	TradingAssetPrice cosmossdk_io_math.LegacyDec `` /* 143-byte string literal not displayed */
	Pnl               types.Coin                  `protobuf:"bytes,3,opt,name=pnl,proto3" json:"pnl"`
	EffectiveLeverage cosmossdk_io_math.LegacyDec `` /* 141-byte string literal not displayed */
	LiquidationPrice  cosmossdk_io_math.LegacyDec `` /* 138-byte string literal not displayed */
	Fees              *Fees                       `protobuf:"bytes,6,opt,name=fees,proto3" json:"fees,omitempty"`
}

func (*MtpAndPrice) Descriptor added in v0.46.0

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

func (*MtpAndPrice) GetFees added in v0.48.0

func (m *MtpAndPrice) GetFees() *Fees

func (*MtpAndPrice) GetMtp added in v0.46.0

func (m *MtpAndPrice) GetMtp() *MTP

func (*MtpAndPrice) GetPnl added in v0.49.0

func (m *MtpAndPrice) GetPnl() types.Coin

func (*MtpAndPrice) Marshal added in v0.46.0

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

func (*MtpAndPrice) MarshalTo added in v0.46.0

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

func (*MtpAndPrice) MarshalToSizedBuffer added in v0.46.0

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

func (*MtpAndPrice) ProtoMessage added in v0.46.0

func (*MtpAndPrice) ProtoMessage()

func (*MtpAndPrice) Reset added in v0.46.0

func (m *MtpAndPrice) Reset()

func (*MtpAndPrice) Size added in v0.46.0

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

func (*MtpAndPrice) String added in v0.46.0

func (m *MtpAndPrice) String() string

func (*MtpAndPrice) Unmarshal added in v0.46.0

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

func (*MtpAndPrice) XXX_DiscardUnknown added in v0.46.0

func (m *MtpAndPrice) XXX_DiscardUnknown()

func (*MtpAndPrice) XXX_Marshal added in v0.46.0

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

func (*MtpAndPrice) XXX_Merge added in v0.46.0

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

func (*MtpAndPrice) XXX_Size added in v0.46.0

func (m *MtpAndPrice) XXX_Size() int

func (*MtpAndPrice) XXX_Unmarshal added in v0.46.0

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

type MultiPerpetualHooks

type MultiPerpetualHooks []PerpetualHooks

combine multiple perpetual hooks, all hook functions are run in array sequence.

func NewMultiPerpetualHooks

func NewMultiPerpetualHooks(hooks ...PerpetualHooks) MultiPerpetualHooks

Creates hooks for the Amm Module.

func (MultiPerpetualHooks) AfterParamsChange added in v0.49.0

func (h MultiPerpetualHooks) AfterParamsChange(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool Pool, EnableTakeProfitCustodyLiabilities bool) error

func (MultiPerpetualHooks) AfterPerpetualPositionClosed

func (h MultiPerpetualHooks) AfterPerpetualPositionClosed(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error

func (MultiPerpetualHooks) AfterPerpetualPositionModified

func (h MultiPerpetualHooks) AfterPerpetualPositionModified(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error

func (MultiPerpetualHooks) AfterPerpetualPositionOpen

func (h MultiPerpetualHooks) AfterPerpetualPositionOpen(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error

type OracleKeeper added in v0.46.0

type OracleKeeper interface {
	GetAssetPrice(ctx sdk.Context, asset string) (oracletypes.Price, bool)
	GetAssetPriceFromDenom(ctx sdk.Context, denom string) math.LegacyDec
	GetPriceFeeder(ctx sdk.Context, feeder sdk.AccAddress) (val oracletypes.PriceFeeder, found bool)
	GetAssetInfo(ctx sdk.Context, denom string) (val oracletypes.AssetInfo, found bool)
}

type Params

type Params struct {
	LeverageMax                         cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=leverage_max,json=leverageMax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage_max"`
	BorrowInterestRateMax               cosmossdk_io_math.LegacyDec `` /* 157-byte string literal not displayed */
	BorrowInterestRateMin               cosmossdk_io_math.LegacyDec `` /* 157-byte string literal not displayed */
	BorrowInterestRateIncrease          cosmossdk_io_math.LegacyDec `` /* 172-byte string literal not displayed */
	BorrowInterestRateDecrease          cosmossdk_io_math.LegacyDec `` /* 172-byte string literal not displayed */
	HealthGainFactor                    cosmossdk_io_math.LegacyDec `` /* 140-byte string literal not displayed */
	MaxOpenPositions                    int64                       `protobuf:"varint,7,opt,name=max_open_positions,json=maxOpenPositions,proto3" json:"max_open_positions,omitempty"`
	PoolOpenThreshold                   cosmossdk_io_math.LegacyDec `` /* 143-byte string literal not displayed */
	BorrowInterestPaymentFundPercentage cosmossdk_io_math.LegacyDec `` /* 201-byte string literal not displayed */
	BorrowInterestPaymentFundAddress    string                      `` /* 164-byte string literal not displayed */
	SafetyFactor                        cosmossdk_io_math.LegacyDec `` /* 127-byte string literal not displayed */
	BorrowInterestPaymentEnabled        bool                        `` /* 151-byte string literal not displayed */
	WhitelistingEnabled                 bool                        `protobuf:"varint,13,opt,name=whitelisting_enabled,json=whitelistingEnabled,proto3" json:"whitelisting_enabled,omitempty"`
	PerpetualSwapFee                    cosmossdk_io_math.LegacyDec `` /* 141-byte string literal not displayed */
	MaxLimitOrder                       int64                       `protobuf:"varint,15,opt,name=max_limit_order,json=maxLimitOrder,proto3" json:"max_limit_order,omitempty"`
	FixedFundingRate                    cosmossdk_io_math.LegacyDec `` /* 141-byte string literal not displayed */
	// minimum value for take_profit_price/current price for long, should be
	// greater than 1
	MinimumLongTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `` /* 192-byte string literal not displayed */
	// max value for take_profit_price/current price for long, should be greater
	// than 1
	MaximumLongTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `` /* 192-byte string literal not displayed */
	// max value for take_profit_price/current price for short, should be less
	// than 1
	MaximumShortTakeProfitPriceRatio cosmossdk_io_math.LegacyDec `` /* 195-byte string literal not displayed */
	// No need for minimumShortTakeProfitPriceRatio as it will be 0, checked in
	// validate message
	EnableTakeProfitCustodyLiabilities bool `` /* 171-byte string literal not displayed */
	// We create this and send this value to estimate swap ONLY when opening and
	// closing the position Ideally this value is set to half. When trader open a
	// position if they receive a weight balance bonus (which is half of weight
	// breaking fee, ideally) then while closing position they are charged weight
	// breaking fee. So we just directly apply half weight breaking fee on
	// perpetual swaps Question: does each need to have separate value of this
	// because PoolParams.WeightRecoveryFeePortion can be different Also, if
	// trader has no bonus only fee, then overall we are only applying the fee
	// half time
	WeightBreakingFeeFactor cosmossdk_io_math.LegacyDec `` /* 164-byte string literal not displayed */
}

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetBorrowInterestPaymentEnabled added in v0.54.0

func (m *Params) GetBorrowInterestPaymentEnabled() bool

func (*Params) GetBorrowInterestPaymentFundAddress added in v0.54.0

func (m *Params) GetBorrowInterestPaymentFundAddress() string

func (*Params) GetEnableTakeProfitCustodyLiabilities added in v0.49.0

func (m *Params) GetEnableTakeProfitCustodyLiabilities() bool

func (*Params) GetMaxLimitOrder added in v0.46.0

func (m *Params) GetMaxLimitOrder() int64

func (*Params) GetMaxOpenPositions

func (m *Params) GetMaxOpenPositions() int64

func (*Params) GetWhitelistingEnabled

func (m *Params) GetWhitelistingEnabled() bool

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

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

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 ParamsRequest

type ParamsRequest struct {
}

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

func (*ParamsRequest) Descriptor

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

func (*ParamsRequest) Marshal

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

func (*ParamsRequest) MarshalTo

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

func (*ParamsRequest) MarshalToSizedBuffer

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

func (*ParamsRequest) ProtoMessage

func (*ParamsRequest) ProtoMessage()

func (*ParamsRequest) Reset

func (m *ParamsRequest) Reset()

func (*ParamsRequest) Size

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

func (*ParamsRequest) String

func (m *ParamsRequest) String() string

func (*ParamsRequest) Unmarshal

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

func (*ParamsRequest) XXX_DiscardUnknown

func (m *ParamsRequest) XXX_DiscardUnknown()

func (*ParamsRequest) XXX_Marshal

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

func (*ParamsRequest) XXX_Merge

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

func (*ParamsRequest) XXX_Size

func (m *ParamsRequest) XXX_Size() int

func (*ParamsRequest) XXX_Unmarshal

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

type ParamsResponse

type ParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

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

func (*ParamsResponse) Descriptor

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

func (*ParamsResponse) GetParams

func (m *ParamsResponse) GetParams() Params

func (*ParamsResponse) Marshal

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

func (*ParamsResponse) MarshalTo

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

func (*ParamsResponse) MarshalToSizedBuffer

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

func (*ParamsResponse) ProtoMessage

func (*ParamsResponse) ProtoMessage()

func (*ParamsResponse) Reset

func (m *ParamsResponse) Reset()

func (*ParamsResponse) Size

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

func (*ParamsResponse) String

func (m *ParamsResponse) String() string

func (*ParamsResponse) Unmarshal

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

func (*ParamsResponse) XXX_DiscardUnknown

func (m *ParamsResponse) XXX_DiscardUnknown()

func (*ParamsResponse) XXX_Marshal

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

func (*ParamsResponse) XXX_Merge

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

func (*ParamsResponse) XXX_Size

func (m *ParamsResponse) XXX_Size() int

func (*ParamsResponse) XXX_Unmarshal

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

type PerpetualHooks

type PerpetualHooks interface {
	AfterParamsChange(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool Pool, EnableTakeProfitCustodyLiabilities bool) error
	// AfterPerpetualPositionOpen is called after OpenLong or OpenShort position.
	// This should be used to update pool health
	AfterPerpetualPositionOpen(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error

	// AfterPerpetualPositionModified is called after a position gets modified.
	// This should be used to update pool health
	AfterPerpetualPositionModified(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error

	// AfterPerpetualPositionClosed is called after a position gets closed.
	// This should be used to update pool health
	AfterPerpetualPositionClosed(ctx sdk.Context, ammPool ammtypes.Pool, perpetualPool Pool, sender sdk.AccAddress, EnableTakeProfitCustodyLiabilities bool) error
}

type Pool

type Pool struct {
	AmmPoolId                            uint64                      `protobuf:"varint,1,opt,name=amm_pool_id,json=ammPoolId,proto3" json:"amm_pool_id,omitempty"`
	Health                               cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=health,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"health"`
	BorrowInterestRate                   cosmossdk_io_math.LegacyDec `` /* 146-byte string literal not displayed */
	PoolAssetsLong                       []PoolAsset                 `protobuf:"bytes,4,rep,name=pool_assets_long,json=poolAssetsLong,proto3" json:"pool_assets_long"`
	PoolAssetsShort                      []PoolAsset                 `protobuf:"bytes,5,rep,name=pool_assets_short,json=poolAssetsShort,proto3" json:"pool_assets_short"`
	LastHeightBorrowInterestRateComputed int64                       `` /* 178-byte string literal not displayed */
	// funding rate, if positive longs pay shorts, if negative shorts pay longs
	FundingRate   cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=funding_rate,json=fundingRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"funding_rate"`
	FeesCollected []types.Coin                `protobuf:"bytes,8,rep,name=fees_collected,json=feesCollected,proto3" json:"fees_collected"`
}

func NewPool

func NewPool(ammPool ammtypes.Pool) Pool

func (*Pool) Descriptor

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

func (*Pool) GetAmmPoolId

func (m *Pool) GetAmmPoolId() uint64

func (*Pool) GetFeesCollected added in v0.48.0

func (m *Pool) GetFeesCollected() []types.Coin

func (*Pool) GetLastHeightBorrowInterestRateComputed

func (m *Pool) GetLastHeightBorrowInterestRateComputed() int64

func (Pool) GetNetOpenInterest added in v0.49.0

func (pool Pool) GetNetOpenInterest() math.Int

GetNetOpenInterest calculates the net open interest for a given pool. Note: Net open interest should always be in terms of trading asset

func (Pool) GetPerpetualPoolBalances added in v0.48.0

func (perpetualPool Pool) GetPerpetualPoolBalances(denom string) (math.Int, math.Int, math.Int, math.Int)

Get Perpetual Pool Balance

func (Pool) GetPerpetualPoolBalancesByPosition added in v0.48.0

func (perpetualPool Pool) GetPerpetualPoolBalancesByPosition(denom string, position Position) (math.Int, math.Int, math.Int, math.Int)

func (Pool) GetPoolAsset

func (p Pool) GetPoolAsset(position Position, assetDenom string) *PoolAsset

Get relevant pool asset based on position direction and asset denom

func (Pool) GetPoolAssets

func (p Pool) GetPoolAssets(position Position) *[]PoolAsset

Get relevant pool asset array based on position direction

func (*Pool) GetPoolAssetsLong

func (m *Pool) GetPoolAssetsLong() []PoolAsset

func (*Pool) GetPoolAssetsShort

func (m *Pool) GetPoolAssetsShort() []PoolAsset

func (Pool) GetTotalLongOpenInterest added in v0.49.0

func (pool Pool) GetTotalLongOpenInterest() math.Int

func (Pool) GetTotalShortOpenInterest added in v0.49.0

func (pool Pool) GetTotalShortOpenInterest() math.Int

func (*Pool) Marshal

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

func (*Pool) MarshalTo

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

func (*Pool) MarshalToSizedBuffer

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

func (*Pool) ProtoMessage

func (*Pool) ProtoMessage()

func (*Pool) Reset

func (m *Pool) Reset()

func (*Pool) Size

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

func (*Pool) String

func (m *Pool) String() string

func (*Pool) Unmarshal

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

func (*Pool) UpdateCollateral added in v0.49.0

func (p *Pool) UpdateCollateral(assetDenom string, amount math.Int, isIncrease bool, position Position) error

Update the asset collateral

func (*Pool) UpdateCustody

func (p *Pool) UpdateCustody(assetDenom string, amount math.Int, isIncrease bool, position Position) error

Update the asset custody

func (*Pool) UpdateFeesCollected added in v0.48.0

func (p *Pool) UpdateFeesCollected(assetDenom string, amount math.Int, isIncrease bool) error

Update the fees collected

func (*Pool) UpdateLiabilities

func (p *Pool) UpdateLiabilities(assetDenom string, amount math.Int, isIncrease bool, position Position) error

Update the asset liabilities

func (*Pool) UpdateTakeProfitCustody

func (p *Pool) UpdateTakeProfitCustody(assetDenom string, amount math.Int, isIncrease bool, position Position) error

Update the asset take profit custody

func (*Pool) UpdateTakeProfitLiabilities

func (p *Pool) UpdateTakeProfitLiabilities(assetDenom string, amount math.Int, isIncrease bool, position Position) error

Update the asset take profit liabilities

func (*Pool) XXX_DiscardUnknown

func (m *Pool) XXX_DiscardUnknown()

func (*Pool) XXX_Marshal

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

func (*Pool) XXX_Merge

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

func (*Pool) XXX_Size

func (m *Pool) XXX_Size() int

func (*Pool) XXX_Unmarshal

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

type PoolAsset

type PoolAsset struct {
	Liabilities           cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=liabilities,proto3,customtype=cosmossdk.io/math.Int" json:"liabilities"`
	Custody               cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=custody,proto3,customtype=cosmossdk.io/math.Int" json:"custody"`
	TakeProfitLiabilities cosmossdk_io_math.Int `` /* 149-byte string literal not displayed */
	TakeProfitCustody     cosmossdk_io_math.Int `` /* 137-byte string literal not displayed */
	AssetDenom            string                `protobuf:"bytes,5,opt,name=asset_denom,json=assetDenom,proto3" json:"asset_denom,omitempty"`
	Collateral            cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=collateral,proto3,customtype=cosmossdk.io/math.Int" json:"collateral"`
}

func (*PoolAsset) Descriptor

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

func (*PoolAsset) GetAssetDenom

func (m *PoolAsset) GetAssetDenom() string

func (*PoolAsset) Marshal

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

func (*PoolAsset) MarshalTo

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

func (*PoolAsset) MarshalToSizedBuffer

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

func (*PoolAsset) ProtoMessage

func (*PoolAsset) ProtoMessage()

func (*PoolAsset) Reset

func (m *PoolAsset) Reset()

func (*PoolAsset) Size

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

func (*PoolAsset) String

func (m *PoolAsset) String() string

func (*PoolAsset) Unmarshal

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

func (*PoolAsset) XXX_DiscardUnknown

func (m *PoolAsset) XXX_DiscardUnknown()

func (*PoolAsset) XXX_Marshal

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

func (*PoolAsset) XXX_Merge

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

func (*PoolAsset) XXX_Size

func (m *PoolAsset) XXX_Size() int

func (*PoolAsset) XXX_Unmarshal

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

type PoolResponse added in v0.46.0

type PoolResponse struct {
	AmmPoolId                            uint64                      `protobuf:"varint,1,opt,name=amm_pool_id,json=ammPoolId,proto3" json:"amm_pool_id,omitempty"`
	Health                               cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=health,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"health"`
	BorrowInterestRate                   cosmossdk_io_math.LegacyDec `` /* 146-byte string literal not displayed */
	PoolAssetsLong                       []PoolAsset                 `protobuf:"bytes,4,rep,name=pool_assets_long,json=poolAssetsLong,proto3" json:"pool_assets_long"`
	PoolAssetsShort                      []PoolAsset                 `protobuf:"bytes,5,rep,name=pool_assets_short,json=poolAssetsShort,proto3" json:"pool_assets_short"`
	LastHeightBorrowInterestRateComputed int64                       `` /* 178-byte string literal not displayed */
	// funding rate, if positive longs pay shorts, if negative shorts pay longs
	FundingRate     cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=funding_rate,json=fundingRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"funding_rate"`
	NetOpenInterest cosmossdk_io_math.Int       `` /* 131-byte string literal not displayed */
	// Rate at which long pays/receive from short
	// if negative longs pay, if positive long receives
	LongRate               cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=long_rate,json=longRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"long_rate"`
	ShortRate              cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=short_rate,json=shortRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"short_rate"`
	TotalLiabilities       types.Coin                  `protobuf:"bytes,11,opt,name=total_liabilities,json=totalLiabilities,proto3" json:"total_liabilities"`
	TotalLongOpenInterest  cosmossdk_io_math.Int       `` /* 152-byte string literal not displayed */
	TotalShortOpenInterest cosmossdk_io_math.Int       `` /* 155-byte string literal not displayed */
}

func (*PoolResponse) Descriptor added in v0.46.0

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

func (*PoolResponse) GetAmmPoolId added in v0.46.0

func (m *PoolResponse) GetAmmPoolId() uint64

func (*PoolResponse) GetLastHeightBorrowInterestRateComputed added in v0.46.0

func (m *PoolResponse) GetLastHeightBorrowInterestRateComputed() int64

func (*PoolResponse) GetPoolAssetsLong added in v0.46.0

func (m *PoolResponse) GetPoolAssetsLong() []PoolAsset

func (*PoolResponse) GetPoolAssetsShort added in v0.46.0

func (m *PoolResponse) GetPoolAssetsShort() []PoolAsset

func (*PoolResponse) GetTotalLiabilities added in v0.49.0

func (m *PoolResponse) GetTotalLiabilities() types.Coin

func (*PoolResponse) Marshal added in v0.46.0

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

func (*PoolResponse) MarshalTo added in v0.46.0

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

func (*PoolResponse) MarshalToSizedBuffer added in v0.46.0

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

func (*PoolResponse) ProtoMessage added in v0.46.0

func (*PoolResponse) ProtoMessage()

func (*PoolResponse) Reset added in v0.46.0

func (m *PoolResponse) Reset()

func (*PoolResponse) Size added in v0.46.0

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

func (*PoolResponse) String added in v0.46.0

func (m *PoolResponse) String() string

func (*PoolResponse) Unmarshal added in v0.46.0

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

func (*PoolResponse) XXX_DiscardUnknown added in v0.46.0

func (m *PoolResponse) XXX_DiscardUnknown()

func (*PoolResponse) XXX_Marshal added in v0.46.0

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

func (*PoolResponse) XXX_Merge added in v0.46.0

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

func (*PoolResponse) XXX_Size added in v0.46.0

func (m *PoolResponse) XXX_Size() int

func (*PoolResponse) XXX_Unmarshal added in v0.46.0

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

type Position

type Position int32
const (
	Position_UNSPECIFIED Position = 0
	Position_LONG        Position = 1
	Position_SHORT       Position = 2
)

func GetPositionFromString

func GetPositionFromString(s string) Position

func (Position) EnumDescriptor

func (Position) EnumDescriptor() ([]byte, []int)

func (Position) String

func (x Position) String() string

type PositionRequest added in v0.45.0

type PositionRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Id      uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
}

func (*PositionRequest) Descriptor added in v0.45.0

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

func (*PositionRequest) GetAddress added in v0.45.0

func (m *PositionRequest) GetAddress() string

func (*PositionRequest) GetId added in v0.45.0

func (m *PositionRequest) GetId() uint64

func (*PositionRequest) Marshal added in v0.45.0

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

func (*PositionRequest) MarshalTo added in v0.45.0

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

func (*PositionRequest) MarshalToSizedBuffer added in v0.45.0

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

func (*PositionRequest) ProtoMessage added in v0.45.0

func (*PositionRequest) ProtoMessage()

func (*PositionRequest) Reset added in v0.45.0

func (m *PositionRequest) Reset()

func (*PositionRequest) Size added in v0.45.0

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

func (*PositionRequest) String added in v0.45.0

func (m *PositionRequest) String() string

func (*PositionRequest) Unmarshal added in v0.45.0

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

func (*PositionRequest) XXX_DiscardUnknown added in v0.45.0

func (m *PositionRequest) XXX_DiscardUnknown()

func (*PositionRequest) XXX_Marshal added in v0.45.0

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

func (*PositionRequest) XXX_Merge added in v0.45.0

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

func (*PositionRequest) XXX_Size added in v0.45.0

func (m *PositionRequest) XXX_Size() int

func (*PositionRequest) XXX_Unmarshal added in v0.45.0

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

type PositionsByPoolRequest

type PositionsByPoolRequest struct {
	AmmPoolId  uint64             `protobuf:"varint,1,opt,name=amm_pool_id,json=ammPoolId,proto3" json:"amm_pool_id,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*PositionsByPoolRequest) Descriptor

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

func (*PositionsByPoolRequest) GetAmmPoolId

func (m *PositionsByPoolRequest) GetAmmPoolId() uint64

func (*PositionsByPoolRequest) GetPagination

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

func (*PositionsByPoolRequest) Marshal

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

func (*PositionsByPoolRequest) MarshalTo

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

func (*PositionsByPoolRequest) MarshalToSizedBuffer

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

func (*PositionsByPoolRequest) ProtoMessage

func (*PositionsByPoolRequest) ProtoMessage()

func (*PositionsByPoolRequest) Reset

func (m *PositionsByPoolRequest) Reset()

func (*PositionsByPoolRequest) Size

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

func (*PositionsByPoolRequest) String

func (m *PositionsByPoolRequest) String() string

func (*PositionsByPoolRequest) Unmarshal

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

func (*PositionsByPoolRequest) XXX_DiscardUnknown

func (m *PositionsByPoolRequest) XXX_DiscardUnknown()

func (*PositionsByPoolRequest) XXX_Marshal

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

func (*PositionsByPoolRequest) XXX_Merge

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

func (*PositionsByPoolRequest) XXX_Size

func (m *PositionsByPoolRequest) XXX_Size() int

func (*PositionsByPoolRequest) XXX_Unmarshal

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

type PositionsByPoolResponse

type PositionsByPoolResponse struct {
	Mtps       []*MtpAndPrice      `protobuf:"bytes,1,rep,name=mtps,proto3" json:"mtps,omitempty"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*PositionsByPoolResponse) Descriptor

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

func (*PositionsByPoolResponse) GetMtps

func (m *PositionsByPoolResponse) GetMtps() []*MtpAndPrice

func (*PositionsByPoolResponse) GetPagination

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

func (*PositionsByPoolResponse) Marshal

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

func (*PositionsByPoolResponse) MarshalTo

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

func (*PositionsByPoolResponse) MarshalToSizedBuffer

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

func (*PositionsByPoolResponse) ProtoMessage

func (*PositionsByPoolResponse) ProtoMessage()

func (*PositionsByPoolResponse) Reset

func (m *PositionsByPoolResponse) Reset()

func (*PositionsByPoolResponse) Size

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

func (*PositionsByPoolResponse) String

func (m *PositionsByPoolResponse) String() string

func (*PositionsByPoolResponse) Unmarshal

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

func (*PositionsByPoolResponse) XXX_DiscardUnknown

func (m *PositionsByPoolResponse) XXX_DiscardUnknown()

func (*PositionsByPoolResponse) XXX_Marshal

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

func (*PositionsByPoolResponse) XXX_Merge

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

func (*PositionsByPoolResponse) XXX_Size

func (m *PositionsByPoolResponse) XXX_Size() int

func (*PositionsByPoolResponse) XXX_Unmarshal

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

type PositionsForAddressRequest

type PositionsForAddressRequest struct {
	Address    string             `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*PositionsForAddressRequest) Descriptor

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

func (*PositionsForAddressRequest) GetAddress

func (m *PositionsForAddressRequest) GetAddress() string

func (*PositionsForAddressRequest) GetPagination

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

func (*PositionsForAddressRequest) Marshal

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

func (*PositionsForAddressRequest) MarshalTo

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

func (*PositionsForAddressRequest) MarshalToSizedBuffer

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

func (*PositionsForAddressRequest) ProtoMessage

func (*PositionsForAddressRequest) ProtoMessage()

func (*PositionsForAddressRequest) Reset

func (m *PositionsForAddressRequest) Reset()

func (*PositionsForAddressRequest) Size

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

func (*PositionsForAddressRequest) String

func (m *PositionsForAddressRequest) String() string

func (*PositionsForAddressRequest) Unmarshal

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

func (*PositionsForAddressRequest) XXX_DiscardUnknown

func (m *PositionsForAddressRequest) XXX_DiscardUnknown()

func (*PositionsForAddressRequest) XXX_Marshal

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

func (*PositionsForAddressRequest) XXX_Merge

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

func (*PositionsForAddressRequest) XXX_Size

func (m *PositionsForAddressRequest) XXX_Size() int

func (*PositionsForAddressRequest) XXX_Unmarshal

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

type PositionsForAddressResponse

type PositionsForAddressResponse struct {
	Mtps       []*MtpAndPrice      `protobuf:"bytes,1,rep,name=mtps,proto3" json:"mtps,omitempty"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*PositionsForAddressResponse) Descriptor

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

func (*PositionsForAddressResponse) GetMtps

func (m *PositionsForAddressResponse) GetMtps() []*MtpAndPrice

func (*PositionsForAddressResponse) GetPagination

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

func (*PositionsForAddressResponse) Marshal

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

func (*PositionsForAddressResponse) MarshalTo

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

func (*PositionsForAddressResponse) MarshalToSizedBuffer

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

func (*PositionsForAddressResponse) ProtoMessage

func (*PositionsForAddressResponse) ProtoMessage()

func (*PositionsForAddressResponse) Reset

func (m *PositionsForAddressResponse) Reset()

func (*PositionsForAddressResponse) Size

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

func (*PositionsForAddressResponse) String

func (m *PositionsForAddressResponse) String() string

func (*PositionsForAddressResponse) Unmarshal

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

func (*PositionsForAddressResponse) XXX_DiscardUnknown

func (m *PositionsForAddressResponse) XXX_DiscardUnknown()

func (*PositionsForAddressResponse) XXX_Marshal

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

func (*PositionsForAddressResponse) XXX_Merge

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

func (*PositionsForAddressResponse) XXX_Size

func (m *PositionsForAddressResponse) XXX_Size() int

func (*PositionsForAddressResponse) XXX_Unmarshal

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

type PositionsRequest

type PositionsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*PositionsRequest) Descriptor

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

func (*PositionsRequest) GetPagination

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

func (*PositionsRequest) Marshal

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

func (*PositionsRequest) MarshalTo

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

func (*PositionsRequest) MarshalToSizedBuffer

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

func (*PositionsRequest) ProtoMessage

func (*PositionsRequest) ProtoMessage()

func (*PositionsRequest) Reset

func (m *PositionsRequest) Reset()

func (*PositionsRequest) Size

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

func (*PositionsRequest) String

func (m *PositionsRequest) String() string

func (*PositionsRequest) Unmarshal

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

func (*PositionsRequest) XXX_DiscardUnknown

func (m *PositionsRequest) XXX_DiscardUnknown()

func (*PositionsRequest) XXX_Marshal

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

func (*PositionsRequest) XXX_Merge

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

func (*PositionsRequest) XXX_Size

func (m *PositionsRequest) XXX_Size() int

func (*PositionsRequest) XXX_Unmarshal

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

type PositionsResponse

type PositionsResponse struct {
	Mtps       []*MtpAndPrice      `protobuf:"bytes,1,rep,name=mtps,proto3" json:"mtps,omitempty"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*PositionsResponse) Descriptor

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

func (*PositionsResponse) GetMtps

func (m *PositionsResponse) GetMtps() []*MtpAndPrice

func (*PositionsResponse) GetPagination

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

func (*PositionsResponse) Marshal

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

func (*PositionsResponse) MarshalTo

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

func (*PositionsResponse) MarshalToSizedBuffer

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

func (*PositionsResponse) ProtoMessage

func (*PositionsResponse) ProtoMessage()

func (*PositionsResponse) Reset

func (m *PositionsResponse) Reset()

func (*PositionsResponse) Size

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

func (*PositionsResponse) String

func (m *PositionsResponse) String() string

func (*PositionsResponse) Unmarshal

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

func (*PositionsResponse) XXX_DiscardUnknown

func (m *PositionsResponse) XXX_DiscardUnknown()

func (*PositionsResponse) XXX_Marshal

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

func (*PositionsResponse) XXX_Merge

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

func (*PositionsResponse) XXX_Size

func (m *PositionsResponse) XXX_Size() int

func (*PositionsResponse) XXX_Unmarshal

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

type QueryAllPoolRequest

type QueryAllPoolRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllPoolRequest) Descriptor

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

func (*QueryAllPoolRequest) GetPagination

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

func (*QueryAllPoolRequest) Marshal

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

func (*QueryAllPoolRequest) MarshalTo

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

func (*QueryAllPoolRequest) MarshalToSizedBuffer

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

func (*QueryAllPoolRequest) ProtoMessage

func (*QueryAllPoolRequest) ProtoMessage()

func (*QueryAllPoolRequest) Reset

func (m *QueryAllPoolRequest) Reset()

func (*QueryAllPoolRequest) Size

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

func (*QueryAllPoolRequest) String

func (m *QueryAllPoolRequest) String() string

func (*QueryAllPoolRequest) Unmarshal

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

func (*QueryAllPoolRequest) XXX_DiscardUnknown

func (m *QueryAllPoolRequest) XXX_DiscardUnknown()

func (*QueryAllPoolRequest) XXX_Marshal

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

func (*QueryAllPoolRequest) XXX_Merge

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

func (*QueryAllPoolRequest) XXX_Size

func (m *QueryAllPoolRequest) XXX_Size() int

func (*QueryAllPoolRequest) XXX_Unmarshal

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

type QueryAllPoolResponse

type QueryAllPoolResponse struct {
	Pool       []PoolResponse      `protobuf:"bytes,1,rep,name=pool,proto3" json:"pool"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QueryAllPoolResponse) Descriptor

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

func (*QueryAllPoolResponse) GetPagination

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

func (*QueryAllPoolResponse) GetPool

func (m *QueryAllPoolResponse) GetPool() []PoolResponse

func (*QueryAllPoolResponse) Marshal

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

func (*QueryAllPoolResponse) MarshalTo

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

func (*QueryAllPoolResponse) MarshalToSizedBuffer

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

func (*QueryAllPoolResponse) ProtoMessage

func (*QueryAllPoolResponse) ProtoMessage()

func (*QueryAllPoolResponse) Reset

func (m *QueryAllPoolResponse) Reset()

func (*QueryAllPoolResponse) Size

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

func (*QueryAllPoolResponse) String

func (m *QueryAllPoolResponse) String() string

func (*QueryAllPoolResponse) Unmarshal

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

func (*QueryAllPoolResponse) XXX_DiscardUnknown

func (m *QueryAllPoolResponse) XXX_DiscardUnknown()

func (*QueryAllPoolResponse) XXX_Marshal

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

func (*QueryAllPoolResponse) XXX_Merge

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

func (*QueryAllPoolResponse) XXX_Size

func (m *QueryAllPoolResponse) XXX_Size() int

func (*QueryAllPoolResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Parameters queries the parameters of the module.
	Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error)
	// Queries a list of positions.
	GetPositions(ctx context.Context, in *PositionsRequest, opts ...grpc.CallOption) (*PositionsResponse, error)
	// Queries a list of mtp positions by pool.
	GetPositionsByPool(ctx context.Context, in *PositionsByPoolRequest, opts ...grpc.CallOption) (*PositionsByPoolResponse, error)
	// Retuns the total number of open and lifetime mtps.
	GetStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	// Queries a list of mtp positions for a given address.
	GetPositionsForAddress(ctx context.Context, in *PositionsForAddressRequest, opts ...grpc.CallOption) (*PositionsForAddressResponse, error)
	// Queries a list of whitelisted addresses.
	GetWhitelist(ctx context.Context, in *WhitelistRequest, opts ...grpc.CallOption) (*WhitelistResponse, error)
	// Is an address whitelisted?
	IsWhitelisted(ctx context.Context, in *IsWhitelistedRequest, opts ...grpc.CallOption) (*IsWhitelistedResponse, error)
	// Queries a single pool given its index.
	Pool(ctx context.Context, in *QueryGetPoolRequest, opts ...grpc.CallOption) (*QueryGetPoolResponse, error)
	// Queries a list of all pools.
	Pools(ctx context.Context, in *QueryAllPoolRequest, opts ...grpc.CallOption) (*QueryAllPoolResponse, error)
	// Queries a single mtp position given its address and id.
	MTP(ctx context.Context, in *MTPRequest, opts ...grpc.CallOption) (*MTPResponse, error)
	// Queries an estimation of a new open position details.
	OpenEstimation(ctx context.Context, in *QueryOpenEstimationRequest, opts ...grpc.CallOption) (*QueryOpenEstimationResponse, error)
	// Queries a list of CloseEstimation items.
	CloseEstimation(ctx context.Context, in *QueryCloseEstimationRequest, opts ...grpc.CallOption) (*QueryCloseEstimationResponse, 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 QueryCloseEstimationRequest added in v0.47.0

type QueryCloseEstimationRequest struct {
	Address     string                `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	PositionId  uint64                `protobuf:"varint,2,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty"`
	CloseAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=close_amount,json=closeAmount,proto3,customtype=cosmossdk.io/math.Int" json:"close_amount"`
}

func (*QueryCloseEstimationRequest) Descriptor added in v0.47.0

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

func (*QueryCloseEstimationRequest) GetAddress added in v0.47.0

func (m *QueryCloseEstimationRequest) GetAddress() string

func (*QueryCloseEstimationRequest) GetPositionId added in v0.47.0

func (m *QueryCloseEstimationRequest) GetPositionId() uint64

func (*QueryCloseEstimationRequest) Marshal added in v0.47.0

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

func (*QueryCloseEstimationRequest) MarshalTo added in v0.47.0

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

func (*QueryCloseEstimationRequest) MarshalToSizedBuffer added in v0.47.0

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

func (*QueryCloseEstimationRequest) ProtoMessage added in v0.47.0

func (*QueryCloseEstimationRequest) ProtoMessage()

func (*QueryCloseEstimationRequest) Reset added in v0.47.0

func (m *QueryCloseEstimationRequest) Reset()

func (*QueryCloseEstimationRequest) Size added in v0.47.0

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

func (*QueryCloseEstimationRequest) String added in v0.47.0

func (m *QueryCloseEstimationRequest) String() string

func (*QueryCloseEstimationRequest) Unmarshal added in v0.47.0

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

func (*QueryCloseEstimationRequest) XXX_DiscardUnknown added in v0.47.0

func (m *QueryCloseEstimationRequest) XXX_DiscardUnknown()

func (*QueryCloseEstimationRequest) XXX_Marshal added in v0.47.0

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

func (*QueryCloseEstimationRequest) XXX_Merge added in v0.47.0

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

func (*QueryCloseEstimationRequest) XXX_Size added in v0.47.0

func (m *QueryCloseEstimationRequest) XXX_Size() int

func (*QueryCloseEstimationRequest) XXX_Unmarshal added in v0.47.0

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

type QueryCloseEstimationResponse added in v0.47.0

type QueryCloseEstimationResponse struct {
	Position                      Position                    `protobuf:"varint,1,opt,name=position,proto3,enum=elys.perpetual.Position" json:"position,omitempty"`
	PositionSize                  types.Coin                  `protobuf:"bytes,2,opt,name=position_size,json=positionSize,proto3" json:"position_size"`
	Liabilities                   types.Coin                  `protobuf:"bytes,3,opt,name=liabilities,proto3" json:"liabilities"`
	PriceImpact                   cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=price_impact,json=priceImpact,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price_impact"`
	LiquidationPrice              cosmossdk_io_math.LegacyDec `` /* 138-byte string literal not displayed */
	MaxCloseAmount                cosmossdk_io_math.Int       `` /* 128-byte string literal not displayed */
	BorrowInterestUnpaidLiability types.Coin                  `` /* 142-byte string literal not displayed */
	ReturningAmount               types.Coin                  `protobuf:"bytes,8,opt,name=returning_amount,json=returningAmount,proto3" json:"returning_amount"`
	PayingLiabilities             types.Coin                  `protobuf:"bytes,9,opt,name=paying_liabilities,json=payingLiabilities,proto3" json:"paying_liabilities"`
	ClosingPrice                  cosmossdk_io_math.LegacyDec `` /* 127-byte string literal not displayed */
	Custody                       types.Coin                  `protobuf:"bytes,11,opt,name=custody,proto3" json:"custody"`
	Collateral                    types.Coin                  `protobuf:"bytes,12,opt,name=collateral,proto3" json:"collateral"`
	WeightBreakingFee             cosmossdk_io_math.LegacyDec `` /* 144-byte string literal not displayed */
	Slippage                      cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=slippage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slippage"`
}

func (*QueryCloseEstimationResponse) Descriptor added in v0.47.0

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

func (*QueryCloseEstimationResponse) GetBorrowInterestUnpaidLiability added in v0.48.0

func (m *QueryCloseEstimationResponse) GetBorrowInterestUnpaidLiability() types.Coin

func (*QueryCloseEstimationResponse) GetCollateral added in v0.49.0

func (m *QueryCloseEstimationResponse) GetCollateral() types.Coin

func (*QueryCloseEstimationResponse) GetCustody added in v0.49.0

func (m *QueryCloseEstimationResponse) GetCustody() types.Coin

func (*QueryCloseEstimationResponse) GetLiabilities added in v0.47.0

func (m *QueryCloseEstimationResponse) GetLiabilities() types.Coin

func (*QueryCloseEstimationResponse) GetPayingLiabilities added in v0.48.0

func (m *QueryCloseEstimationResponse) GetPayingLiabilities() types.Coin

func (*QueryCloseEstimationResponse) GetPosition added in v0.47.0

func (m *QueryCloseEstimationResponse) GetPosition() Position

func (*QueryCloseEstimationResponse) GetPositionSize added in v0.47.0

func (m *QueryCloseEstimationResponse) GetPositionSize() types.Coin

func (*QueryCloseEstimationResponse) GetReturningAmount added in v0.48.0

func (m *QueryCloseEstimationResponse) GetReturningAmount() types.Coin

func (*QueryCloseEstimationResponse) Marshal added in v0.47.0

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

func (*QueryCloseEstimationResponse) MarshalTo added in v0.47.0

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

func (*QueryCloseEstimationResponse) MarshalToSizedBuffer added in v0.47.0

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

func (*QueryCloseEstimationResponse) ProtoMessage added in v0.47.0

func (*QueryCloseEstimationResponse) ProtoMessage()

func (*QueryCloseEstimationResponse) Reset added in v0.47.0

func (m *QueryCloseEstimationResponse) Reset()

func (*QueryCloseEstimationResponse) Size added in v0.47.0

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

func (*QueryCloseEstimationResponse) String added in v0.47.0

func (*QueryCloseEstimationResponse) Unmarshal added in v0.47.0

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

func (*QueryCloseEstimationResponse) XXX_DiscardUnknown added in v0.47.0

func (m *QueryCloseEstimationResponse) XXX_DiscardUnknown()

func (*QueryCloseEstimationResponse) XXX_Marshal added in v0.47.0

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

func (*QueryCloseEstimationResponse) XXX_Merge added in v0.47.0

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

func (*QueryCloseEstimationResponse) XXX_Size added in v0.47.0

func (m *QueryCloseEstimationResponse) XXX_Size() int

func (*QueryCloseEstimationResponse) XXX_Unmarshal added in v0.47.0

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

type QueryGetPoolRequest

type QueryGetPoolRequest struct {
	Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
}

func (*QueryGetPoolRequest) Descriptor

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

func (*QueryGetPoolRequest) GetIndex

func (m *QueryGetPoolRequest) GetIndex() uint64

func (*QueryGetPoolRequest) Marshal

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

func (*QueryGetPoolRequest) MarshalTo

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

func (*QueryGetPoolRequest) MarshalToSizedBuffer

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

func (*QueryGetPoolRequest) ProtoMessage

func (*QueryGetPoolRequest) ProtoMessage()

func (*QueryGetPoolRequest) Reset

func (m *QueryGetPoolRequest) Reset()

func (*QueryGetPoolRequest) Size

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

func (*QueryGetPoolRequest) String

func (m *QueryGetPoolRequest) String() string

func (*QueryGetPoolRequest) Unmarshal

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

func (*QueryGetPoolRequest) XXX_DiscardUnknown

func (m *QueryGetPoolRequest) XXX_DiscardUnknown()

func (*QueryGetPoolRequest) XXX_Marshal

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

func (*QueryGetPoolRequest) XXX_Merge

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

func (*QueryGetPoolRequest) XXX_Size

func (m *QueryGetPoolRequest) XXX_Size() int

func (*QueryGetPoolRequest) XXX_Unmarshal

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

type QueryGetPoolResponse

type QueryGetPoolResponse struct {
	Pool PoolResponse `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool"`
}

func (*QueryGetPoolResponse) Descriptor

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

func (*QueryGetPoolResponse) GetPool

func (m *QueryGetPoolResponse) GetPool() PoolResponse

func (*QueryGetPoolResponse) Marshal

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

func (*QueryGetPoolResponse) MarshalTo

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

func (*QueryGetPoolResponse) MarshalToSizedBuffer

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

func (*QueryGetPoolResponse) ProtoMessage

func (*QueryGetPoolResponse) ProtoMessage()

func (*QueryGetPoolResponse) Reset

func (m *QueryGetPoolResponse) Reset()

func (*QueryGetPoolResponse) Size

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

func (*QueryGetPoolResponse) String

func (m *QueryGetPoolResponse) String() string

func (*QueryGetPoolResponse) Unmarshal

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

func (*QueryGetPoolResponse) XXX_DiscardUnknown

func (m *QueryGetPoolResponse) XXX_DiscardUnknown()

func (*QueryGetPoolResponse) XXX_Marshal

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

func (*QueryGetPoolResponse) XXX_Merge

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

func (*QueryGetPoolResponse) XXX_Size

func (m *QueryGetPoolResponse) XXX_Size() int

func (*QueryGetPoolResponse) XXX_Unmarshal

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

type QueryOpenEstimationRequest

type QueryOpenEstimationRequest struct {
	Position        Position                    `protobuf:"varint,1,opt,name=position,proto3,enum=elys.perpetual.Position" json:"position,omitempty"`
	Leverage        cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=leverage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"leverage"`
	TradingAsset    string                      `protobuf:"bytes,3,opt,name=trading_asset,json=tradingAsset,proto3" json:"trading_asset,omitempty"`
	Collateral      types.Coin                  `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral"`
	Address         string                      `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
	TakeProfitPrice cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */
	PoolId          uint64                      `protobuf:"varint,7,opt,name=poolId,proto3" json:"poolId,omitempty"`
	LimitPrice      cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=limit_price,json=limitPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_price"`
}

func (*QueryOpenEstimationRequest) Descriptor

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

func (*QueryOpenEstimationRequest) GetAddress added in v0.51.0

func (m *QueryOpenEstimationRequest) GetAddress() string

func (*QueryOpenEstimationRequest) GetCollateral

func (m *QueryOpenEstimationRequest) GetCollateral() types.Coin

func (*QueryOpenEstimationRequest) GetPoolId added in v0.48.0

func (m *QueryOpenEstimationRequest) GetPoolId() uint64

func (*QueryOpenEstimationRequest) GetPosition

func (m *QueryOpenEstimationRequest) GetPosition() Position

func (*QueryOpenEstimationRequest) GetTradingAsset

func (m *QueryOpenEstimationRequest) GetTradingAsset() string

func (*QueryOpenEstimationRequest) Marshal

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

func (*QueryOpenEstimationRequest) MarshalTo

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

func (*QueryOpenEstimationRequest) MarshalToSizedBuffer

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

func (*QueryOpenEstimationRequest) ProtoMessage

func (*QueryOpenEstimationRequest) ProtoMessage()

func (*QueryOpenEstimationRequest) Reset

func (m *QueryOpenEstimationRequest) Reset()

func (*QueryOpenEstimationRequest) Size

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

func (*QueryOpenEstimationRequest) String

func (m *QueryOpenEstimationRequest) String() string

func (*QueryOpenEstimationRequest) Unmarshal

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

func (*QueryOpenEstimationRequest) XXX_DiscardUnknown

func (m *QueryOpenEstimationRequest) XXX_DiscardUnknown()

func (*QueryOpenEstimationRequest) XXX_Marshal

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

func (*QueryOpenEstimationRequest) XXX_Merge

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

func (*QueryOpenEstimationRequest) XXX_Size

func (m *QueryOpenEstimationRequest) XXX_Size() int

func (*QueryOpenEstimationRequest) XXX_Unmarshal

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

type QueryOpenEstimationResponse

type QueryOpenEstimationResponse struct {
	Position           Position                    `protobuf:"varint,1,opt,name=position,proto3,enum=elys.perpetual.Position" json:"position,omitempty"`
	EffectiveLeverage  cosmossdk_io_math.LegacyDec `` /* 141-byte string literal not displayed */
	TradingAsset       string                      `protobuf:"bytes,3,opt,name=trading_asset,json=tradingAsset,proto3" json:"trading_asset,omitempty"`
	Collateral         types.Coin                  `protobuf:"bytes,4,opt,name=collateral,proto3" json:"collateral"`
	HourlyInterestRate cosmossdk_io_math.LegacyDec `` /* 146-byte string literal not displayed */
	PositionSize       types.Coin                  `protobuf:"bytes,6,opt,name=position_size,json=positionSize,proto3" json:"position_size"`
	OpenPrice          cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=open_price,json=openPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"open_price"`
	TakeProfitPrice    cosmossdk_io_math.LegacyDec `` /* 137-byte string literal not displayed */
	LiquidationPrice   cosmossdk_io_math.LegacyDec `` /* 138-byte string literal not displayed */
	EstimatedPnl       types.Coin                  `protobuf:"bytes,10,opt,name=estimated_pnl,json=estimatedPnl,proto3" json:"estimated_pnl"`
	AvailableLiquidity types.Coin                  `protobuf:"bytes,11,opt,name=available_liquidity,json=availableLiquidity,proto3" json:"available_liquidity"`
	Slippage           cosmossdk_io_math.LegacyDec `protobuf:"bytes,12,opt,name=slippage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"slippage"`
	BorrowInterestRate cosmossdk_io_math.LegacyDec `` /* 147-byte string literal not displayed */
	FundingRate        cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=funding_rate,json=fundingRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"funding_rate"`
	PriceImpact        cosmossdk_io_math.LegacyDec `protobuf:"bytes,15,opt,name=price_impact,json=priceImpact,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"price_impact"`
	Custody            types.Coin                  `protobuf:"bytes,16,opt,name=custody,proto3" json:"custody"`
	Liabilities        types.Coin                  `protobuf:"bytes,17,opt,name=liabilities,proto3" json:"liabilities"`
	LimitPrice         cosmossdk_io_math.LegacyDec `protobuf:"bytes,18,opt,name=limit_price,json=limitPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"limit_price"`
	WeightBreakingFee  cosmossdk_io_math.LegacyDec `` /* 144-byte string literal not displayed */
}

func (*QueryOpenEstimationResponse) Descriptor

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

func (*QueryOpenEstimationResponse) GetAvailableLiquidity

func (m *QueryOpenEstimationResponse) GetAvailableLiquidity() types.Coin

func (*QueryOpenEstimationResponse) GetCollateral

func (m *QueryOpenEstimationResponse) GetCollateral() types.Coin

func (*QueryOpenEstimationResponse) GetCustody added in v0.49.0

func (m *QueryOpenEstimationResponse) GetCustody() types.Coin

func (*QueryOpenEstimationResponse) GetEstimatedPnl added in v0.48.0

func (m *QueryOpenEstimationResponse) GetEstimatedPnl() types.Coin

func (*QueryOpenEstimationResponse) GetLiabilities added in v0.49.0

func (m *QueryOpenEstimationResponse) GetLiabilities() types.Coin

func (*QueryOpenEstimationResponse) GetPosition

func (m *QueryOpenEstimationResponse) GetPosition() Position

func (*QueryOpenEstimationResponse) GetPositionSize

func (m *QueryOpenEstimationResponse) GetPositionSize() types.Coin

func (*QueryOpenEstimationResponse) GetTradingAsset

func (m *QueryOpenEstimationResponse) GetTradingAsset() string

func (*QueryOpenEstimationResponse) Marshal

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

func (*QueryOpenEstimationResponse) MarshalTo

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

func (*QueryOpenEstimationResponse) MarshalToSizedBuffer

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

func (*QueryOpenEstimationResponse) ProtoMessage

func (*QueryOpenEstimationResponse) ProtoMessage()

func (*QueryOpenEstimationResponse) Reset

func (m *QueryOpenEstimationResponse) Reset()

func (*QueryOpenEstimationResponse) Size

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

func (*QueryOpenEstimationResponse) String

func (m *QueryOpenEstimationResponse) String() string

func (*QueryOpenEstimationResponse) Unmarshal

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

func (*QueryOpenEstimationResponse) XXX_DiscardUnknown

func (m *QueryOpenEstimationResponse) XXX_DiscardUnknown()

func (*QueryOpenEstimationResponse) XXX_Marshal

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

func (*QueryOpenEstimationResponse) XXX_Merge

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

func (*QueryOpenEstimationResponse) XXX_Size

func (m *QueryOpenEstimationResponse) XXX_Size() int

func (*QueryOpenEstimationResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Parameters queries the parameters of the module.
	Params(context.Context, *ParamsRequest) (*ParamsResponse, error)
	// Queries a list of positions.
	GetPositions(context.Context, *PositionsRequest) (*PositionsResponse, error)
	// Queries a list of mtp positions by pool.
	GetPositionsByPool(context.Context, *PositionsByPoolRequest) (*PositionsByPoolResponse, error)
	// Retuns the total number of open and lifetime mtps.
	GetStatus(context.Context, *StatusRequest) (*StatusResponse, error)
	// Queries a list of mtp positions for a given address.
	GetPositionsForAddress(context.Context, *PositionsForAddressRequest) (*PositionsForAddressResponse, error)
	// Queries a list of whitelisted addresses.
	GetWhitelist(context.Context, *WhitelistRequest) (*WhitelistResponse, error)
	// Is an address whitelisted?
	IsWhitelisted(context.Context, *IsWhitelistedRequest) (*IsWhitelistedResponse, error)
	// Queries a single pool given its index.
	Pool(context.Context, *QueryGetPoolRequest) (*QueryGetPoolResponse, error)
	// Queries a list of all pools.
	Pools(context.Context, *QueryAllPoolRequest) (*QueryAllPoolResponse, error)
	// Queries a single mtp position given its address and id.
	MTP(context.Context, *MTPRequest) (*MTPResponse, error)
	// Queries an estimation of a new open position details.
	OpenEstimation(context.Context, *QueryOpenEstimationRequest) (*QueryOpenEstimationResponse, error)
	// Queries a list of CloseEstimation items.
	CloseEstimation(context.Context, *QueryCloseEstimationRequest) (*QueryCloseEstimationResponse, error)
}

QueryServer is the server API for Query service.

type StatusRequest

type StatusRequest struct {
}

func (*StatusRequest) Descriptor

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

func (*StatusRequest) Marshal

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

func (*StatusRequest) MarshalTo

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

func (*StatusRequest) MarshalToSizedBuffer

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

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) Reset

func (m *StatusRequest) Reset()

func (*StatusRequest) Size

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

func (*StatusRequest) String

func (m *StatusRequest) String() string

func (*StatusRequest) Unmarshal

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

func (*StatusRequest) XXX_DiscardUnknown

func (m *StatusRequest) XXX_DiscardUnknown()

func (*StatusRequest) XXX_Marshal

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

func (*StatusRequest) XXX_Merge

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

func (*StatusRequest) XXX_Size

func (m *StatusRequest) XXX_Size() int

func (*StatusRequest) XXX_Unmarshal

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

type StatusResponse

type StatusResponse struct {
	OpenMtpCount     uint64 `protobuf:"varint,1,opt,name=open_mtp_count,json=openMtpCount,proto3" json:"open_mtp_count,omitempty"`
	LifetimeMtpCount uint64 `protobuf:"varint,2,opt,name=lifetime_mtp_count,json=lifetimeMtpCount,proto3" json:"lifetime_mtp_count,omitempty"`
}

func (*StatusResponse) Descriptor

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

func (*StatusResponse) GetLifetimeMtpCount

func (m *StatusResponse) GetLifetimeMtpCount() uint64

func (*StatusResponse) GetOpenMtpCount

func (m *StatusResponse) GetOpenMtpCount() uint64

func (*StatusResponse) Marshal

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

func (*StatusResponse) MarshalTo

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

func (*StatusResponse) MarshalToSizedBuffer

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

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) Reset

func (m *StatusResponse) Reset()

func (*StatusResponse) Size

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

func (*StatusResponse) String

func (m *StatusResponse) String() string

func (*StatusResponse) Unmarshal

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

func (*StatusResponse) XXX_DiscardUnknown

func (m *StatusResponse) XXX_DiscardUnknown()

func (*StatusResponse) XXX_Marshal

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

func (*StatusResponse) XXX_Merge

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

func (*StatusResponse) XXX_Size

func (m *StatusResponse) XXX_Size() int

func (*StatusResponse) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Close

func (*UnimplementedMsgServer) ClosePositions added in v0.45.0

func (*UnimplementedMsgServer) Dewhitelist

func (*UnimplementedMsgServer) Open

func (*UnimplementedMsgServer) UpdateParams

func (*UnimplementedMsgServer) UpdateStopLoss added in v0.45.0

func (*UnimplementedMsgServer) UpdateTakeProfitPrice added in v0.46.0

func (*UnimplementedMsgServer) Whitelist

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) CloseEstimation added in v0.47.0

func (*UnimplementedQueryServer) GetPositions

func (*UnimplementedQueryServer) GetPositionsByPool

func (*UnimplementedQueryServer) GetPositionsForAddress

func (*UnimplementedQueryServer) GetStatus

func (*UnimplementedQueryServer) GetWhitelist

func (*UnimplementedQueryServer) IsWhitelisted

func (*UnimplementedQueryServer) MTP

func (*UnimplementedQueryServer) OpenEstimation

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Pool

func (*UnimplementedQueryServer) Pools

type WhiteList

type WhiteList struct {
	ValidatorList []string `protobuf:"bytes,1,rep,name=validator_list,json=validatorList,proto3" json:"validator_list,omitempty"`
}

func (*WhiteList) Descriptor

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

func (*WhiteList) GetValidatorList

func (m *WhiteList) GetValidatorList() []string

func (*WhiteList) Marshal

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

func (*WhiteList) MarshalTo

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

func (*WhiteList) MarshalToSizedBuffer

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

func (*WhiteList) ProtoMessage

func (*WhiteList) ProtoMessage()

func (*WhiteList) Reset

func (m *WhiteList) Reset()

func (*WhiteList) Size

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

func (*WhiteList) String

func (m *WhiteList) String() string

func (*WhiteList) Unmarshal

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

func (*WhiteList) XXX_DiscardUnknown

func (m *WhiteList) XXX_DiscardUnknown()

func (*WhiteList) XXX_Marshal

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

func (*WhiteList) XXX_Merge

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

func (*WhiteList) XXX_Size

func (m *WhiteList) XXX_Size() int

func (*WhiteList) XXX_Unmarshal

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

type WhitelistRequest

type WhitelistRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*WhitelistRequest) Descriptor

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

func (*WhitelistRequest) GetPagination

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

func (*WhitelistRequest) Marshal

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

func (*WhitelistRequest) MarshalTo

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

func (*WhitelistRequest) MarshalToSizedBuffer

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

func (*WhitelistRequest) ProtoMessage

func (*WhitelistRequest) ProtoMessage()

func (*WhitelistRequest) Reset

func (m *WhitelistRequest) Reset()

func (*WhitelistRequest) Size

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

func (*WhitelistRequest) String

func (m *WhitelistRequest) String() string

func (*WhitelistRequest) Unmarshal

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

func (*WhitelistRequest) XXX_DiscardUnknown

func (m *WhitelistRequest) XXX_DiscardUnknown()

func (*WhitelistRequest) XXX_Marshal

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

func (*WhitelistRequest) XXX_Merge

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

func (*WhitelistRequest) XXX_Size

func (m *WhitelistRequest) XXX_Size() int

func (*WhitelistRequest) XXX_Unmarshal

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

type WhitelistResponse

type WhitelistResponse struct {
	Whitelist  []string            `protobuf:"bytes,1,rep,name=whitelist,proto3" json:"whitelist,omitempty"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*WhitelistResponse) Descriptor

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

func (*WhitelistResponse) GetPagination

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

func (*WhitelistResponse) GetWhitelist

func (m *WhitelistResponse) GetWhitelist() []string

func (*WhitelistResponse) Marshal

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

func (*WhitelistResponse) MarshalTo

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

func (*WhitelistResponse) MarshalToSizedBuffer

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

func (*WhitelistResponse) ProtoMessage

func (*WhitelistResponse) ProtoMessage()

func (*WhitelistResponse) Reset

func (m *WhitelistResponse) Reset()

func (*WhitelistResponse) Size

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

func (*WhitelistResponse) String

func (m *WhitelistResponse) String() string

func (*WhitelistResponse) Unmarshal

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

func (*WhitelistResponse) XXX_DiscardUnknown

func (m *WhitelistResponse) XXX_DiscardUnknown()

func (*WhitelistResponse) XXX_Marshal

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

func (*WhitelistResponse) XXX_Merge

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

func (*WhitelistResponse) XXX_Size

func (m *WhitelistResponse) XXX_Size() int

func (*WhitelistResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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