Documentation ¶
Index ¶
- Constants
- Variables
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- type ChannelKeeper
- type ContractAck
- 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 (gs GenesisState) Validate() 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 IBCAck
- type IBCAckError
- type IBCAckResponse
- type IBCAsync
- type MsgClient
- type MsgEmitIBCAck
- func (*MsgEmitIBCAck) Descriptor() ([]byte, []int)
- func (m *MsgEmitIBCAck) GetChannel() string
- func (m *MsgEmitIBCAck) GetPacketSequence() uint64
- func (m *MsgEmitIBCAck) GetSender() string
- func (m MsgEmitIBCAck) GetSignBytes() []byte
- func (m MsgEmitIBCAck) GetSigners() []sdk.AccAddress
- func (m *MsgEmitIBCAck) Marshal() (dAtA []byte, err error)
- func (m *MsgEmitIBCAck) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgEmitIBCAck) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgEmitIBCAck) ProtoMessage()
- func (m *MsgEmitIBCAck) Reset()
- func (m MsgEmitIBCAck) Route() string
- func (m *MsgEmitIBCAck) Size() (n int)
- func (m *MsgEmitIBCAck) String() string
- func (m MsgEmitIBCAck) Type() string
- func (m *MsgEmitIBCAck) Unmarshal(dAtA []byte) error
- func (m MsgEmitIBCAck) ValidateBasic() error
- func (m *MsgEmitIBCAck) XXX_DiscardUnknown()
- func (m *MsgEmitIBCAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgEmitIBCAck) XXX_Merge(src proto.Message)
- func (m *MsgEmitIBCAck) XXX_Size() int
- func (m *MsgEmitIBCAck) XXX_Unmarshal(b []byte) error
- type MsgEmitIBCAckResponse
- func (*MsgEmitIBCAckResponse) Descriptor() ([]byte, []int)
- func (m *MsgEmitIBCAckResponse) GetContractResult() string
- func (m *MsgEmitIBCAckResponse) GetIbcAck() string
- func (m *MsgEmitIBCAckResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgEmitIBCAckResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgEmitIBCAckResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgEmitIBCAckResponse) ProtoMessage()
- func (m *MsgEmitIBCAckResponse) Reset()
- func (m *MsgEmitIBCAckResponse) Size() (n int)
- func (m *MsgEmitIBCAckResponse) String() string
- func (m *MsgEmitIBCAckResponse) Unmarshal(dAtA []byte) error
- func (m *MsgEmitIBCAckResponse) XXX_DiscardUnknown()
- func (m *MsgEmitIBCAckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgEmitIBCAckResponse) XXX_Merge(src proto.Message)
- func (m *MsgEmitIBCAckResponse) XXX_Size() int
- func (m *MsgEmitIBCAckResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type OnRecvPacketAsyncAckResponse
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetAllowedAsyncAckContracts() []string
- 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 RequestAck
- type RequestAckI
- type UnimplementedMsgServer
Constants ¶
const ( ModuleName = "ibchooks" RouterKey = ModuleName StoreKey = "hooks-for-ibc" // not using the module name because of collisions with key "ibc" IBCCallbackKey = "ibc_callback" IBCAsyncAckKey = "ibc_async_ack" MsgEmitAckKey = "emit_ack" AttributeSender = "sender" AttributeChannel = "channel" AttributePacketSequence = "sequence" SenderPrefix = "ibc-wasm-hook-intermediary" )
const (
TypeMsgEmitIBCAck = "emit-ibc-ack"
)
constants.
Variables ¶
var ( ErrBadMetadataFormatMsg = "wasm metadata not properly formatted for: '%v'. %s" ErrBadExecutionMsg = "cannot execute contract: %v" ErrMsgValidation = errorsmod.Register("wasm-hooks", 2, "error in wasmhook message validation") ErrMarshaling = errorsmod.Register("wasm-hooks", 3, "cannot marshal the ICS20 packet") ErrInvalidPacket = errorsmod.Register("wasm-hooks", 4, "invalid packet data") ErrBadResponse = errorsmod.Register("wasm-hooks", 5, "cannot create response") ErrWasmError = errorsmod.Register("wasm-hooks", 6, "wasm error") ErrBadSender = errorsmod.Register("wasm-hooks", 7, "bad sender") ErrAckFromContract = errorsmod.Register("wasm-hooks", 8, "contract returned error ack") ErrAsyncAckNotAllowed = errorsmod.Register("wasm-hooks", 9, "contract not allowed to send async acks") ErrAckPacketMismatch = errorsmod.Register("wasm-hooks", 10, "packet does not match the expected packet") ErrInvalidContractAddr = errorsmod.Register("wasm-hooks", 11, "invalid contract address") )
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 ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = 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 (
KeyAsyncAckAllowList = []byte("AsyncAckAllowList")
)
Parameter store keys.
var (
ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
Functions ¶
func ParamKeyTable ¶ added in v0.0.8
func ParamKeyTable() paramtypes.KeyTable
func RegisterCodec ¶ added in v0.0.8
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶ added in v0.0.8
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgServer ¶ added in v0.0.8
Types ¶
type ChannelKeeper ¶ added in v0.0.8
type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetPacketCommitment(ctx sdk.Context, portID, channelID string, sequence uint64) []byte GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) LookupModuleByChannel(ctx sdk.Context, portID, channelID string) (string, *capabilitytypes.Capability, error) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, acknowledgement exported.Acknowledgement) error }
type ContractAck ¶ added in v0.0.8
type ContractAck struct { ContractResult []byte `json:"contract_result"` IbcAck []byte `json:"ibc_ack"` }
ContractAck is the response to be stored when a wasm hook is executed
type GenesisState ¶ added in v0.0.8
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
func DefaultGenesis ¶ added in v0.0.8
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default GenesisState for the concentrated-liquidity module.
func (*GenesisState) Descriptor ¶ added in v0.0.8
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶ added in v0.0.8
func (m *GenesisState) GetParams() Params
func (*GenesisState) Marshal ¶ added in v0.0.8
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalTo ¶ added in v0.0.8
func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
func (*GenesisState) MarshalToSizedBuffer ¶ added in v0.0.8
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶ added in v0.0.8
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶ added in v0.0.8
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶ added in v0.0.8
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶ added in v0.0.8
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶ added in v0.0.8
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) Validate ¶ added in v0.0.8
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
func (*GenesisState) XXX_DiscardUnknown ¶ added in v0.0.8
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶ added in v0.0.8
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶ added in v0.0.8
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶ added in v0.0.8
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶ added in v0.0.8
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type IBCAck ¶ added in v0.0.8
type IBCAck struct { Type string `json:"type"` Content json.RawMessage `json:"content"` // Note: These two fields have to be pointers so that they can be null // If they are not pointers, they will be empty structs when null, // which will cause issues with json.Unmarshal. AckResponse *IBCAckResponse `json:"response,omitempty"` AckError *IBCAckError `json:"error,omitempty"` }
func UnmarshalIBCAck ¶ added in v0.0.8
type IBCAckError ¶ added in v0.0.8
type IBCAckError struct { Packet channeltypes.Packet `json:"packet"` ErrorDescription string `json:"error_description"` ErrorResponse string `json:"error_response"` }
IBCAckError is the error that a contract returns from the sudo() call on RequestAck
type IBCAckResponse ¶ added in v0.0.8
type IBCAckResponse struct { Packet channeltypes.Packet `json:"packet"` ContractAck ContractAck `json:"contract_ack"` }
IBCAckResponse is the response that a contract returns from the sudo() call on OnRecvPacket or RequestAck
type IBCAsync ¶ added in v0.0.8
type IBCAsync struct {
RequestAck `json:"ibc_async"`
}
IBCAsync is the sudo message to be sent to the contract for it to generate an ack for a sent packet
type MsgClient ¶ added in v0.0.8
type MsgClient interface { // EmitIBCAck checks the sender can emit the ack and writes the IBC // acknowledgement EmitIBCAck(ctx context.Context, in *MsgEmitIBCAck, opts ...grpc.CallOption) (*MsgEmitIBCAckResponse, 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 ¶ added in v0.0.8
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgEmitIBCAck ¶ added in v0.0.8
type MsgEmitIBCAck struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` PacketSequence uint64 `` /* 127-byte string literal not displayed */ Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty" yaml:"channel"` }
func (*MsgEmitIBCAck) Descriptor ¶ added in v0.0.8
func (*MsgEmitIBCAck) Descriptor() ([]byte, []int)
func (*MsgEmitIBCAck) GetChannel ¶ added in v0.0.8
func (m *MsgEmitIBCAck) GetChannel() string
func (*MsgEmitIBCAck) GetPacketSequence ¶ added in v0.0.8
func (m *MsgEmitIBCAck) GetPacketSequence() uint64
func (*MsgEmitIBCAck) GetSender ¶ added in v0.0.8
func (m *MsgEmitIBCAck) GetSender() string
func (MsgEmitIBCAck) GetSignBytes ¶ added in v0.0.8
func (m MsgEmitIBCAck) GetSignBytes() []byte
func (MsgEmitIBCAck) GetSigners ¶ added in v0.0.8
func (m MsgEmitIBCAck) GetSigners() []sdk.AccAddress
func (*MsgEmitIBCAck) Marshal ¶ added in v0.0.8
func (m *MsgEmitIBCAck) Marshal() (dAtA []byte, err error)
func (*MsgEmitIBCAck) MarshalTo ¶ added in v0.0.8
func (m *MsgEmitIBCAck) MarshalTo(dAtA []byte) (int, error)
func (*MsgEmitIBCAck) MarshalToSizedBuffer ¶ added in v0.0.8
func (m *MsgEmitIBCAck) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgEmitIBCAck) ProtoMessage ¶ added in v0.0.8
func (*MsgEmitIBCAck) ProtoMessage()
func (*MsgEmitIBCAck) Reset ¶ added in v0.0.8
func (m *MsgEmitIBCAck) Reset()
func (MsgEmitIBCAck) Route ¶ added in v0.0.8
func (m MsgEmitIBCAck) Route() string
func (*MsgEmitIBCAck) Size ¶ added in v0.0.8
func (m *MsgEmitIBCAck) Size() (n int)
func (*MsgEmitIBCAck) String ¶ added in v0.0.8
func (m *MsgEmitIBCAck) String() string
func (MsgEmitIBCAck) Type ¶ added in v0.0.8
func (m MsgEmitIBCAck) Type() string
func (*MsgEmitIBCAck) Unmarshal ¶ added in v0.0.8
func (m *MsgEmitIBCAck) Unmarshal(dAtA []byte) error
func (MsgEmitIBCAck) ValidateBasic ¶ added in v0.0.8
func (m MsgEmitIBCAck) ValidateBasic() error
func (*MsgEmitIBCAck) XXX_DiscardUnknown ¶ added in v0.0.8
func (m *MsgEmitIBCAck) XXX_DiscardUnknown()
func (*MsgEmitIBCAck) XXX_Marshal ¶ added in v0.0.8
func (m *MsgEmitIBCAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgEmitIBCAck) XXX_Merge ¶ added in v0.0.8
func (m *MsgEmitIBCAck) XXX_Merge(src proto.Message)
func (*MsgEmitIBCAck) XXX_Size ¶ added in v0.0.8
func (m *MsgEmitIBCAck) XXX_Size() int
func (*MsgEmitIBCAck) XXX_Unmarshal ¶ added in v0.0.8
func (m *MsgEmitIBCAck) XXX_Unmarshal(b []byte) error
type MsgEmitIBCAckResponse ¶ added in v0.0.8
type MsgEmitIBCAckResponse struct { ContractResult string `` /* 126-byte string literal not displayed */ IbcAck string `protobuf:"bytes,2,opt,name=ibc_ack,json=ibcAck,proto3" json:"ibc_ack,omitempty" yaml:"ibc_ack"` }
func (*MsgEmitIBCAckResponse) Descriptor ¶ added in v0.0.8
func (*MsgEmitIBCAckResponse) Descriptor() ([]byte, []int)
func (*MsgEmitIBCAckResponse) GetContractResult ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) GetContractResult() string
func (*MsgEmitIBCAckResponse) GetIbcAck ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) GetIbcAck() string
func (*MsgEmitIBCAckResponse) Marshal ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) Marshal() (dAtA []byte, err error)
func (*MsgEmitIBCAckResponse) MarshalTo ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgEmitIBCAckResponse) MarshalToSizedBuffer ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgEmitIBCAckResponse) ProtoMessage ¶ added in v0.0.8
func (*MsgEmitIBCAckResponse) ProtoMessage()
func (*MsgEmitIBCAckResponse) Reset ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) Reset()
func (*MsgEmitIBCAckResponse) Size ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) Size() (n int)
func (*MsgEmitIBCAckResponse) String ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) String() string
func (*MsgEmitIBCAckResponse) Unmarshal ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) Unmarshal(dAtA []byte) error
func (*MsgEmitIBCAckResponse) XXX_DiscardUnknown ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) XXX_DiscardUnknown()
func (*MsgEmitIBCAckResponse) XXX_Marshal ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgEmitIBCAckResponse) XXX_Merge ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) XXX_Merge(src proto.Message)
func (*MsgEmitIBCAckResponse) XXX_Size ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) XXX_Size() int
func (*MsgEmitIBCAckResponse) XXX_Unmarshal ¶ added in v0.0.8
func (m *MsgEmitIBCAckResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶ added in v0.0.8
type MsgServer interface { // EmitIBCAck checks the sender can emit the ack and writes the IBC // acknowledgement EmitIBCAck(context.Context, *MsgEmitIBCAck) (*MsgEmitIBCAckResponse, error) }
MsgServer is the server API for Msg service.
type OnRecvPacketAsyncAckResponse ¶ added in v0.0.8
type OnRecvPacketAsyncAckResponse struct {
IsAsyncAck bool `json:"is_async_ack"`
}
OnRecvPacketAsyncAckResponse the response a contract sends to instruct the module to make the ack async
type Params ¶ added in v0.0.8
type Params struct {
AllowedAsyncAckContracts []string `` /* 172-byte string literal not displayed */
}
func DefaultParams ¶ added in v0.0.8
func DefaultParams() Params
DefaultParams returns default concentrated-liquidity module parameters.
func (*Params) Descriptor ¶ added in v0.0.8
func (*Params) GetAllowedAsyncAckContracts ¶ added in v0.0.8
func (*Params) MarshalToSizedBuffer ¶ added in v0.0.8
func (*Params) ParamSetPairs ¶ added in v0.0.8
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs implements params.ParamSet.
func (*Params) ProtoMessage ¶ added in v0.0.8
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶ added in v0.0.8
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶ added in v0.0.8
func (*Params) XXX_Unmarshal ¶ added in v0.0.8
type RequestAck ¶ added in v0.0.8
type RequestAck struct {
RequestAckI `json:"request_ack"`
}
RequestAck internals of IBCAsync
type RequestAckI ¶ added in v0.0.8
type RequestAckI struct { PacketSequence uint64 `json:"packet_sequence"` SourceChannel string `json:"source_channel"` }
RequestAckI internals of IBCAsync
type UnimplementedMsgServer ¶ added in v0.0.8
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) EmitIBCAck ¶ added in v0.0.8
func (*UnimplementedMsgServer) EmitIBCAck(ctx context.Context, req *MsgEmitIBCAck) (*MsgEmitIBCAckResponse, error)