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 (
	TypeMsgCreateCosmWasmPool = "create_cosmwasm_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 (
	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 added in v15.8.0

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces added in v15.8.0

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgCreatorServer

func RegisterMsgCreatorServer(s grpc1.Server, srv MsgCreatorServer)

Types

type CosmWasmPool

type CosmWasmPool struct {
	PoolAddress     string `protobuf:"bytes,1,opt,name=pool_address,json=poolAddress,proto3" json:"pool_address,omitempty" yaml:"pool_address"`
	ContractAddress string `` /* 130-byte string literal not displayed */
	PoolId          uint64 `protobuf:"varint,3,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"`
	CodeId          uint64 `protobuf:"varint,4,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"`
	InstantiateMsg  []byte `` /* 126-byte string literal not displayed */
}

func (*CosmWasmPool) Descriptor

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

func (CosmWasmPool) GetAddress added in v15.8.0

func (p CosmWasmPool) GetAddress() sdk.AccAddress

func (CosmWasmPool) GetCodeId added in v15.8.0

func (p CosmWasmPool) GetCodeId() uint64

func (CosmWasmPool) GetContractAddress added in v15.8.0

func (p CosmWasmPool) GetContractAddress() string

func (CosmWasmPool) GetExitFee added in v15.8.0

func (p CosmWasmPool) GetExitFee(ctx sdk.Context) sdk.Dec

func (CosmWasmPool) GetId added in v15.8.0

func (p CosmWasmPool) GetId() uint64

func (CosmWasmPool) GetInstantiateMsg added in v15.8.0

func (p CosmWasmPool) GetInstantiateMsg() []byte

func (CosmWasmPool) GetSpreadFactor added in v15.8.0

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

func (CosmWasmPool) GetStoreModel added in v15.8.0

func (p CosmWasmPool) GetStoreModel() proto.Message

func (CosmWasmPool) GetTotalPoolLiquidity added in v15.8.0

func (p CosmWasmPool) GetTotalPoolLiquidity(ctx sdk.Context) sdk.Coins

func (CosmWasmPool) GetType added in v15.8.0

func (CosmWasmPool) IsActive added in v15.8.0

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

func (*CosmWasmPool) Marshal

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

func (*CosmWasmPool) MarshalTo

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

func (*CosmWasmPool) MarshalToSizedBuffer

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

func (*CosmWasmPool) ProtoMessage

func (*CosmWasmPool) ProtoMessage()

func (*CosmWasmPool) Reset

func (m *CosmWasmPool) Reset()

func (CosmWasmPool) SetContractAddress added in v15.8.0

func (p CosmWasmPool) SetContractAddress(contractAddress string)

func (CosmWasmPool) SetWasmKeeper added in v15.8.0

func (p CosmWasmPool) SetWasmKeeper(wasmKeeper types.WasmKeeper)

func (*CosmWasmPool) Size

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

func (CosmWasmPool) SpotPrice added in v15.8.0

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

func (CosmWasmPool) String

func (p CosmWasmPool) String() string

String returns the json marshalled string of the pool

func (*CosmWasmPool) Unmarshal

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

func (*CosmWasmPool) XXX_DiscardUnknown

func (m *CosmWasmPool) XXX_DiscardUnknown()

func (*CosmWasmPool) XXX_Marshal

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

func (*CosmWasmPool) XXX_Merge

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

func (*CosmWasmPool) XXX_Size

func (m *CosmWasmPool) XXX_Size() int

func (*CosmWasmPool) XXX_Unmarshal

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

type MsgCreateCosmWasmPool

type MsgCreateCosmWasmPool struct {
	CodeId         uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty" yaml:"code_id"`
	InstantiateMsg []byte `` /* 126-byte string literal not displayed */
	Sender         string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"`
}

===================== MsgCreateCosmwasmPool

func NewMsgCreateCosmWasmPool

func NewMsgCreateCosmWasmPool(
	codeId uint64,
	sender sdk.AccAddress,
	instantiateMsg []byte,
) MsgCreateCosmWasmPool

func (MsgCreateCosmWasmPool) CreatePool

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

func (*MsgCreateCosmWasmPool) Descriptor

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

func (*MsgCreateCosmWasmPool) GetCodeId

func (m *MsgCreateCosmWasmPool) GetCodeId() uint64

func (*MsgCreateCosmWasmPool) GetInstantiateMsg

func (m *MsgCreateCosmWasmPool) GetInstantiateMsg() []byte

func (MsgCreateCosmWasmPool) GetPoolType

func (*MsgCreateCosmWasmPool) GetSender

func (m *MsgCreateCosmWasmPool) GetSender() string

func (MsgCreateCosmWasmPool) GetSignBytes

func (msg MsgCreateCosmWasmPool) GetSignBytes() []byte

func (MsgCreateCosmWasmPool) GetSigners

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

func (MsgCreateCosmWasmPool) InitialLiquidity

func (msg MsgCreateCosmWasmPool) InitialLiquidity() sdk.Coins

func (*MsgCreateCosmWasmPool) Marshal

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

func (*MsgCreateCosmWasmPool) MarshalTo

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

func (*MsgCreateCosmWasmPool) MarshalToSizedBuffer

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

func (MsgCreateCosmWasmPool) PoolCreator

func (msg MsgCreateCosmWasmPool) PoolCreator() sdk.AccAddress

Implement the CreatePoolMsg interface

func (*MsgCreateCosmWasmPool) ProtoMessage

func (*MsgCreateCosmWasmPool) ProtoMessage()

func (*MsgCreateCosmWasmPool) Reset

func (m *MsgCreateCosmWasmPool) Reset()

func (MsgCreateCosmWasmPool) Route

func (msg MsgCreateCosmWasmPool) Route() string

func (*MsgCreateCosmWasmPool) Size

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

func (*MsgCreateCosmWasmPool) String

func (m *MsgCreateCosmWasmPool) String() string

func (MsgCreateCosmWasmPool) Type

func (msg MsgCreateCosmWasmPool) Type() string

func (*MsgCreateCosmWasmPool) Unmarshal

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

func (MsgCreateCosmWasmPool) Validate

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

func (MsgCreateCosmWasmPool) ValidateBasic

func (msg MsgCreateCosmWasmPool) ValidateBasic() error

func (*MsgCreateCosmWasmPool) XXX_DiscardUnknown

func (m *MsgCreateCosmWasmPool) XXX_DiscardUnknown()

func (*MsgCreateCosmWasmPool) XXX_Marshal

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

func (*MsgCreateCosmWasmPool) XXX_Merge

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

func (*MsgCreateCosmWasmPool) XXX_Size

func (m *MsgCreateCosmWasmPool) XXX_Size() int

func (*MsgCreateCosmWasmPool) XXX_Unmarshal

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

type MsgCreateCosmWasmPoolResponse

type MsgCreateCosmWasmPoolResponse 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 (*MsgCreateCosmWasmPoolResponse) Descriptor

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

func (*MsgCreateCosmWasmPoolResponse) GetPoolID

func (m *MsgCreateCosmWasmPoolResponse) GetPoolID() uint64

func (*MsgCreateCosmWasmPoolResponse) Marshal

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

func (*MsgCreateCosmWasmPoolResponse) MarshalTo

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

func (*MsgCreateCosmWasmPoolResponse) MarshalToSizedBuffer

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

func (*MsgCreateCosmWasmPoolResponse) ProtoMessage

func (*MsgCreateCosmWasmPoolResponse) ProtoMessage()

func (*MsgCreateCosmWasmPoolResponse) Reset

func (m *MsgCreateCosmWasmPoolResponse) Reset()

func (*MsgCreateCosmWasmPoolResponse) Size

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

func (*MsgCreateCosmWasmPoolResponse) String

func (*MsgCreateCosmWasmPoolResponse) Unmarshal

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

func (*MsgCreateCosmWasmPoolResponse) XXX_DiscardUnknown

func (m *MsgCreateCosmWasmPoolResponse) XXX_DiscardUnknown()

func (*MsgCreateCosmWasmPoolResponse) XXX_Marshal

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

func (*MsgCreateCosmWasmPoolResponse) XXX_Merge

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

func (*MsgCreateCosmWasmPoolResponse) XXX_Size

func (m *MsgCreateCosmWasmPoolResponse) XXX_Size() int

func (*MsgCreateCosmWasmPoolResponse) XXX_Unmarshal

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

type MsgCreatorClient

type MsgCreatorClient interface {
	CreateCosmWasmPool(ctx context.Context, in *MsgCreateCosmWasmPool, opts ...grpc.CallOption) (*MsgCreateCosmWasmPoolResponse, 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 {
	CreateCosmWasmPool(context.Context, *MsgCreateCosmWasmPool) (*MsgCreateCosmWasmPoolResponse, error)
}

MsgCreatorServer is the server API for MsgCreator service.

type Pool added in v15.8.0

type Pool struct {
	CosmWasmPool
	WasmKeeper types.WasmKeeper
}

func NewCosmWasmPool added in v15.8.0

func NewCosmWasmPool(poolId uint64, codeId uint64, instantiateMsg []byte) *Pool

NewCosmWasmPool creates a new CosmWasm pool with the specified parameters.

func (Pool) GetAddress added in v15.8.0

func (p Pool) GetAddress() sdk.AccAddress

GetAddress returns the address of the concentrated liquidity pool

func (Pool) GetCodeId added in v15.8.0

func (p Pool) GetCodeId() uint64

func (Pool) GetContractAddress added in v15.8.0

func (p Pool) GetContractAddress() string

func (Pool) GetId added in v15.8.0

func (p Pool) GetId() uint64

GetId returns the id of the concentrated liquidity pool

func (Pool) GetInstantiateMsg added in v15.8.0

func (p Pool) GetInstantiateMsg() []byte

func (Pool) GetSpreadFactor added in v15.8.0

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

GetSpreadFactor returns the swap fee of the pool.

func (Pool) GetStoreModel added in v15.8.0

func (p Pool) GetStoreModel() proto.Message

func (Pool) GetTotalPoolLiquidity added in v15.8.0

func (p Pool) GetTotalPoolLiquidity(ctx sdk.Context) sdk.Coins

GetTotalPoolLiquidity returns the total pool liquidity

func (Pool) GetType added in v15.8.0

func (p Pool) GetType() poolmanagertypes.PoolType

GetType returns the type of the pool.

func (Pool) IsActive added in v15.8.0

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

IsActive returns true if the pool is active

func (*Pool) SetContractAddress added in v15.8.0

func (p *Pool) SetContractAddress(contractAddress string)

func (*Pool) SetWasmKeeper added in v15.8.0

func (p *Pool) SetWasmKeeper(wasmKeeper types.WasmKeeper)

Set the wasm keeper.

func (Pool) SpotPrice added in v15.8.0

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

SpotPrice returns the spot price of the pool.

func (Pool) String added in v15.8.0

func (p Pool) String() string

String returns the json marshalled string of the pool

type UnimplementedMsgCreatorServer

type UnimplementedMsgCreatorServer struct {
}

UnimplementedMsgCreatorServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgCreatorServer) CreateCosmWasmPool

Jump to

Keyboard shortcuts

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