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) 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 Msg_serviceDesc = _Msg_serviceDesc
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgServer ¶
Types ¶
type ChannelKeeper ¶
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 ¶
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 ¶
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
func DefaultGenesis ¶
func DefaultGenesis() *GenesisState
DefaultGenesis returns the default GenesisState for the concentrated-liquidity module.
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) Validate ¶
func (gs GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any failure.
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 IBCAck ¶
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 ¶
type IBCAckError ¶
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 ¶
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 ¶
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 ¶
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 ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgEmitIBCAck ¶
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 ¶
func (*MsgEmitIBCAck) Descriptor() ([]byte, []int)
func (*MsgEmitIBCAck) GetChannel ¶
func (m *MsgEmitIBCAck) GetChannel() string
func (*MsgEmitIBCAck) GetPacketSequence ¶
func (m *MsgEmitIBCAck) GetPacketSequence() uint64
func (*MsgEmitIBCAck) GetSender ¶
func (m *MsgEmitIBCAck) GetSender() string
func (MsgEmitIBCAck) GetSigners ¶
func (m MsgEmitIBCAck) GetSigners() []sdk.AccAddress
func (*MsgEmitIBCAck) Marshal ¶
func (m *MsgEmitIBCAck) Marshal() (dAtA []byte, err error)
func (*MsgEmitIBCAck) MarshalToSizedBuffer ¶
func (m *MsgEmitIBCAck) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgEmitIBCAck) ProtoMessage ¶
func (*MsgEmitIBCAck) ProtoMessage()
func (*MsgEmitIBCAck) Reset ¶
func (m *MsgEmitIBCAck) Reset()
func (MsgEmitIBCAck) Route ¶
func (m MsgEmitIBCAck) Route() string
func (*MsgEmitIBCAck) Size ¶
func (m *MsgEmitIBCAck) Size() (n int)
func (*MsgEmitIBCAck) String ¶
func (m *MsgEmitIBCAck) String() string
func (MsgEmitIBCAck) Type ¶
func (m MsgEmitIBCAck) Type() string
func (*MsgEmitIBCAck) Unmarshal ¶
func (m *MsgEmitIBCAck) Unmarshal(dAtA []byte) error
func (MsgEmitIBCAck) ValidateBasic ¶
func (m MsgEmitIBCAck) ValidateBasic() error
func (*MsgEmitIBCAck) XXX_DiscardUnknown ¶
func (m *MsgEmitIBCAck) XXX_DiscardUnknown()
func (*MsgEmitIBCAck) XXX_Marshal ¶
func (m *MsgEmitIBCAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgEmitIBCAck) XXX_Merge ¶
func (m *MsgEmitIBCAck) XXX_Merge(src proto.Message)
func (*MsgEmitIBCAck) XXX_Size ¶
func (m *MsgEmitIBCAck) XXX_Size() int
func (*MsgEmitIBCAck) XXX_Unmarshal ¶
func (m *MsgEmitIBCAck) XXX_Unmarshal(b []byte) error
type MsgEmitIBCAckResponse ¶
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 ¶
func (*MsgEmitIBCAckResponse) Descriptor() ([]byte, []int)
func (*MsgEmitIBCAckResponse) GetContractResult ¶
func (m *MsgEmitIBCAckResponse) GetContractResult() string
func (*MsgEmitIBCAckResponse) GetIbcAck ¶
func (m *MsgEmitIBCAckResponse) GetIbcAck() string
func (*MsgEmitIBCAckResponse) Marshal ¶
func (m *MsgEmitIBCAckResponse) Marshal() (dAtA []byte, err error)
func (*MsgEmitIBCAckResponse) MarshalTo ¶
func (m *MsgEmitIBCAckResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgEmitIBCAckResponse) MarshalToSizedBuffer ¶
func (m *MsgEmitIBCAckResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgEmitIBCAckResponse) ProtoMessage ¶
func (*MsgEmitIBCAckResponse) ProtoMessage()
func (*MsgEmitIBCAckResponse) Reset ¶
func (m *MsgEmitIBCAckResponse) Reset()
func (*MsgEmitIBCAckResponse) Size ¶
func (m *MsgEmitIBCAckResponse) Size() (n int)
func (*MsgEmitIBCAckResponse) String ¶
func (m *MsgEmitIBCAckResponse) String() string
func (*MsgEmitIBCAckResponse) Unmarshal ¶
func (m *MsgEmitIBCAckResponse) Unmarshal(dAtA []byte) error
func (*MsgEmitIBCAckResponse) XXX_DiscardUnknown ¶
func (m *MsgEmitIBCAckResponse) XXX_DiscardUnknown()
func (*MsgEmitIBCAckResponse) XXX_Marshal ¶
func (m *MsgEmitIBCAckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgEmitIBCAckResponse) XXX_Merge ¶
func (m *MsgEmitIBCAckResponse) XXX_Merge(src proto.Message)
func (*MsgEmitIBCAckResponse) XXX_Size ¶
func (m *MsgEmitIBCAckResponse) XXX_Size() int
func (*MsgEmitIBCAckResponse) XXX_Unmarshal ¶
func (m *MsgEmitIBCAckResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
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 ¶
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 ¶
type Params struct {
// List of contract addresses allowed to send asynchronous acknowledgments.
AllowedAsyncAckContracts []string `` /* 172-byte string literal not displayed */
}
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns default ibc-hooks module parameters.
func (*Params) Descriptor ¶
func (*Params) GetAllowedAsyncAckContracts ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
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 RequestAck ¶
type RequestAck struct {
RequestAckI `json:"request_ack"`
}
RequestAck internals of IBCAsync
type RequestAckI ¶
type RequestAckI struct {
PacketSequence uint64 `json:"packet_sequence"`
SourceChannel string `json:"source_channel"`
}
RequestAckI internals of IBCAsync
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct {
}
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) EmitIBCAck ¶
func (*UnimplementedMsgServer) EmitIBCAck(ctx context.Context, req *MsgEmitIBCAck) (*MsgEmitIBCAckResponse, error)