Documentation ¶
Overview ¶
nolint
nolint
nolint
Index ¶
- Constants
- Variables
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- type MsgClient
- type MsgCreatePool
- func (*MsgCreatePool) Descriptor() ([]byte, []int)
- func (msg MsgCreatePool) GetPoolCreator() sdk.AccAddress
- func (msg MsgCreatePool) GetSignBytes() []byte
- func (msg MsgCreatePool) GetSigners() []sdk.AccAddress
- func (m *MsgCreatePool) Marshal() (dAtA []byte, err error)
- func (m *MsgCreatePool) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreatePool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreatePool) ProtoMessage()
- func (m *MsgCreatePool) Reset()
- func (msg MsgCreatePool) Route() string
- func (m *MsgCreatePool) Size() (n int)
- func (m *MsgCreatePool) String() string
- func (msg MsgCreatePool) Type() string
- func (m *MsgCreatePool) Unmarshal(dAtA []byte) error
- func (msg MsgCreatePool) ValidateBasic() error
- func (m *MsgCreatePool) XXX_DiscardUnknown()
- func (m *MsgCreatePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreatePool) XXX_Merge(src proto.Message)
- func (m *MsgCreatePool) XXX_Size() int
- func (m *MsgCreatePool) XXX_Unmarshal(b []byte) error
- type MsgCreatePoolResponse
- func (*MsgCreatePoolResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreatePoolResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreatePoolResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreatePoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreatePoolResponse) ProtoMessage()
- func (m *MsgCreatePoolResponse) Reset()
- func (m *MsgCreatePoolResponse) Size() (n int)
- func (m *MsgCreatePoolResponse) String() string
- func (m *MsgCreatePoolResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreatePoolResponse) XXX_DiscardUnknown()
- func (m *MsgCreatePoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreatePoolResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreatePoolResponse) XXX_Size() int
- func (m *MsgCreatePoolResponse) XXX_Unmarshal(b []byte) error
- type MsgDepositWithinBatch
- func (*MsgDepositWithinBatch) Descriptor() ([]byte, []int)
- func (msg MsgDepositWithinBatch) GetDepositor() sdk.AccAddress
- func (msg MsgDepositWithinBatch) GetSignBytes() []byte
- func (msg MsgDepositWithinBatch) GetSigners() []sdk.AccAddress
- func (m *MsgDepositWithinBatch) Marshal() (dAtA []byte, err error)
- func (m *MsgDepositWithinBatch) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDepositWithinBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDepositWithinBatch) ProtoMessage()
- func (m *MsgDepositWithinBatch) Reset()
- func (msg MsgDepositWithinBatch) Route() string
- func (m *MsgDepositWithinBatch) Size() (n int)
- func (m *MsgDepositWithinBatch) String() string
- func (msg MsgDepositWithinBatch) Type() string
- func (m *MsgDepositWithinBatch) Unmarshal(dAtA []byte) error
- func (msg MsgDepositWithinBatch) ValidateBasic() error
- func (m *MsgDepositWithinBatch) XXX_DiscardUnknown()
- func (m *MsgDepositWithinBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDepositWithinBatch) XXX_Merge(src proto.Message)
- func (m *MsgDepositWithinBatch) XXX_Size() int
- func (m *MsgDepositWithinBatch) XXX_Unmarshal(b []byte) error
- type MsgDepositWithinBatchResponse
- func (*MsgDepositWithinBatchResponse) Descriptor() ([]byte, []int)
- func (m *MsgDepositWithinBatchResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgDepositWithinBatchResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDepositWithinBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDepositWithinBatchResponse) ProtoMessage()
- func (m *MsgDepositWithinBatchResponse) Reset()
- func (m *MsgDepositWithinBatchResponse) Size() (n int)
- func (m *MsgDepositWithinBatchResponse) String() string
- func (m *MsgDepositWithinBatchResponse) Unmarshal(dAtA []byte) error
- func (m *MsgDepositWithinBatchResponse) XXX_DiscardUnknown()
- func (m *MsgDepositWithinBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDepositWithinBatchResponse) XXX_Merge(src proto.Message)
- func (m *MsgDepositWithinBatchResponse) XXX_Size() int
- func (m *MsgDepositWithinBatchResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgSwapWithinBatch
- func (*MsgSwapWithinBatch) Descriptor() ([]byte, []int)
- func (msg MsgSwapWithinBatch) GetSignBytes() []byte
- func (msg MsgSwapWithinBatch) GetSigners() []sdk.AccAddress
- func (msg MsgSwapWithinBatch) GetSwapRequester() sdk.AccAddress
- func (m *MsgSwapWithinBatch) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapWithinBatch) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapWithinBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapWithinBatch) ProtoMessage()
- func (m *MsgSwapWithinBatch) Reset()
- func (msg MsgSwapWithinBatch) Route() string
- func (m *MsgSwapWithinBatch) Size() (n int)
- func (m *MsgSwapWithinBatch) String() string
- func (msg MsgSwapWithinBatch) Type() string
- func (m *MsgSwapWithinBatch) Unmarshal(dAtA []byte) error
- func (msg MsgSwapWithinBatch) ValidateBasic() error
- func (m *MsgSwapWithinBatch) XXX_DiscardUnknown()
- func (m *MsgSwapWithinBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapWithinBatch) XXX_Merge(src proto.Message)
- func (m *MsgSwapWithinBatch) XXX_Size() int
- func (m *MsgSwapWithinBatch) XXX_Unmarshal(b []byte) error
- type MsgSwapWithinBatchResponse
- func (*MsgSwapWithinBatchResponse) Descriptor() ([]byte, []int)
- func (m *MsgSwapWithinBatchResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapWithinBatchResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapWithinBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSwapWithinBatchResponse) ProtoMessage()
- func (m *MsgSwapWithinBatchResponse) Reset()
- func (m *MsgSwapWithinBatchResponse) Size() (n int)
- func (m *MsgSwapWithinBatchResponse) String() string
- func (m *MsgSwapWithinBatchResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSwapWithinBatchResponse) XXX_DiscardUnknown()
- func (m *MsgSwapWithinBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSwapWithinBatchResponse) XXX_Merge(src proto.Message)
- func (m *MsgSwapWithinBatchResponse) XXX_Size() int
- func (m *MsgSwapWithinBatchResponse) XXX_Unmarshal(b []byte) error
- type MsgWithdrawWithinBatch
- func (*MsgWithdrawWithinBatch) Descriptor() ([]byte, []int)
- func (msg MsgWithdrawWithinBatch) GetSignBytes() []byte
- func (msg MsgWithdrawWithinBatch) GetSigners() []sdk.AccAddress
- func (msg MsgWithdrawWithinBatch) GetWithdrawer() sdk.AccAddress
- func (m *MsgWithdrawWithinBatch) Marshal() (dAtA []byte, err error)
- func (m *MsgWithdrawWithinBatch) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWithdrawWithinBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWithdrawWithinBatch) ProtoMessage()
- func (m *MsgWithdrawWithinBatch) Reset()
- func (msg MsgWithdrawWithinBatch) Route() string
- func (m *MsgWithdrawWithinBatch) Size() (n int)
- func (m *MsgWithdrawWithinBatch) String() string
- func (msg MsgWithdrawWithinBatch) Type() string
- func (m *MsgWithdrawWithinBatch) Unmarshal(dAtA []byte) error
- func (msg MsgWithdrawWithinBatch) ValidateBasic() error
- func (m *MsgWithdrawWithinBatch) XXX_DiscardUnknown()
- func (m *MsgWithdrawWithinBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWithdrawWithinBatch) XXX_Merge(src proto.Message)
- func (m *MsgWithdrawWithinBatch) XXX_Size() int
- func (m *MsgWithdrawWithinBatch) XXX_Unmarshal(b []byte) error
- type MsgWithdrawWithinBatchResponse
- func (*MsgWithdrawWithinBatchResponse) Descriptor() ([]byte, []int)
- func (m *MsgWithdrawWithinBatchResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgWithdrawWithinBatchResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgWithdrawWithinBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgWithdrawWithinBatchResponse) ProtoMessage()
- func (m *MsgWithdrawWithinBatchResponse) Reset()
- func (m *MsgWithdrawWithinBatchResponse) Size() (n int)
- func (m *MsgWithdrawWithinBatchResponse) String() string
- func (m *MsgWithdrawWithinBatchResponse) Unmarshal(dAtA []byte) error
- func (m *MsgWithdrawWithinBatchResponse) XXX_DiscardUnknown()
- func (m *MsgWithdrawWithinBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgWithdrawWithinBatchResponse) XXX_Merge(src proto.Message)
- func (m *MsgWithdrawWithinBatchResponse) XXX_Size() int
- func (m *MsgWithdrawWithinBatchResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) CreatePool(ctx context.Context, req *MsgCreatePool) (*MsgCreatePoolResponse, error)
- func (*UnimplementedMsgServer) DepositWithinBatch(ctx context.Context, req *MsgDepositWithinBatch) (*MsgDepositWithinBatchResponse, error)
- func (*UnimplementedMsgServer) Swap(ctx context.Context, req *MsgSwapWithinBatch) (*MsgSwapWithinBatchResponse, error)
- func (*UnimplementedMsgServer) WithdrawWithinBatch(ctx context.Context, req *MsgWithdrawWithinBatch) (*MsgWithdrawWithinBatchResponse, error)
Constants ¶
const ( // ModuleName is the name of the liquidity module ModuleName = "liquidity" // RouterKey is the message router key for the liquidity module RouterKey = ModuleName )
const ( TypeMsgCreatePool = "create_pool" TypeMsgDepositWithinBatch = "deposit_within_batch" TypeMsgWithdrawWithinBatch = "withdraw_within_batch" TypeMsgSwapWithinBatch = "swap_within_batch" )
Message types for the liquidity module
const ( // MinReserveCoinNum is the minimum number of reserve coins in each liquidity pool. MinReserveCoinNum uint32 = 2 // MaxReserveCoinNum is the maximum number of reserve coins in each liquidity pool. MaxReserveCoinNum uint32 = 2 )
Variables ¶
var ( ErrNumOfReserveCoin = sdkerrors.Register(ModuleName, 5, "invalid number of reserve coin") ErrInvalidPoolCreatorAddr = sdkerrors.Register(ModuleName, 15, "invalid pool creator address") ErrInvalidDepositorAddr = sdkerrors.Register(ModuleName, 16, "invalid pool depositor address") ErrInvalidWithdrawerAddr = sdkerrors.Register(ModuleName, 17, "invalid pool withdrawer address") ErrInvalidSwapRequesterAddr = sdkerrors.Register(ModuleName, 18, "invalid pool swap requester address") ErrBadPoolCoinAmount = sdkerrors.Register(ModuleName, 19, "invalid pool coin amount") ErrBadDepositCoinsAmount = sdkerrors.Register(ModuleName, 20, "invalid deposit coins amount") ErrBadOfferCoinAmount = sdkerrors.Register(ModuleName, 21, "invalid offer coin amount") ErrBadOrderPrice = sdkerrors.Register(ModuleName, 23, "invalid order price") ErrLessThanMinOfferAmount = sdkerrors.Register(ModuleName, 34, "offer amount should be over 100 micro") ErrBadPoolTypeID = sdkerrors.Register(ModuleName, 37, "invalid index of the pool type") )
liquidity module sentinel errors
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 (
MinOfferCoinAmount = sdk.NewInt(100)
)
var ( // ModuleCdc references the global x/liquidity module codec. Note, the // codec should ONLY be used in certain instances of tests and for JSON // encoding as Amino is still used for that purpose. // // The actual codec used for serialization should be provided to x/liquidity // and defined at the application level. ModuleCdc = codec.NewAminoCodec(amino) )
legacy amino codecs
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the x/liquidity interface types with the interface registry
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers concrete types on the codec.
func RegisterMsgServer ¶
Types ¶
type MsgClient ¶
type MsgClient interface { // Submit a create liquidity pool message. CreatePool(ctx context.Context, in *MsgCreatePool, opts ...grpc.CallOption) (*MsgCreatePoolResponse, error) // Submit a deposit to the liquidity pool batch. DepositWithinBatch(ctx context.Context, in *MsgDepositWithinBatch, opts ...grpc.CallOption) (*MsgDepositWithinBatchResponse, error) // Submit a withdraw from the liquidity pool batch. WithdrawWithinBatch(ctx context.Context, in *MsgWithdrawWithinBatch, opts ...grpc.CallOption) (*MsgWithdrawWithinBatchResponse, error) // Submit a swap to the liquidity pool batch. Swap(ctx context.Context, in *MsgSwapWithinBatch, opts ...grpc.CallOption) (*MsgSwapWithinBatchResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgCreatePool ¶
type MsgCreatePool struct { PoolCreatorAddress string `` /* 145-byte string literal not displayed */ // id of the target pool type, must match the value in the pool. Only pool-type-id 1 is supported. PoolTypeId uint32 `protobuf:"varint,2,opt,name=pool_type_id,json=poolTypeId,proto3" json:"pool_type_id,omitempty" yaml:"pool_type_id"` // reserve coin pair of the pool to deposit. DepositCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 162-byte string literal not displayed */ }
MsgCreatePool defines an sdk.Msg type that supports submitting a create liquidity pool tx.
See: https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md
func (*MsgCreatePool) Descriptor ¶
func (*MsgCreatePool) Descriptor() ([]byte, []int)
func (MsgCreatePool) GetPoolCreator ¶
func (msg MsgCreatePool) GetPoolCreator() sdk.AccAddress
func (MsgCreatePool) GetSignBytes ¶
func (msg MsgCreatePool) GetSignBytes() []byte
func (MsgCreatePool) GetSigners ¶
func (msg MsgCreatePool) GetSigners() []sdk.AccAddress
func (*MsgCreatePool) Marshal ¶
func (m *MsgCreatePool) Marshal() (dAtA []byte, err error)
func (*MsgCreatePool) MarshalToSizedBuffer ¶
func (m *MsgCreatePool) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreatePool) ProtoMessage ¶
func (*MsgCreatePool) ProtoMessage()
func (*MsgCreatePool) Reset ¶
func (m *MsgCreatePool) Reset()
func (MsgCreatePool) Route ¶
func (msg MsgCreatePool) Route() string
func (*MsgCreatePool) Size ¶
func (m *MsgCreatePool) Size() (n int)
func (*MsgCreatePool) String ¶
func (m *MsgCreatePool) String() string
func (MsgCreatePool) Type ¶
func (msg MsgCreatePool) Type() string
func (*MsgCreatePool) Unmarshal ¶
func (m *MsgCreatePool) Unmarshal(dAtA []byte) error
func (MsgCreatePool) ValidateBasic ¶
func (msg MsgCreatePool) ValidateBasic() error
func (*MsgCreatePool) XXX_DiscardUnknown ¶
func (m *MsgCreatePool) XXX_DiscardUnknown()
func (*MsgCreatePool) XXX_Marshal ¶
func (m *MsgCreatePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreatePool) XXX_Merge ¶
func (m *MsgCreatePool) XXX_Merge(src proto.Message)
func (*MsgCreatePool) XXX_Size ¶
func (m *MsgCreatePool) XXX_Size() int
func (*MsgCreatePool) XXX_Unmarshal ¶
func (m *MsgCreatePool) XXX_Unmarshal(b []byte) error
type MsgCreatePoolResponse ¶
type MsgCreatePoolResponse struct { }
MsgCreatePoolResponse defines the Msg/CreatePool response type.
func (*MsgCreatePoolResponse) Descriptor ¶
func (*MsgCreatePoolResponse) Descriptor() ([]byte, []int)
func (*MsgCreatePoolResponse) Marshal ¶
func (m *MsgCreatePoolResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreatePoolResponse) MarshalTo ¶
func (m *MsgCreatePoolResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreatePoolResponse) MarshalToSizedBuffer ¶
func (m *MsgCreatePoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreatePoolResponse) ProtoMessage ¶
func (*MsgCreatePoolResponse) ProtoMessage()
func (*MsgCreatePoolResponse) Reset ¶
func (m *MsgCreatePoolResponse) Reset()
func (*MsgCreatePoolResponse) Size ¶
func (m *MsgCreatePoolResponse) Size() (n int)
func (*MsgCreatePoolResponse) String ¶
func (m *MsgCreatePoolResponse) String() string
func (*MsgCreatePoolResponse) Unmarshal ¶
func (m *MsgCreatePoolResponse) Unmarshal(dAtA []byte) error
func (*MsgCreatePoolResponse) XXX_DiscardUnknown ¶
func (m *MsgCreatePoolResponse) XXX_DiscardUnknown()
func (*MsgCreatePoolResponse) XXX_Marshal ¶
func (m *MsgCreatePoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreatePoolResponse) XXX_Merge ¶
func (m *MsgCreatePoolResponse) XXX_Merge(src proto.Message)
func (*MsgCreatePoolResponse) XXX_Size ¶
func (m *MsgCreatePoolResponse) XXX_Size() int
func (*MsgCreatePoolResponse) XXX_Unmarshal ¶
func (m *MsgCreatePoolResponse) XXX_Unmarshal(b []byte) error
type MsgDepositWithinBatch ¶
type MsgDepositWithinBatch struct { DepositorAddress string `` /* 134-byte string literal not displayed */ // id of the target pool PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"` // reserve coin pair of the pool to deposit DepositCoins github_com_cosmos_cosmos_sdk_types.Coins `` /* 162-byte string literal not displayed */ }
`MsgDepositWithinBatch defines` an `sdk.Msg` type that supports submitting a deposit request to the batch of the liquidity pool. Deposit is submitted to the batch of the Liquidity pool with the specified `pool_id`, `deposit_coins` for reserve. This request is stacked in the batch of the liquidity pool, is not processed immediately, and is processed in the `endblock` at the same time as other requests.
See: https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md
func NewMsgDepositWithinBatch ¶
func NewMsgDepositWithinBatch(depositor sdk.AccAddress, poolID uint64, depositCoins sdk.Coins) *MsgDepositWithinBatch
NewMsgDepositWithinBatch creates a new MsgDepositWithinBatch.
func (*MsgDepositWithinBatch) Descriptor ¶
func (*MsgDepositWithinBatch) Descriptor() ([]byte, []int)
func (MsgDepositWithinBatch) GetDepositor ¶
func (msg MsgDepositWithinBatch) GetDepositor() sdk.AccAddress
func (MsgDepositWithinBatch) GetSignBytes ¶
func (msg MsgDepositWithinBatch) GetSignBytes() []byte
func (MsgDepositWithinBatch) GetSigners ¶
func (msg MsgDepositWithinBatch) GetSigners() []sdk.AccAddress
func (*MsgDepositWithinBatch) Marshal ¶
func (m *MsgDepositWithinBatch) Marshal() (dAtA []byte, err error)
func (*MsgDepositWithinBatch) MarshalTo ¶
func (m *MsgDepositWithinBatch) MarshalTo(dAtA []byte) (int, error)
func (*MsgDepositWithinBatch) MarshalToSizedBuffer ¶
func (m *MsgDepositWithinBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDepositWithinBatch) ProtoMessage ¶
func (*MsgDepositWithinBatch) ProtoMessage()
func (*MsgDepositWithinBatch) Reset ¶
func (m *MsgDepositWithinBatch) Reset()
func (MsgDepositWithinBatch) Route ¶
func (msg MsgDepositWithinBatch) Route() string
func (*MsgDepositWithinBatch) Size ¶
func (m *MsgDepositWithinBatch) Size() (n int)
func (*MsgDepositWithinBatch) String ¶
func (m *MsgDepositWithinBatch) String() string
func (MsgDepositWithinBatch) Type ¶
func (msg MsgDepositWithinBatch) Type() string
func (*MsgDepositWithinBatch) Unmarshal ¶
func (m *MsgDepositWithinBatch) Unmarshal(dAtA []byte) error
func (MsgDepositWithinBatch) ValidateBasic ¶
func (msg MsgDepositWithinBatch) ValidateBasic() error
func (*MsgDepositWithinBatch) XXX_DiscardUnknown ¶
func (m *MsgDepositWithinBatch) XXX_DiscardUnknown()
func (*MsgDepositWithinBatch) XXX_Marshal ¶
func (m *MsgDepositWithinBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDepositWithinBatch) XXX_Merge ¶
func (m *MsgDepositWithinBatch) XXX_Merge(src proto.Message)
func (*MsgDepositWithinBatch) XXX_Size ¶
func (m *MsgDepositWithinBatch) XXX_Size() int
func (*MsgDepositWithinBatch) XXX_Unmarshal ¶
func (m *MsgDepositWithinBatch) XXX_Unmarshal(b []byte) error
type MsgDepositWithinBatchResponse ¶
type MsgDepositWithinBatchResponse struct { }
MsgDepositWithinBatchResponse defines the Msg/DepositWithinBatch response type.
func (*MsgDepositWithinBatchResponse) Descriptor ¶
func (*MsgDepositWithinBatchResponse) Descriptor() ([]byte, []int)
func (*MsgDepositWithinBatchResponse) Marshal ¶
func (m *MsgDepositWithinBatchResponse) Marshal() (dAtA []byte, err error)
func (*MsgDepositWithinBatchResponse) MarshalTo ¶
func (m *MsgDepositWithinBatchResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgDepositWithinBatchResponse) MarshalToSizedBuffer ¶
func (m *MsgDepositWithinBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgDepositWithinBatchResponse) ProtoMessage ¶
func (*MsgDepositWithinBatchResponse) ProtoMessage()
func (*MsgDepositWithinBatchResponse) Reset ¶
func (m *MsgDepositWithinBatchResponse) Reset()
func (*MsgDepositWithinBatchResponse) Size ¶
func (m *MsgDepositWithinBatchResponse) Size() (n int)
func (*MsgDepositWithinBatchResponse) String ¶
func (m *MsgDepositWithinBatchResponse) String() string
func (*MsgDepositWithinBatchResponse) Unmarshal ¶
func (m *MsgDepositWithinBatchResponse) Unmarshal(dAtA []byte) error
func (*MsgDepositWithinBatchResponse) XXX_DiscardUnknown ¶
func (m *MsgDepositWithinBatchResponse) XXX_DiscardUnknown()
func (*MsgDepositWithinBatchResponse) XXX_Marshal ¶
func (m *MsgDepositWithinBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgDepositWithinBatchResponse) XXX_Merge ¶
func (m *MsgDepositWithinBatchResponse) XXX_Merge(src proto.Message)
func (*MsgDepositWithinBatchResponse) XXX_Size ¶
func (m *MsgDepositWithinBatchResponse) XXX_Size() int
func (*MsgDepositWithinBatchResponse) XXX_Unmarshal ¶
func (m *MsgDepositWithinBatchResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // Submit a create liquidity pool message. CreatePool(context.Context, *MsgCreatePool) (*MsgCreatePoolResponse, error) // Submit a deposit to the liquidity pool batch. DepositWithinBatch(context.Context, *MsgDepositWithinBatch) (*MsgDepositWithinBatchResponse, error) // Submit a withdraw from the liquidity pool batch. WithdrawWithinBatch(context.Context, *MsgWithdrawWithinBatch) (*MsgWithdrawWithinBatchResponse, error) // Submit a swap to the liquidity pool batch. Swap(context.Context, *MsgSwapWithinBatch) (*MsgSwapWithinBatchResponse, error) }
MsgServer is the server API for Msg service.
type MsgSwapWithinBatch ¶
type MsgSwapWithinBatch struct { // address of swap requester SwapRequesterAddress string `` /* 153-byte string literal not displayed */ // id of swap type, must match the value in the pool. Only `swap_type_id` 1 is supported. PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"` // id of swap type. Must match the value in the pool. SwapTypeId uint32 `protobuf:"varint,3,opt,name=swap_type_id,json=swapTypeId,proto3" json:"swap_type_id,omitempty" yaml:"swap_type_id"` // offer sdk.coin for the swap request, must match the denom in the pool. OfferCoin types.Coin `protobuf:"bytes,4,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin" yaml:"offer_coin"` // denom of demand coin to be exchanged on the swap request, must match the denom in the pool. DemandCoinDenom string `` /* 133-byte string literal not displayed */ // half of offer coin amount * params.swap_fee_rate and ceil for reservation to pay fees. OfferCoinFee types.Coin `protobuf:"bytes,6,opt,name=offer_coin_fee,json=offerCoinFee,proto3" json:"offer_coin_fee" yaml:"offer_coin_fee"` // limit order price for the order, the price is the exchange ratio of X/Y // where X is the amount of the first coin and Y is the amount // of the second coin when their denoms are sorted alphabetically. OrderPrice github_com_cosmos_cosmos_sdk_types.Dec `` /* 150-byte string literal not displayed */ }
`MsgSwapWithinBatch` defines an sdk.Msg type that supports submitting a swap offer request to the batch of the liquidity pool. Submit swap offer to the liquidity pool batch with the specified the `pool_id`, `swap_type_id`, `demand_coin_denom` with the coin and the price you're offering and `offer_coin_fee` must be half of offer coin amount * current `params.swap_fee_rate` and ceil for reservation to pay fees. This request is stacked in the batch of the liquidity pool, is not processed immediately, and is processed in the `endblock` at the same time as other requests. You must request the same fields as the pool. Only the default `swap_type_id` 1 is supported.
See: https://github.com/gravity-devs/liquidity/tree/develop/doc https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md
func (*MsgSwapWithinBatch) Descriptor ¶
func (*MsgSwapWithinBatch) Descriptor() ([]byte, []int)
func (MsgSwapWithinBatch) GetSignBytes ¶
func (msg MsgSwapWithinBatch) GetSignBytes() []byte
func (MsgSwapWithinBatch) GetSigners ¶
func (msg MsgSwapWithinBatch) GetSigners() []sdk.AccAddress
func (MsgSwapWithinBatch) GetSwapRequester ¶
func (msg MsgSwapWithinBatch) GetSwapRequester() sdk.AccAddress
func (*MsgSwapWithinBatch) Marshal ¶
func (m *MsgSwapWithinBatch) Marshal() (dAtA []byte, err error)
func (*MsgSwapWithinBatch) MarshalTo ¶
func (m *MsgSwapWithinBatch) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapWithinBatch) MarshalToSizedBuffer ¶
func (m *MsgSwapWithinBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapWithinBatch) ProtoMessage ¶
func (*MsgSwapWithinBatch) ProtoMessage()
func (*MsgSwapWithinBatch) Reset ¶
func (m *MsgSwapWithinBatch) Reset()
func (MsgSwapWithinBatch) Route ¶
func (msg MsgSwapWithinBatch) Route() string
func (*MsgSwapWithinBatch) Size ¶
func (m *MsgSwapWithinBatch) Size() (n int)
func (*MsgSwapWithinBatch) String ¶
func (m *MsgSwapWithinBatch) String() string
func (MsgSwapWithinBatch) Type ¶
func (msg MsgSwapWithinBatch) Type() string
func (*MsgSwapWithinBatch) Unmarshal ¶
func (m *MsgSwapWithinBatch) Unmarshal(dAtA []byte) error
func (MsgSwapWithinBatch) ValidateBasic ¶
func (msg MsgSwapWithinBatch) ValidateBasic() error
func (*MsgSwapWithinBatch) XXX_DiscardUnknown ¶
func (m *MsgSwapWithinBatch) XXX_DiscardUnknown()
func (*MsgSwapWithinBatch) XXX_Marshal ¶
func (m *MsgSwapWithinBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapWithinBatch) XXX_Merge ¶
func (m *MsgSwapWithinBatch) XXX_Merge(src proto.Message)
func (*MsgSwapWithinBatch) XXX_Size ¶
func (m *MsgSwapWithinBatch) XXX_Size() int
func (*MsgSwapWithinBatch) XXX_Unmarshal ¶
func (m *MsgSwapWithinBatch) XXX_Unmarshal(b []byte) error
type MsgSwapWithinBatchResponse ¶
type MsgSwapWithinBatchResponse struct { }
MsgSwapWithinBatchResponse defines the Msg/Swap response type.
func (*MsgSwapWithinBatchResponse) Descriptor ¶
func (*MsgSwapWithinBatchResponse) Descriptor() ([]byte, []int)
func (*MsgSwapWithinBatchResponse) Marshal ¶
func (m *MsgSwapWithinBatchResponse) Marshal() (dAtA []byte, err error)
func (*MsgSwapWithinBatchResponse) MarshalTo ¶
func (m *MsgSwapWithinBatchResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSwapWithinBatchResponse) MarshalToSizedBuffer ¶
func (m *MsgSwapWithinBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapWithinBatchResponse) ProtoMessage ¶
func (*MsgSwapWithinBatchResponse) ProtoMessage()
func (*MsgSwapWithinBatchResponse) Reset ¶
func (m *MsgSwapWithinBatchResponse) Reset()
func (*MsgSwapWithinBatchResponse) Size ¶
func (m *MsgSwapWithinBatchResponse) Size() (n int)
func (*MsgSwapWithinBatchResponse) String ¶
func (m *MsgSwapWithinBatchResponse) String() string
func (*MsgSwapWithinBatchResponse) Unmarshal ¶
func (m *MsgSwapWithinBatchResponse) Unmarshal(dAtA []byte) error
func (*MsgSwapWithinBatchResponse) XXX_DiscardUnknown ¶
func (m *MsgSwapWithinBatchResponse) XXX_DiscardUnknown()
func (*MsgSwapWithinBatchResponse) XXX_Marshal ¶
func (m *MsgSwapWithinBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSwapWithinBatchResponse) XXX_Merge ¶
func (m *MsgSwapWithinBatchResponse) XXX_Merge(src proto.Message)
func (*MsgSwapWithinBatchResponse) XXX_Size ¶
func (m *MsgSwapWithinBatchResponse) XXX_Size() int
func (*MsgSwapWithinBatchResponse) XXX_Unmarshal ¶
func (m *MsgSwapWithinBatchResponse) XXX_Unmarshal(b []byte) error
type MsgWithdrawWithinBatch ¶
type MsgWithdrawWithinBatch struct { WithdrawerAddress string `` /* 138-byte string literal not displayed */ // id of the target pool PoolId uint64 `protobuf:"varint,2,opt,name=pool_id,json=poolId,proto3" json:"pool_id" yaml:"pool_id"` PoolCoin types.Coin `protobuf:"bytes,3,opt,name=pool_coin,json=poolCoin,proto3" json:"pool_coin" yaml:"pool_coin"` }
`MsgWithdrawWithinBatch` defines an `sdk.Msg` type that supports submitting a withdraw request to the batch of the liquidity pool. Withdraw is submitted to the batch from the Liquidity pool with the specified `pool_id`, `pool_coin` of the pool. This request is stacked in the batch of the liquidity pool, is not processed immediately, and is processed in the `endblock` at the same time as other requests.
See: https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md
func NewMsgWithdrawWithinBatch ¶
func NewMsgWithdrawWithinBatch(withdrawer sdk.AccAddress, poolID uint64, poolCoin sdk.Coin) *MsgWithdrawWithinBatch
NewMsgWithdrawWithinBatch creates a new MsgWithdrawWithinBatch.
func (*MsgWithdrawWithinBatch) Descriptor ¶
func (*MsgWithdrawWithinBatch) Descriptor() ([]byte, []int)
func (MsgWithdrawWithinBatch) GetSignBytes ¶
func (msg MsgWithdrawWithinBatch) GetSignBytes() []byte
func (MsgWithdrawWithinBatch) GetSigners ¶
func (msg MsgWithdrawWithinBatch) GetSigners() []sdk.AccAddress
func (MsgWithdrawWithinBatch) GetWithdrawer ¶
func (msg MsgWithdrawWithinBatch) GetWithdrawer() sdk.AccAddress
func (*MsgWithdrawWithinBatch) Marshal ¶
func (m *MsgWithdrawWithinBatch) Marshal() (dAtA []byte, err error)
func (*MsgWithdrawWithinBatch) MarshalTo ¶
func (m *MsgWithdrawWithinBatch) MarshalTo(dAtA []byte) (int, error)
func (*MsgWithdrawWithinBatch) MarshalToSizedBuffer ¶
func (m *MsgWithdrawWithinBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWithdrawWithinBatch) ProtoMessage ¶
func (*MsgWithdrawWithinBatch) ProtoMessage()
func (*MsgWithdrawWithinBatch) Reset ¶
func (m *MsgWithdrawWithinBatch) Reset()
func (MsgWithdrawWithinBatch) Route ¶
func (msg MsgWithdrawWithinBatch) Route() string
func (*MsgWithdrawWithinBatch) Size ¶
func (m *MsgWithdrawWithinBatch) Size() (n int)
func (*MsgWithdrawWithinBatch) String ¶
func (m *MsgWithdrawWithinBatch) String() string
func (MsgWithdrawWithinBatch) Type ¶
func (msg MsgWithdrawWithinBatch) Type() string
func (*MsgWithdrawWithinBatch) Unmarshal ¶
func (m *MsgWithdrawWithinBatch) Unmarshal(dAtA []byte) error
func (MsgWithdrawWithinBatch) ValidateBasic ¶
func (msg MsgWithdrawWithinBatch) ValidateBasic() error
func (*MsgWithdrawWithinBatch) XXX_DiscardUnknown ¶
func (m *MsgWithdrawWithinBatch) XXX_DiscardUnknown()
func (*MsgWithdrawWithinBatch) XXX_Marshal ¶
func (m *MsgWithdrawWithinBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWithdrawWithinBatch) XXX_Merge ¶
func (m *MsgWithdrawWithinBatch) XXX_Merge(src proto.Message)
func (*MsgWithdrawWithinBatch) XXX_Size ¶
func (m *MsgWithdrawWithinBatch) XXX_Size() int
func (*MsgWithdrawWithinBatch) XXX_Unmarshal ¶
func (m *MsgWithdrawWithinBatch) XXX_Unmarshal(b []byte) error
type MsgWithdrawWithinBatchResponse ¶
type MsgWithdrawWithinBatchResponse struct { }
MsgWithdrawWithinBatchResponse defines the Msg/WithdrawWithinBatch response type.
func (*MsgWithdrawWithinBatchResponse) Descriptor ¶
func (*MsgWithdrawWithinBatchResponse) Descriptor() ([]byte, []int)
func (*MsgWithdrawWithinBatchResponse) Marshal ¶
func (m *MsgWithdrawWithinBatchResponse) Marshal() (dAtA []byte, err error)
func (*MsgWithdrawWithinBatchResponse) MarshalTo ¶
func (m *MsgWithdrawWithinBatchResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgWithdrawWithinBatchResponse) MarshalToSizedBuffer ¶
func (m *MsgWithdrawWithinBatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgWithdrawWithinBatchResponse) ProtoMessage ¶
func (*MsgWithdrawWithinBatchResponse) ProtoMessage()
func (*MsgWithdrawWithinBatchResponse) Reset ¶
func (m *MsgWithdrawWithinBatchResponse) Reset()
func (*MsgWithdrawWithinBatchResponse) Size ¶
func (m *MsgWithdrawWithinBatchResponse) Size() (n int)
func (*MsgWithdrawWithinBatchResponse) String ¶
func (m *MsgWithdrawWithinBatchResponse) String() string
func (*MsgWithdrawWithinBatchResponse) Unmarshal ¶
func (m *MsgWithdrawWithinBatchResponse) Unmarshal(dAtA []byte) error
func (*MsgWithdrawWithinBatchResponse) XXX_DiscardUnknown ¶
func (m *MsgWithdrawWithinBatchResponse) XXX_DiscardUnknown()
func (*MsgWithdrawWithinBatchResponse) XXX_Marshal ¶
func (m *MsgWithdrawWithinBatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgWithdrawWithinBatchResponse) XXX_Merge ¶
func (m *MsgWithdrawWithinBatchResponse) XXX_Merge(src proto.Message)
func (*MsgWithdrawWithinBatchResponse) XXX_Size ¶
func (m *MsgWithdrawWithinBatchResponse) XXX_Size() int
func (*MsgWithdrawWithinBatchResponse) XXX_Unmarshal ¶
func (m *MsgWithdrawWithinBatchResponse) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) CreatePool ¶
func (*UnimplementedMsgServer) CreatePool(ctx context.Context, req *MsgCreatePool) (*MsgCreatePoolResponse, error)
func (*UnimplementedMsgServer) DepositWithinBatch ¶
func (*UnimplementedMsgServer) DepositWithinBatch(ctx context.Context, req *MsgDepositWithinBatch) (*MsgDepositWithinBatchResponse, error)
func (*UnimplementedMsgServer) Swap ¶
func (*UnimplementedMsgServer) Swap(ctx context.Context, req *MsgSwapWithinBatch) (*MsgSwapWithinBatchResponse, error)
func (*UnimplementedMsgServer) WithdrawWithinBatch ¶
func (*UnimplementedMsgServer) WithdrawWithinBatch(ctx context.Context, req *MsgWithdrawWithinBatch) (*MsgWithdrawWithinBatchResponse, error)