Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgCreatorServer(s grpc1.Server, srv MsgCreatorServer)
- type FullPositionBreakdown
- func (*FullPositionBreakdown) Descriptor() ([]byte, []int)
- func (m *FullPositionBreakdown) GetAsset0() types1.Coin
- func (m *FullPositionBreakdown) GetAsset1() types1.Coin
- func (m *FullPositionBreakdown) GetClaimableFees() []types1.Coin
- func (m *FullPositionBreakdown) GetClaimableIncentives() []types1.Coin
- func (m *FullPositionBreakdown) GetForfeitedIncentives() []types1.Coin
- func (m *FullPositionBreakdown) GetPosition() Position
- func (m *FullPositionBreakdown) Marshal() (dAtA []byte, err error)
- func (m *FullPositionBreakdown) MarshalTo(dAtA []byte) (int, error)
- func (m *FullPositionBreakdown) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FullPositionBreakdown) ProtoMessage()
- func (m *FullPositionBreakdown) Reset()
- func (m *FullPositionBreakdown) Size() (n int)
- func (m *FullPositionBreakdown) String() string
- func (m *FullPositionBreakdown) Unmarshal(dAtA []byte) error
- func (m *FullPositionBreakdown) XXX_DiscardUnknown()
- func (m *FullPositionBreakdown) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FullPositionBreakdown) XXX_Merge(src proto.Message)
- func (m *FullPositionBreakdown) XXX_Size() int
- func (m *FullPositionBreakdown) XXX_Unmarshal(b []byte) error
- type MsgCreateConcentratedPool
- func (msg MsgCreateConcentratedPool) CreatePool(ctx sdk.Context, poolID uint64) (poolmanagertypes.PoolI, error)
- func (*MsgCreateConcentratedPool) Descriptor() ([]byte, []int)
- func (m *MsgCreateConcentratedPool) GetDenom0() string
- func (m *MsgCreateConcentratedPool) GetDenom1() string
- func (msg MsgCreateConcentratedPool) GetPoolType() poolmanagertypes.PoolType
- func (m *MsgCreateConcentratedPool) GetSender() string
- func (msg MsgCreateConcentratedPool) GetSignBytes() []byte
- func (msg MsgCreateConcentratedPool) GetSigners() []sdk.AccAddress
- func (m *MsgCreateConcentratedPool) GetTickSpacing() uint64
- func (msg MsgCreateConcentratedPool) InitialLiquidity() sdk.Coins
- func (m *MsgCreateConcentratedPool) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateConcentratedPool) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateConcentratedPool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (msg MsgCreateConcentratedPool) PoolCreator() sdk.AccAddress
- func (*MsgCreateConcentratedPool) ProtoMessage()
- func (m *MsgCreateConcentratedPool) Reset()
- func (msg MsgCreateConcentratedPool) Route() string
- func (m *MsgCreateConcentratedPool) Size() (n int)
- func (m *MsgCreateConcentratedPool) String() string
- func (msg MsgCreateConcentratedPool) Type() string
- func (m *MsgCreateConcentratedPool) Unmarshal(dAtA []byte) error
- func (msg MsgCreateConcentratedPool) Validate(ctx sdk.Context) error
- func (msg MsgCreateConcentratedPool) ValidateBasic() error
- func (m *MsgCreateConcentratedPool) XXX_DiscardUnknown()
- func (m *MsgCreateConcentratedPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateConcentratedPool) XXX_Merge(src proto.Message)
- func (m *MsgCreateConcentratedPool) XXX_Size() int
- func (m *MsgCreateConcentratedPool) XXX_Unmarshal(b []byte) error
- type MsgCreateConcentratedPoolResponse
- func (*MsgCreateConcentratedPoolResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateConcentratedPoolResponse) GetPoolID() uint64
- func (m *MsgCreateConcentratedPoolResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateConcentratedPoolResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateConcentratedPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateConcentratedPoolResponse) ProtoMessage()
- func (m *MsgCreateConcentratedPoolResponse) Reset()
- func (m *MsgCreateConcentratedPoolResponse) Size() (n int)
- func (m *MsgCreateConcentratedPoolResponse) String() string
- func (m *MsgCreateConcentratedPoolResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateConcentratedPoolResponse) XXX_DiscardUnknown()
- func (m *MsgCreateConcentratedPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateConcentratedPoolResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateConcentratedPoolResponse) XXX_Size() int
- func (m *MsgCreateConcentratedPoolResponse) XXX_Unmarshal(b []byte) error
- type MsgCreatorClient
- type MsgCreatorServer
- type Pool
- func (p *Pool) ApplySwap(newLiquidity sdk.Dec, newCurrentTick int64, newCurrentSqrtPrice sdk.Dec) error
- func (p Pool) CalcActualAmounts(ctx sdk.Context, lowerTick, upperTick int64, liquidityDelta sdk.Dec) (actualAmountDenom0 sdk.Dec, actualAmountDenom1 sdk.Dec, err error)
- func (*Pool) Descriptor() ([]byte, []int)
- func (p Pool) GetAddress() sdk.AccAddress
- func (p Pool) GetCurrentSqrtPrice() sdk.Dec
- func (p Pool) GetCurrentTick() int64
- func (p Pool) GetExponentAtPriceOne() int64
- func (p Pool) GetId() uint64
- func (p Pool) GetIncentivesAddress() sdk.AccAddress
- func (p Pool) GetLastLiquidityUpdate() time.Time
- func (p Pool) GetLiquidity() sdk.Dec
- func (p Pool) GetSpreadFactor(ctx sdk.Context) sdk.Dec
- func (p Pool) GetSpreadRewardsAddress() sdk.AccAddress
- func (p Pool) GetTickSpacing() uint64
- func (p Pool) GetToken0() string
- func (p Pool) GetToken1() string
- func (p Pool) GetType() poolmanagertypes.PoolType
- func (p Pool) IsActive(ctx sdk.Context) bool
- func (p Pool) IsCurrentTickInRange(lowerTick, upperTick int64) bool
- func (m *Pool) Marshal() (dAtA []byte, err error)
- func (m *Pool) MarshalTo(dAtA []byte) (int, error)
- func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Pool) ProtoMessage()
- func (m *Pool) Reset()
- func (p *Pool) SetCurrentSqrtPrice(newSqrtPrice sdk.Dec)
- func (p *Pool) SetCurrentTick(newTick int64)
- func (p *Pool) SetLastLiquidityUpdate(newTime time.Time)
- func (p *Pool) SetTickSpacing(tickSpacing uint64)
- func (m *Pool) Size() (n int)
- func (p Pool) SpotPrice(ctx sdk.Context, baseAssetDenom string, quoteAssetDenom string) (sdk.Dec, error)
- func (p Pool) String() string
- func (m *Pool) Unmarshal(dAtA []byte) error
- func (p *Pool) UpdateLiquidity(newLiquidity sdk.Dec)
- func (p *Pool) UpdateLiquidityIfActivePosition(ctx sdk.Context, lowerTick, upperTick int64, liquidityDelta sdk.Dec) bool
- func (m *Pool) XXX_DiscardUnknown()
- func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pool) XXX_Merge(src proto.Message)
- func (m *Pool) XXX_Size() int
- func (m *Pool) XXX_Unmarshal(b []byte) error
- type Position
- func (*Position) Descriptor() ([]byte, []int)
- func (m *Position) GetAddress() string
- func (m *Position) GetJoinTime() time.Time
- func (m *Position) GetLowerTick() int64
- func (m *Position) GetPoolId() uint64
- func (m *Position) GetPositionId() uint64
- func (m *Position) GetUpperTick() int64
- func (m *Position) Marshal() (dAtA []byte, err error)
- func (m *Position) MarshalTo(dAtA []byte) (int, error)
- func (m *Position) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Position) ProtoMessage()
- func (m *Position) Reset()
- func (m *Position) Size() (n int)
- func (m *Position) String() string
- func (m *Position) Unmarshal(dAtA []byte) error
- func (m *Position) XXX_DiscardUnknown()
- func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Position) XXX_Merge(src proto.Message)
- func (m *Position) XXX_Size() int
- func (m *Position) XXX_Unmarshal(b []byte) error
- type TickInfo
- func (*TickInfo) Descriptor() ([]byte, []int)
- func (m *TickInfo) GetSpreadRewardGrowthOppositeDirectionOfLastTraversal() github_com_cosmos_cosmos_sdk_types.DecCoins
- func (m *TickInfo) GetUptimeTrackers() UptimeTrackers
- func (m *TickInfo) Marshal() (dAtA []byte, err error)
- func (m *TickInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *TickInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TickInfo) ProtoMessage()
- func (m *TickInfo) Reset()
- func (m *TickInfo) Size() (n int)
- func (m *TickInfo) String() string
- func (m *TickInfo) Unmarshal(dAtA []byte) error
- func (m *TickInfo) XXX_DiscardUnknown()
- func (m *TickInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TickInfo) XXX_Merge(src proto.Message)
- func (m *TickInfo) XXX_Size() int
- func (m *TickInfo) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgCreatorServer
- type UptimeTracker
- func (*UptimeTracker) Descriptor() ([]byte, []int)
- func (m *UptimeTracker) GetUptimeGrowthOutside() github_com_cosmos_cosmos_sdk_types.DecCoins
- func (m *UptimeTracker) Marshal() (dAtA []byte, err error)
- func (m *UptimeTracker) MarshalTo(dAtA []byte) (int, error)
- func (m *UptimeTracker) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UptimeTracker) ProtoMessage()
- func (m *UptimeTracker) Reset()
- func (m *UptimeTracker) Size() (n int)
- func (m *UptimeTracker) String() string
- func (m *UptimeTracker) Unmarshal(dAtA []byte) error
- func (m *UptimeTracker) XXX_DiscardUnknown()
- func (m *UptimeTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UptimeTracker) XXX_Merge(src proto.Message)
- func (m *UptimeTracker) XXX_Size() int
- func (m *UptimeTracker) XXX_Unmarshal(b []byte) error
- type UptimeTrackers
- func (*UptimeTrackers) Descriptor() ([]byte, []int)
- func (m *UptimeTrackers) GetList() []UptimeTracker
- func (m *UptimeTrackers) Marshal() (dAtA []byte, err error)
- func (m *UptimeTrackers) MarshalTo(dAtA []byte) (int, error)
- func (m *UptimeTrackers) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UptimeTrackers) ProtoMessage()
- func (m *UptimeTrackers) Reset()
- func (m *UptimeTrackers) Size() (n int)
- func (m *UptimeTrackers) String() string
- func (m *UptimeTrackers) Unmarshal(dAtA []byte) error
- func (m *UptimeTrackers) XXX_DiscardUnknown()
- func (m *UptimeTrackers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UptimeTrackers) XXX_Merge(src proto.Message)
- func (m *UptimeTrackers) XXX_Size() int
- func (m *UptimeTrackers) XXX_Unmarshal(b []byte) error
Constants ¶
const (
TypeMsgCreateConcentratedPool = "create_concentrated_pool"
)
constants.
Variables ¶
var ( ErrInvalidLengthPool = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPool = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPool = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthPosition = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPosition = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPosition = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTickInfo = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTickInfo = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTickInfo = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var (
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 (msg MsgCreateConcentratedPool) GetPoolType() poolmanagertypes.PoolType
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 (m *MsgCreateConcentratedPoolResponse) GetPoolID() uint64
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 (m *MsgCreateConcentratedPoolResponse) Reset()
func (*MsgCreateConcentratedPoolResponse) Size ¶
func (m *MsgCreateConcentratedPoolResponse) Size() (n int)
func (*MsgCreateConcentratedPoolResponse) String ¶
func (m *MsgCreateConcentratedPoolResponse) String() 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 (m *MsgCreateConcentratedPoolResponse) XXX_Merge(src proto.Message)
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) GetAddress ¶
func (p Pool) GetAddress() sdk.AccAddress
GetAddress returns the address of the concentrated liquidity pool
func (Pool) GetCurrentSqrtPrice ¶
GetCurrentSqrtPrice returns the current sqrt price of the pool
func (Pool) GetCurrentTick ¶
GetCurrentTick returns the current tick of the pool
func (Pool) GetExponentAtPriceOne ¶
GetExponentAtPriceOne returns the precision factor at price one of the pool
func (Pool) GetIncentivesAddress ¶
func (p Pool) GetIncentivesAddress() sdk.AccAddress
GetIncentivesAddress returns the address storing incentives of the concentrated liquidity pool.
func (Pool) GetLastLiquidityUpdate ¶
GetLastLiquidityUpdate returns the last time there was a change in pool liquidity or active tick.
func (Pool) GetLiquidity ¶
GetLiquidity returns the liquidity of the pool
func (Pool) GetSpreadFactor ¶ added in v15.8.0
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 ¶
GetTickSpacing returns the current tick spacing parameter of the pool
func (Pool) GetType ¶
func (p Pool) GetType() poolmanagertypes.PoolType
func (Pool) IsCurrentTickInRange ¶ added in v15.5.0
isCurrentTickInRange returns true if pool's current tick is within the range [lowerTick, upperTick). False otherwise.
func (*Pool) ProtoMessage ¶
func (*Pool) ProtoMessage()
func (*Pool) SetCurrentSqrtPrice ¶
SetCurrentSqrtPrice updates the current sqrt price of the pool when the first position is created.
func (*Pool) SetCurrentTick ¶
SetCurrentTick updates the current tick of the pool when the first position is created.
func (*Pool) SetLastLiquidityUpdate ¶
SetLastLiquidityUpdate updates the pool's LastLiquidityUpdate to newTime.
func (*Pool) SetTickSpacing ¶ added in v15.5.0
SetTickSpacing updates the tick spacing parameter of the pool.
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) UpdateLiquidity ¶
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_Unmarshal ¶
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) GetAddress ¶
func (*Position) GetJoinTime ¶
func (*Position) GetLowerTick ¶
func (*Position) GetPositionId ¶
func (*Position) GetUpperTick ¶
func (*Position) MarshalToSizedBuffer ¶
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) XXX_DiscardUnknown ¶
func (m *Position) XXX_DiscardUnknown()
func (*Position) XXX_Marshal ¶
func (*Position) XXX_Unmarshal ¶
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) 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) MarshalToSizedBuffer ¶
func (*TickInfo) ProtoMessage ¶
func (*TickInfo) ProtoMessage()
func (*TickInfo) XXX_DiscardUnknown ¶
func (m *TickInfo) XXX_DiscardUnknown()
func (*TickInfo) XXX_Marshal ¶
func (*TickInfo) XXX_Unmarshal ¶
type UnimplementedMsgCreatorServer ¶
type UnimplementedMsgCreatorServer struct { }
UnimplementedMsgCreatorServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgCreatorServer) CreateConcentratedPool ¶
func (*UnimplementedMsgCreatorServer) CreateConcentratedPool(ctx context.Context, req *MsgCreateConcentratedPool) (*MsgCreateConcentratedPoolResponse, error)
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) 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