Documentation ¶
Index ¶
- Constants
- Variables
- func FormatPoolsPrefix(poolId uint64) []byte
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- type AccountKeeper
- type BankKeeper
- type ContractKeeper
- type CosmWasmExtension
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type InvalidPoolTypeError
- type MsgClient
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type PoolManagerKeeper
- type PoolNotFoundError
- type UnimplementedMsgServer
- type WasmKeeper
Constants ¶
const ( ModuleName = "cosmwasmpool" StoreKey = ModuleName RouterKey = ModuleName )
Variables ¶
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
var PoolsKey = []byte{0x01}
PoolsKey defines the store key for pools.
Functions ¶
func FormatPoolsPrefix ¶
func RegisterInterfaces ¶ added in v15.8.0
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterMsgServer ¶
Types ¶
type AccountKeeper ¶ added in v15.8.0
type AccountKeeper interface {
GetModuleAddress(moduleName string) sdk.AccAddress
}
AccountKeeper defines the contract needed for AccountKeeper related APIs. Interface provides support to use non-sdk AccountKeeper for AnteHandler's decorators.
type BankKeeper ¶ added in v15.8.0
type BankKeeper interface {
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
}
BankKeeper defines the banking contract that must be fulfilled when creating a x/cosmwasmpool keeper.
type ContractKeeper ¶
type ContractKeeper interface { Instantiate( ctx sdk.Context, codeID uint64, creator, admin sdk.AccAddress, initMsg []byte, label string, deposit sdk.Coins, ) (sdk.AccAddress, []byte, error) Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error) Execute(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, msg []byte, coins sdk.Coins) ([]byte, error) }
ContractKeeper defines the interface needed to be fulfilled for the contract keeper.
type CosmWasmExtension ¶
type CosmWasmExtension interface { poolmanagertypes.PoolI GetCodeId() uint64 GetInstantiateMsg() []byte GetContractAddress() string SetContractAddress(contractAddress string) GetStoreModel() proto.Message SetWasmKeeper(wasmKeeper WasmKeeper) GetTotalPoolLiquidity(ctx sdk.Context) sdk.Coins }
CosmWasmExtension
type GenesisState ¶
type GenesisState struct { // params is the container of cosmwasmpool parameters. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
GenesisState defines the cosmwasmpool module's genesis state.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type InvalidPoolTypeError ¶ added in v15.8.0
type InvalidPoolTypeError struct {
ActualPool interface{}
}
func (InvalidPoolTypeError) Error ¶ added in v15.8.0
func (e InvalidPoolTypeError) Error() string
type MsgClient ¶
type MsgClient interface { }
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 Params ¶
type Params struct { }
Params holds parameters for the cosmwasmpool module
func DefaultParams ¶
func DefaultParams() Params
DefaultParams are the default cosmwasmpool module parameters.
func (*Params) Descriptor ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
Implements params.ParamSet.
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PoolManagerKeeper ¶
type PoolManagerKeeper interface { CreatePool(ctx sdk.Context, msg poolmanagertypes.CreatePoolMsg) (uint64, error) GetNextPoolId(ctx sdk.Context) uint64 }
PoolManagerKeeper defines the interface needed to be fulfilled for the poolmanager keeper.
type PoolNotFoundError ¶ added in v15.8.0
type PoolNotFoundError struct {
PoolId uint64
}
func (PoolNotFoundError) Error ¶ added in v15.8.0
func (e PoolNotFoundError) Error() string
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
type WasmKeeper ¶
type WasmKeeper interface {
QuerySmart(ctx sdk.Context, contractAddress sdk.AccAddress, queryMsg []byte) ([]byte, error)
}
ContractKeeper defines the interface needed to be fulfilled for the WasmKeeper.