model

package
v15.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TypeMsgCreateConcentratedPool = "create_concentrated_pool"
)

constants.

Variables

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 (
	ErrInvalidLengthPosition        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPosition          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPosition = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTickInfo        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTickInfo          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTickInfo = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgCreatorServer

func RegisterMsgCreatorServer(s grpc1.Server, srv MsgCreatorServer)

Types

type FullPositionBreakdown added in v15.8.0

type FullPositionBreakdown struct {
	Position            Position      `protobuf:"bytes,1,opt,name=position,proto3" json:"position"`
	Asset0              types1.Coin   `protobuf:"bytes,2,opt,name=asset0,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"asset0"`
	Asset1              types1.Coin   `protobuf:"bytes,3,opt,name=asset1,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coin" json:"asset1"`
	ClaimableFees       []types1.Coin `protobuf:"bytes,4,rep,name=claimable_fees,json=claimableFees,proto3" json:"claimable_fees" yaml:"claimable_fees"`
	ClaimableIncentives []types1.Coin `` /* 136-byte string literal not displayed */
	ForfeitedIncentives []types1.Coin `` /* 136-byte string literal not displayed */
}

FullPositionBreakdown returns: - the position itself - the amount the position translates in terms of asset0 and asset1 - the amount of claimable fees - the amount of claimable incentives - the amount of incentives that would be forfeited if the position was closed now

func (*FullPositionBreakdown) Descriptor added in v15.8.0

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

func (*FullPositionBreakdown) GetAsset0 added in v15.8.0

func (m *FullPositionBreakdown) GetAsset0() types1.Coin

func (*FullPositionBreakdown) GetAsset1 added in v15.8.0

func (m *FullPositionBreakdown) GetAsset1() types1.Coin

func (*FullPositionBreakdown) GetClaimableFees added in v15.8.0

func (m *FullPositionBreakdown) GetClaimableFees() []types1.Coin

func (*FullPositionBreakdown) GetClaimableIncentives added in v15.8.0

func (m *FullPositionBreakdown) GetClaimableIncentives() []types1.Coin

func (*FullPositionBreakdown) GetForfeitedIncentives added in v15.8.0

func (m *FullPositionBreakdown) GetForfeitedIncentives() []types1.Coin

func (*FullPositionBreakdown) GetPosition added in v15.8.0

func (m *FullPositionBreakdown) GetPosition() Position

func (*FullPositionBreakdown) Marshal added in v15.8.0

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

func (*FullPositionBreakdown) MarshalTo added in v15.8.0

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

func (*FullPositionBreakdown) MarshalToSizedBuffer added in v15.8.0

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

func (*FullPositionBreakdown) ProtoMessage added in v15.8.0

func (*FullPositionBreakdown) ProtoMessage()

func (*FullPositionBreakdown) Reset added in v15.8.0

func (m *FullPositionBreakdown) Reset()

func (*FullPositionBreakdown) Size added in v15.8.0

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

func (*FullPositionBreakdown) String added in v15.8.0

func (m *FullPositionBreakdown) String() string

func (*FullPositionBreakdown) Unmarshal added in v15.8.0

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

func (*FullPositionBreakdown) XXX_DiscardUnknown added in v15.8.0

func (m *FullPositionBreakdown) XXX_DiscardUnknown()

func (*FullPositionBreakdown) XXX_Marshal added in v15.8.0

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

func (*FullPositionBreakdown) XXX_Merge added in v15.8.0

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

func (*FullPositionBreakdown) XXX_Size added in v15.8.0

func (m *FullPositionBreakdown) XXX_Size() int

func (*FullPositionBreakdown) XXX_Unmarshal added in v15.8.0

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

type MsgCreateConcentratedPool

type MsgCreateConcentratedPool struct {
	Sender       string                                 `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"`
	Denom0       string                                 `protobuf:"bytes,2,opt,name=denom0,proto3" json:"denom0,omitempty" yaml:"denom0"`
	Denom1       string                                 `protobuf:"bytes,3,opt,name=denom1,proto3" json:"denom1,omitempty" yaml:"denom1"`
	TickSpacing  uint64                                 `protobuf:"varint,4,opt,name=tick_spacing,json=tickSpacing,proto3" json:"tick_spacing,omitempty" yaml:"tick_spacing"`
	SpreadFactor github_com_cosmos_cosmos_sdk_types.Dec `` /* 158-byte string literal not displayed */
}

===================== MsgCreateConcentratedPool

func NewMsgCreateConcentratedPool

func NewMsgCreateConcentratedPool(
	sender sdk.AccAddress,
	denom0 string,
	denom1 string,
	tickSpacing uint64,
	spreadFactor sdk.Dec,
) MsgCreateConcentratedPool

func (MsgCreateConcentratedPool) CreatePool

func (msg MsgCreateConcentratedPool) CreatePool(ctx sdk.Context, poolID uint64) (poolmanagertypes.PoolI, error)

func (*MsgCreateConcentratedPool) Descriptor

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

func (*MsgCreateConcentratedPool) GetDenom0

func (m *MsgCreateConcentratedPool) GetDenom0() string

func (*MsgCreateConcentratedPool) GetDenom1

func (m *MsgCreateConcentratedPool) GetDenom1() string

func (MsgCreateConcentratedPool) GetPoolType

func (*MsgCreateConcentratedPool) GetSender

func (m *MsgCreateConcentratedPool) GetSender() string

func (MsgCreateConcentratedPool) GetSignBytes

func (msg MsgCreateConcentratedPool) GetSignBytes() []byte

func (MsgCreateConcentratedPool) GetSigners

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

func (*MsgCreateConcentratedPool) GetTickSpacing

func (m *MsgCreateConcentratedPool) GetTickSpacing() uint64

func (MsgCreateConcentratedPool) InitialLiquidity

func (msg MsgCreateConcentratedPool) InitialLiquidity() sdk.Coins

func (*MsgCreateConcentratedPool) Marshal

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

func (*MsgCreateConcentratedPool) MarshalTo

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

func (*MsgCreateConcentratedPool) MarshalToSizedBuffer

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

func (MsgCreateConcentratedPool) PoolCreator

func (msg MsgCreateConcentratedPool) PoolCreator() sdk.AccAddress

func (*MsgCreateConcentratedPool) ProtoMessage

func (*MsgCreateConcentratedPool) ProtoMessage()

func (*MsgCreateConcentratedPool) Reset

func (m *MsgCreateConcentratedPool) Reset()

func (MsgCreateConcentratedPool) Route

func (msg MsgCreateConcentratedPool) Route() string

func (*MsgCreateConcentratedPool) Size

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

func (*MsgCreateConcentratedPool) String

func (m *MsgCreateConcentratedPool) String() string

func (MsgCreateConcentratedPool) Type

func (msg MsgCreateConcentratedPool) Type() string

func (*MsgCreateConcentratedPool) Unmarshal

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

func (MsgCreateConcentratedPool) Validate

func (msg MsgCreateConcentratedPool) Validate(ctx sdk.Context) error

func (MsgCreateConcentratedPool) ValidateBasic

func (msg MsgCreateConcentratedPool) ValidateBasic() error

func (*MsgCreateConcentratedPool) XXX_DiscardUnknown

func (m *MsgCreateConcentratedPool) XXX_DiscardUnknown()

func (*MsgCreateConcentratedPool) XXX_Marshal

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

func (*MsgCreateConcentratedPool) XXX_Merge

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

func (*MsgCreateConcentratedPool) XXX_Size

func (m *MsgCreateConcentratedPool) XXX_Size() int

func (*MsgCreateConcentratedPool) XXX_Unmarshal

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

type MsgCreateConcentratedPoolResponse

type MsgCreateConcentratedPoolResponse struct {
	PoolID uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
}

Returns a unique poolID to identify the pool with.

func (*MsgCreateConcentratedPoolResponse) Descriptor

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

func (*MsgCreateConcentratedPoolResponse) GetPoolID

func (*MsgCreateConcentratedPoolResponse) Marshal

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

func (*MsgCreateConcentratedPoolResponse) MarshalTo

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

func (*MsgCreateConcentratedPoolResponse) MarshalToSizedBuffer

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

func (*MsgCreateConcentratedPoolResponse) ProtoMessage

func (*MsgCreateConcentratedPoolResponse) ProtoMessage()

func (*MsgCreateConcentratedPoolResponse) Reset

func (*MsgCreateConcentratedPoolResponse) Size

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

func (*MsgCreateConcentratedPoolResponse) String

func (*MsgCreateConcentratedPoolResponse) Unmarshal

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

func (*MsgCreateConcentratedPoolResponse) XXX_DiscardUnknown

func (m *MsgCreateConcentratedPoolResponse) XXX_DiscardUnknown()

func (*MsgCreateConcentratedPoolResponse) XXX_Marshal

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

func (*MsgCreateConcentratedPoolResponse) XXX_Merge

func (*MsgCreateConcentratedPoolResponse) XXX_Size

func (m *MsgCreateConcentratedPoolResponse) XXX_Size() int

func (*MsgCreateConcentratedPoolResponse) XXX_Unmarshal

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

type MsgCreatorClient

type MsgCreatorClient interface {
	CreateConcentratedPool(ctx context.Context, in *MsgCreateConcentratedPool, opts ...grpc.CallOption) (*MsgCreateConcentratedPoolResponse, error)
}

MsgCreatorClient is the client API for MsgCreator service.

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

func NewMsgCreatorClient

func NewMsgCreatorClient(cc grpc1.ClientConn) MsgCreatorClient

type MsgCreatorServer

type MsgCreatorServer interface {
	CreateConcentratedPool(context.Context, *MsgCreateConcentratedPool) (*MsgCreateConcentratedPoolResponse, error)
}

MsgCreatorServer is the server API for MsgCreator service.

type Pool

type Pool struct {
	// pool's address holding all liquidity tokens.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	// address holding the incentives liquidity.
	IncentivesAddress string `` /* 138-byte string literal not displayed */
	// address holding spread rewards from swaps.
	SpreadRewardsAddress string `` /* 153-byte string literal not displayed */
	Id                   uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
	// Amount of total liquidity
	CurrentTickLiquidity github_com_cosmos_cosmos_sdk_types.Dec `` /* 193-byte string literal not displayed */
	Token0               string                                 `protobuf:"bytes,6,opt,name=token0,proto3" json:"token0,omitempty"`
	Token1               string                                 `protobuf:"bytes,7,opt,name=token1,proto3" json:"token1,omitempty"`
	CurrentSqrtPrice     github_com_cosmos_cosmos_sdk_types.Dec `` /* 169-byte string literal not displayed */
	CurrentTick          int64                                  `protobuf:"varint,9,opt,name=current_tick,json=currentTick,proto3" json:"current_tick,omitempty" yaml:"current_tick"`
	// tick_spacing must be one of the authorized_tick_spacing values set in the
	// concentrated-liquidity parameters
	TickSpacing        uint64 `protobuf:"varint,10,opt,name=tick_spacing,json=tickSpacing,proto3" json:"tick_spacing,omitempty" yaml:"tick_spacing"`
	ExponentAtPriceOne int64  `` /* 150-byte string literal not displayed */
	// spread_factor is the ratio that is charged on the amount of token in.
	SpreadFactor github_com_cosmos_cosmos_sdk_types.Dec `` /* 159-byte string literal not displayed */
	// last_liquidity_update is the last time either the pool liquidity or the
	// active tick changed
	LastLiquidityUpdate time.Time `` /* 148-byte string literal not displayed */
}

func NewConcentratedLiquidityPool

func NewConcentratedLiquidityPool(poolId uint64, denom0, denom1 string, tickSpacing uint64, spreadFactor sdk.Dec) (Pool, error)

NewConcentratedLiquidityPool creates a new ConcentratedLiquidity pool with the specified parameters. The two provided denoms are ordered so that denom0 is lexicographically smaller than denom1.

func (*Pool) ApplySwap

func (p *Pool) ApplySwap(newLiquidity sdk.Dec, newCurrentTick int64, newCurrentSqrtPrice sdk.Dec) error

ApplySwap state of pool after swap. It specifically overwrites the pool's liquidity, curr tick and the curr sqrt price. Note that this method is mutative.

func (Pool) CalcActualAmounts

func (p Pool) CalcActualAmounts(ctx sdk.Context, lowerTick, upperTick int64, liquidityDelta sdk.Dec) (actualAmountDenom0 sdk.Dec, actualAmountDenom1 sdk.Dec, err error)

calcActualAmounts calculates and returns actual amounts based on where the current tick is located relative to position's lower and upper ticks. There are 3 possible cases: -The position is active ( lowerTick <= p.CurrentTick < upperTick).

  • The provided liquidity is distributed in both tokens.
  • Actual amounts might differ from desired because we recalculate them from liquidity delta and sqrt price.

- Current tick is below the position ( p.CurrentTick < lowerTick).

  • The provided liquidity is distributed in token0 only.

- Current tick is above the position ( p.CurrentTick >= p.upperTick ).

  • The provided liquidity is distributed in token1 only.

Note, that liquidityDelta can be positive or negative but cannot be zero. If zero, an error is returned. If positive, we assume, liquidity being added. As a result, we round up so that we request a user to add more liquidity in favor of the pool. If negative, we assume, liquidity being removed. As a result, we round down so that we request a user to remove less liquidity in favor of the pool.

func (*Pool) Descriptor

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

func (Pool) GetAddress

func (p Pool) GetAddress() sdk.AccAddress

GetAddress returns the address of the concentrated liquidity pool

func (Pool) GetCurrentSqrtPrice

func (p Pool) GetCurrentSqrtPrice() sdk.Dec

GetCurrentSqrtPrice returns the current sqrt price of the pool

func (Pool) GetCurrentTick

func (p Pool) GetCurrentTick() int64

GetCurrentTick returns the current tick of the pool

func (Pool) GetExponentAtPriceOne

func (p Pool) GetExponentAtPriceOne() int64

GetExponentAtPriceOne returns the precision factor at price one of the pool

func (Pool) GetId

func (p Pool) GetId() uint64

GetId returns the id of the concentrated liquidity pool

func (Pool) GetIncentivesAddress

func (p Pool) GetIncentivesAddress() sdk.AccAddress

GetIncentivesAddress returns the address storing incentives of the concentrated liquidity pool.

func (Pool) GetLastLiquidityUpdate

func (p Pool) GetLastLiquidityUpdate() time.Time

GetLastLiquidityUpdate returns the last time there was a change in pool liquidity or active tick.

func (Pool) GetLiquidity

func (p Pool) GetLiquidity() sdk.Dec

GetLiquidity returns the liquidity of the pool

func (Pool) GetSpreadFactor added in v15.8.0

func (p Pool) GetSpreadFactor(ctx sdk.Context) sdk.Dec

GetSpreadFactor returns the spread factor of the pool

func (Pool) GetSpreadRewardsAddress added in v15.8.0

func (p Pool) GetSpreadRewardsAddress() sdk.AccAddress

func (Pool) GetTickSpacing

func (p Pool) GetTickSpacing() uint64

GetTickSpacing returns the current tick spacing parameter of the pool

func (Pool) GetToken0

func (p Pool) GetToken0() string

GetToken0 returns the token0 of the pool

func (Pool) GetToken1

func (p Pool) GetToken1() string

GetToken1 returns the token1 of the pool

func (Pool) GetType

func (p Pool) GetType() poolmanagertypes.PoolType

func (Pool) IsActive

func (p Pool) IsActive(ctx sdk.Context) bool

IsActive returns true if the pool is active

func (Pool) IsCurrentTickInRange added in v15.5.0

func (p Pool) IsCurrentTickInRange(lowerTick, upperTick int64) bool

isCurrentTickInRange returns true if pool's current tick is within the range [lowerTick, upperTick). False otherwise.

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

func (p *Pool) SetCurrentSqrtPrice(newSqrtPrice sdk.Dec)

SetCurrentSqrtPrice updates the current sqrt price of the pool when the first position is created.

func (*Pool) SetCurrentTick

func (p *Pool) SetCurrentTick(newTick int64)

SetCurrentTick updates the current tick of the pool when the first position is created.

func (*Pool) SetLastLiquidityUpdate

func (p *Pool) SetLastLiquidityUpdate(newTime time.Time)

SetLastLiquidityUpdate updates the pool's LastLiquidityUpdate to newTime.

func (*Pool) SetTickSpacing added in v15.5.0

func (p *Pool) SetTickSpacing(tickSpacing uint64)

SetTickSpacing updates the tick spacing parameter of the pool.

func (*Pool) Size

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

func (Pool) SpotPrice

func (p Pool) SpotPrice(ctx sdk.Context, baseAssetDenom string, quoteAssetDenom string) (sdk.Dec, error)

SpotPrice returns the spot price of the pool. If base asset is the Token0 of the pool, we use the current sqrt price of the pool. If not, we calculate the inverse of the current sqrt price of the pool.

func (Pool) String

func (p Pool) String() string

String returns the json marshalled string of the pool

func (*Pool) Unmarshal

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

func (*Pool) UpdateLiquidity

func (p *Pool) UpdateLiquidity(newLiquidity sdk.Dec)

UpdateLiquidity updates the liquidity of the pool. Note that this method is mutative.

func (*Pool) UpdateLiquidityIfActivePosition

func (p *Pool) UpdateLiquidityIfActivePosition(ctx sdk.Context, lowerTick, upperTick int64, liquidityDelta sdk.Dec) bool

updateLiquidityIfActivePosition updates the pool's liquidity if the position is active. Returns true if updated, false otherwise.

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 Position

type Position struct {
	PositionId uint64                                 `protobuf:"varint,1,opt,name=position_id,json=positionId,proto3" json:"position_id,omitempty" yaml:"position_id"`
	Address    string                                 `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	PoolId     uint64                                 `protobuf:"varint,3,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"`
	LowerTick  int64                                  `protobuf:"varint,4,opt,name=lower_tick,json=lowerTick,proto3" json:"lower_tick,omitempty"`
	UpperTick  int64                                  `protobuf:"varint,5,opt,name=upper_tick,json=upperTick,proto3" json:"upper_tick,omitempty"`
	JoinTime   time.Time                              `protobuf:"bytes,6,opt,name=join_time,json=joinTime,proto3,stdtime" json:"join_time" yaml:"join_time"`
	Liquidity  github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */
}

Position contains position's id, address, pool id, lower tick, upper tick join time, and liquidity.

func (*Position) Descriptor

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

func (*Position) GetAddress

func (m *Position) GetAddress() string

func (*Position) GetJoinTime

func (m *Position) GetJoinTime() time.Time

func (*Position) GetLowerTick

func (m *Position) GetLowerTick() int64

func (*Position) GetPoolId

func (m *Position) GetPoolId() uint64

func (*Position) GetPositionId

func (m *Position) GetPositionId() uint64

func (*Position) GetUpperTick

func (m *Position) GetUpperTick() int64

func (*Position) Marshal

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

func (*Position) MarshalTo

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

func (*Position) MarshalToSizedBuffer

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

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) Reset

func (m *Position) Reset()

func (*Position) Size

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

func (*Position) String

func (m *Position) String() string

func (*Position) Unmarshal

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

func (*Position) XXX_DiscardUnknown

func (m *Position) XXX_DiscardUnknown()

func (*Position) XXX_Marshal

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

func (*Position) XXX_Merge

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

func (*Position) XXX_Size

func (m *Position) XXX_Size() int

func (*Position) XXX_Unmarshal

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

type TickInfo

type TickInfo struct {
	LiquidityGross github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */
	LiquidityNet   github_com_cosmos_cosmos_sdk_types.Dec `` /* 158-byte string literal not displayed */
	// Total spread rewards accumulated in the opposite direction that the tick
	// was last crossed. i.e. if the current tick is to the right of this tick
	// (meaning its currently a greater price), then this is the total spread
	// rewards accumulated below the tick. If the current tick is to the left of
	// this tick (meaning its currently at a lower price), then this is the total
	// spread rewards accumulated above the tick.
	//
	// Note: the way this value is used depends on the direction of spread rewards
	// we are calculating for. If we are calculating spread rewards below the
	// lower tick and the lower tick is the active tick, then this is the
	// spreadRewardGrowthGlobal - the lower tick's
	// spreadRewardGrowthOppositeDirectionOfLastTraversal. If we are calculating
	// spread rewards above the upper tick and the upper tick is the active tick,
	// then this is just the tick's
	// spreadRewardGrowthOppositeDirectionOfLastTraversal value.
	SpreadRewardGrowthOppositeDirectionOfLastTraversal github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 270-byte string literal not displayed */
	// uptime_trackers is a container encapsulating the uptime trackers.
	// We use a container instead of a "repeated UptimeTracker" directly
	// because we need the ability to serialize and deserialize the
	// container easily for events when crossing a tick.
	UptimeTrackers UptimeTrackers `protobuf:"bytes,4,opt,name=uptime_trackers,json=uptimeTrackers,proto3" json:"uptime_trackers" yaml:"uptime_trackers"`
}

func (*TickInfo) Descriptor

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

func (*TickInfo) GetSpreadRewardGrowthOppositeDirectionOfLastTraversal added in v15.8.0

func (m *TickInfo) GetSpreadRewardGrowthOppositeDirectionOfLastTraversal() github_com_cosmos_cosmos_sdk_types.DecCoins

func (*TickInfo) GetUptimeTrackers

func (m *TickInfo) GetUptimeTrackers() UptimeTrackers

func (*TickInfo) Marshal

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

func (*TickInfo) MarshalTo

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

func (*TickInfo) MarshalToSizedBuffer

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

func (*TickInfo) ProtoMessage

func (*TickInfo) ProtoMessage()

func (*TickInfo) Reset

func (m *TickInfo) Reset()

func (*TickInfo) Size

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

func (*TickInfo) String

func (m *TickInfo) String() string

func (*TickInfo) Unmarshal

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

func (*TickInfo) XXX_DiscardUnknown

func (m *TickInfo) XXX_DiscardUnknown()

func (*TickInfo) XXX_Marshal

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

func (*TickInfo) XXX_Merge

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

func (*TickInfo) XXX_Size

func (m *TickInfo) XXX_Size() int

func (*TickInfo) XXX_Unmarshal

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

type UnimplementedMsgCreatorServer

type UnimplementedMsgCreatorServer struct {
}

UnimplementedMsgCreatorServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgCreatorServer) CreateConcentratedPool

type UptimeTracker

type UptimeTracker struct {
	UptimeGrowthOutside github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 167-byte string literal not displayed */
}

func (*UptimeTracker) Descriptor

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

func (*UptimeTracker) GetUptimeGrowthOutside

func (m *UptimeTracker) GetUptimeGrowthOutside() github_com_cosmos_cosmos_sdk_types.DecCoins

func (*UptimeTracker) Marshal

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

func (*UptimeTracker) MarshalTo

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

func (*UptimeTracker) MarshalToSizedBuffer

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

func (*UptimeTracker) ProtoMessage

func (*UptimeTracker) ProtoMessage()

func (*UptimeTracker) Reset

func (m *UptimeTracker) Reset()

func (*UptimeTracker) Size

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

func (*UptimeTracker) String

func (m *UptimeTracker) String() string

func (*UptimeTracker) Unmarshal

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

func (*UptimeTracker) XXX_DiscardUnknown

func (m *UptimeTracker) XXX_DiscardUnknown()

func (*UptimeTracker) XXX_Marshal

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

func (*UptimeTracker) XXX_Merge

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

func (*UptimeTracker) XXX_Size

func (m *UptimeTracker) XXX_Size() int

func (*UptimeTracker) XXX_Unmarshal

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

type UptimeTrackers added in v15.8.0

type UptimeTrackers struct {
	List []UptimeTracker `protobuf:"bytes,1,rep,name=list,proto3" json:"list" yaml:"list"`
}

func (*UptimeTrackers) Descriptor added in v15.8.0

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

func (*UptimeTrackers) GetList added in v15.8.0

func (m *UptimeTrackers) GetList() []UptimeTracker

func (*UptimeTrackers) Marshal added in v15.8.0

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

func (*UptimeTrackers) MarshalTo added in v15.8.0

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

func (*UptimeTrackers) MarshalToSizedBuffer added in v15.8.0

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

func (*UptimeTrackers) ProtoMessage added in v15.8.0

func (*UptimeTrackers) ProtoMessage()

func (*UptimeTrackers) Reset added in v15.8.0

func (m *UptimeTrackers) Reset()

func (*UptimeTrackers) Size added in v15.8.0

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

func (*UptimeTrackers) String added in v15.8.0

func (m *UptimeTrackers) String() string

func (*UptimeTrackers) Unmarshal added in v15.8.0

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

func (*UptimeTrackers) XXX_DiscardUnknown added in v15.8.0

func (m *UptimeTrackers) XXX_DiscardUnknown()

func (*UptimeTrackers) XXX_Marshal added in v15.8.0

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

func (*UptimeTrackers) XXX_Merge added in v15.8.0

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

func (*UptimeTrackers) XXX_Size added in v15.8.0

func (m *UptimeTrackers) XXX_Size() int

func (*UptimeTrackers) XXX_Unmarshal added in v15.8.0

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

Jump to

Keyboard shortcuts

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