Documentation ¶
Index ¶
- Constants
- Variables
- type AccountKeeper
- type Amount
- type ClientKeeper
- type EVMKeeper
- type EventAckPacket
- func (*EventAckPacket) Descriptor() ([]byte, []int)
- func (m *EventAckPacket) GetAmount() []byte
- func (m *EventAckPacket) GetDestChain() string
- func (m *EventAckPacket) GetReceiver() string
- func (m *EventAckPacket) GetResult() []byte
- func (m *EventAckPacket) GetSender() string
- func (m *EventAckPacket) GetSrcChain() string
- func (m *EventAckPacket) GetToken() string
- func (m *EventAckPacket) Marshal() (dAtA []byte, err error)
- func (m *EventAckPacket) MarshalTo(dAtA []byte) (int, error)
- func (m *EventAckPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventAckPacket) ProtoMessage()
- func (m *EventAckPacket) Reset()
- func (m *EventAckPacket) Size() (n int)
- func (m *EventAckPacket) String() string
- func (m *EventAckPacket) Unmarshal(dAtA []byte) error
- func (m *EventAckPacket) XXX_DiscardUnknown()
- func (m *EventAckPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventAckPacket) XXX_Merge(src proto.Message)
- func (m *EventAckPacket) XXX_Size() int
- func (m *EventAckPacket) XXX_Unmarshal(b []byte) error
- type EventRecvPacket
- func (*EventRecvPacket) Descriptor() ([]byte, []int)
- func (m *EventRecvPacket) GetAmount() []byte
- func (m *EventRecvPacket) GetDestChain() string
- func (m *EventRecvPacket) GetMessage() string
- func (m *EventRecvPacket) GetReceiver() string
- func (m *EventRecvPacket) GetResult() []byte
- func (m *EventRecvPacket) GetSender() string
- func (m *EventRecvPacket) GetSrcChain() string
- func (m *EventRecvPacket) GetToken() string
- func (m *EventRecvPacket) Marshal() (dAtA []byte, err error)
- func (m *EventRecvPacket) MarshalTo(dAtA []byte) (int, error)
- func (m *EventRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EventRecvPacket) ProtoMessage()
- func (m *EventRecvPacket) Reset()
- func (m *EventRecvPacket) Size() (n int)
- func (m *EventRecvPacket) String() string
- func (m *EventRecvPacket) Unmarshal(dAtA []byte) error
- func (m *EventRecvPacket) XXX_DiscardUnknown()
- func (m *EventRecvPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EventRecvPacket) XXX_Merge(src proto.Message)
- func (m *EventRecvPacket) XXX_Size() int
- func (m *EventRecvPacket) XXX_Unmarshal(b []byte) error
- type Fee
- type FungibleTokenPacketData
- func (data *FungibleTokenPacketData) DecodeBytes(bz []byte) error
- func (*FungibleTokenPacketData) Descriptor() ([]byte, []int)
- func (m *FungibleTokenPacketData) GetAmount() []byte
- func (data FungibleTokenPacketData) GetBytes() ([]byte, error)
- func (m *FungibleTokenPacketData) GetDestChain() string
- func (m *FungibleTokenPacketData) GetOriToken() string
- func (m *FungibleTokenPacketData) GetReceiver() string
- func (m *FungibleTokenPacketData) GetSender() string
- func (m *FungibleTokenPacketData) GetSequence() uint64
- func (m *FungibleTokenPacketData) GetSrcChain() string
- func (m *FungibleTokenPacketData) GetToken() string
- func (m *FungibleTokenPacketData) Marshal() (dAtA []byte, err error)
- func (m *FungibleTokenPacketData) MarshalTo(dAtA []byte) (int, error)
- func (m *FungibleTokenPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FungibleTokenPacketData) ProtoMessage()
- func (m *FungibleTokenPacketData) Reset()
- func (m *FungibleTokenPacketData) Size() (n int)
- func (m *FungibleTokenPacketData) String() string
- func (m *FungibleTokenPacketData) Unmarshal(dAtA []byte) error
- func (data FungibleTokenPacketData) ValidateBasic() error
- func (m *FungibleTokenPacketData) XXX_DiscardUnknown()
- func (m *FungibleTokenPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FungibleTokenPacketData) XXX_Merge(src proto.Message)
- func (m *FungibleTokenPacketData) XXX_Size() int
- func (m *FungibleTokenPacketData) XXX_Unmarshal(b []byte) error
- type PacketKeeper
- type TransferData
- type TransferEventSendPacketData
Constants ¶
View Source
const ( // ModuleName defines the XIBC transfer name ModuleName = "FT" // PortID is the default port id that transfer module binds to PortID = ModuleName )
View Source
const (
TransferEventSendPacket = "SendPacket"
)
Variables ¶
View Source
var ( ErrInvalidPacket = sdkerrors.Register(ModuleName, 2, "invalid packet") ErrABIPack = sdkerrors.Register(ModuleName, 3, "contract ABI pack failed") ErrScChainEqualToDestChain = sdkerrors.Register(ModuleName, 4, "source chain equals to destination chain") ErrInvalidSequence = sdkerrors.Register(ModuleName, 5, "invalid sequence") ErrInvalidSrcChain = sdkerrors.Register(ModuleName, 6, "invalid source chain") ErrInvalidDestChain = sdkerrors.Register(ModuleName, 7, "invalid destination chain") ErrInvalidSender = sdkerrors.Register(ModuleName, 8, "invalid sender") ErrInvalidAddress = sdkerrors.Register(ModuleName, 9, "invalid address") )
View Source
var ( ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") )
View Source
var ( TupleFTPacketData abi.Type TupleTransferEventSendPacketData abi.Type )
View Source
var ( ErrInvalidLengthTransfer = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTransfer = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTransfer = fmt.Errorf("proto: unexpected end of group") )
View Source
var ( // ModuleAddress is the native module address for EVM // 0xDE152Fc3Bc10A8878677FD17c44aE633D9EBF737 ModuleAddress common.Address )
View Source
var (
ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
)
Functions ¶
This section is empty.
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetSequence(sdk.Context, sdk.AccAddress) (uint64, error) }
AccountKeeper defines the expected account keeper
type ClientKeeper ¶
ClientKeeper defines the expected client keeper
type EVMKeeper ¶
type EVMKeeper interface { ChainID() *big.Int GetNonce(ctx sdk.Context, addr common.Address) uint64 ApplyMessage(ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool) (*types.MsgEthereumTxResponse, error) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*types.MsgEthereumTxResponse, error) EstimateGas(c context.Context, req *types.EthCallRequest) (*types.EstimateGasResponse, error) }
EVMKeeper defines the expected EVM keeper interface used on xibc-transfer
type EventAckPacket ¶
type EventAckPacket struct { SrcChain string `protobuf:"bytes,1,opt,name=src_chain,json=srcChain,proto3" json:"src_chain,omitempty"` DestChain string `protobuf:"bytes,2,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` Amount []byte `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` Result []byte `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"` }
EventAckPacket is emitted on acknowledgement packet
func (*EventAckPacket) Descriptor ¶
func (*EventAckPacket) Descriptor() ([]byte, []int)
func (*EventAckPacket) GetAmount ¶
func (m *EventAckPacket) GetAmount() []byte
func (*EventAckPacket) GetDestChain ¶
func (m *EventAckPacket) GetDestChain() string
func (*EventAckPacket) GetReceiver ¶
func (m *EventAckPacket) GetReceiver() string
func (*EventAckPacket) GetResult ¶
func (m *EventAckPacket) GetResult() []byte
func (*EventAckPacket) GetSender ¶
func (m *EventAckPacket) GetSender() string
func (*EventAckPacket) GetSrcChain ¶
func (m *EventAckPacket) GetSrcChain() string
func (*EventAckPacket) GetToken ¶
func (m *EventAckPacket) GetToken() string
func (*EventAckPacket) Marshal ¶
func (m *EventAckPacket) Marshal() (dAtA []byte, err error)
func (*EventAckPacket) MarshalToSizedBuffer ¶
func (m *EventAckPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventAckPacket) ProtoMessage ¶
func (*EventAckPacket) ProtoMessage()
func (*EventAckPacket) Reset ¶
func (m *EventAckPacket) Reset()
func (*EventAckPacket) Size ¶
func (m *EventAckPacket) Size() (n int)
func (*EventAckPacket) String ¶
func (m *EventAckPacket) String() string
func (*EventAckPacket) Unmarshal ¶
func (m *EventAckPacket) Unmarshal(dAtA []byte) error
func (*EventAckPacket) XXX_DiscardUnknown ¶
func (m *EventAckPacket) XXX_DiscardUnknown()
func (*EventAckPacket) XXX_Marshal ¶
func (m *EventAckPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventAckPacket) XXX_Merge ¶
func (m *EventAckPacket) XXX_Merge(src proto.Message)
func (*EventAckPacket) XXX_Size ¶
func (m *EventAckPacket) XXX_Size() int
func (*EventAckPacket) XXX_Unmarshal ¶
func (m *EventAckPacket) XXX_Unmarshal(b []byte) error
type EventRecvPacket ¶
type EventRecvPacket struct { SrcChain string `protobuf:"bytes,1,opt,name=src_chain,json=srcChain,proto3" json:"src_chain,omitempty"` DestChain string `protobuf:"bytes,2,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` Amount []byte `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` Result []byte `protobuf:"bytes,7,opt,name=result,proto3" json:"result,omitempty"` Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` }
EventRecvPacket is emitted on receive packet
func (*EventRecvPacket) Descriptor ¶
func (*EventRecvPacket) Descriptor() ([]byte, []int)
func (*EventRecvPacket) GetAmount ¶
func (m *EventRecvPacket) GetAmount() []byte
func (*EventRecvPacket) GetDestChain ¶
func (m *EventRecvPacket) GetDestChain() string
func (*EventRecvPacket) GetMessage ¶
func (m *EventRecvPacket) GetMessage() string
func (*EventRecvPacket) GetReceiver ¶
func (m *EventRecvPacket) GetReceiver() string
func (*EventRecvPacket) GetResult ¶
func (m *EventRecvPacket) GetResult() []byte
func (*EventRecvPacket) GetSender ¶
func (m *EventRecvPacket) GetSender() string
func (*EventRecvPacket) GetSrcChain ¶
func (m *EventRecvPacket) GetSrcChain() string
func (*EventRecvPacket) GetToken ¶
func (m *EventRecvPacket) GetToken() string
func (*EventRecvPacket) Marshal ¶
func (m *EventRecvPacket) Marshal() (dAtA []byte, err error)
func (*EventRecvPacket) MarshalToSizedBuffer ¶
func (m *EventRecvPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EventRecvPacket) ProtoMessage ¶
func (*EventRecvPacket) ProtoMessage()
func (*EventRecvPacket) Reset ¶
func (m *EventRecvPacket) Reset()
func (*EventRecvPacket) Size ¶
func (m *EventRecvPacket) Size() (n int)
func (*EventRecvPacket) String ¶
func (m *EventRecvPacket) String() string
func (*EventRecvPacket) Unmarshal ¶
func (m *EventRecvPacket) Unmarshal(dAtA []byte) error
func (*EventRecvPacket) XXX_DiscardUnknown ¶
func (m *EventRecvPacket) XXX_DiscardUnknown()
func (*EventRecvPacket) XXX_Marshal ¶
func (m *EventRecvPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EventRecvPacket) XXX_Merge ¶
func (m *EventRecvPacket) XXX_Merge(src proto.Message)
func (*EventRecvPacket) XXX_Size ¶
func (m *EventRecvPacket) XXX_Size() int
func (*EventRecvPacket) XXX_Unmarshal ¶
func (m *EventRecvPacket) XXX_Unmarshal(b []byte) error
type FungibleTokenPacketData ¶
type FungibleTokenPacketData struct { SrcChain string `protobuf:"bytes,1,opt,name=src_chain,json=srcChain,proto3" json:"src_chain,omitempty"` DestChain string `protobuf:"bytes,2,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"` Amount []byte `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"` Token string `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"` OriToken string `protobuf:"bytes,8,opt,name=ori_token,json=oriToken,proto3" json:"ori_token,omitempty"` }
FungibleTokenPacketData defines a struct for the packet payload
func NewFungibleTokenPacketData ¶
func NewFungibleTokenPacketData( srcChain string, destChain string, sequence uint64, sender string, receiver string, amount []byte, token string, oriToken string, ) FungibleTokenPacketData
NewFungibleTokenPacketData contructs a new FungibleTokenPacketData instance
func (*FungibleTokenPacketData) DecodeBytes ¶
func (data *FungibleTokenPacketData) DecodeBytes(bz []byte) error
func (*FungibleTokenPacketData) Descriptor ¶
func (*FungibleTokenPacketData) Descriptor() ([]byte, []int)
func (*FungibleTokenPacketData) GetAmount ¶
func (m *FungibleTokenPacketData) GetAmount() []byte
func (FungibleTokenPacketData) GetBytes ¶
func (data FungibleTokenPacketData) GetBytes() ([]byte, error)
GetBytes is a helper for serialising
func (*FungibleTokenPacketData) GetDestChain ¶
func (m *FungibleTokenPacketData) GetDestChain() string
func (*FungibleTokenPacketData) GetOriToken ¶
func (m *FungibleTokenPacketData) GetOriToken() string
func (*FungibleTokenPacketData) GetReceiver ¶
func (m *FungibleTokenPacketData) GetReceiver() string
func (*FungibleTokenPacketData) GetSender ¶
func (m *FungibleTokenPacketData) GetSender() string
func (*FungibleTokenPacketData) GetSequence ¶
func (m *FungibleTokenPacketData) GetSequence() uint64
func (*FungibleTokenPacketData) GetSrcChain ¶
func (m *FungibleTokenPacketData) GetSrcChain() string
func (*FungibleTokenPacketData) GetToken ¶
func (m *FungibleTokenPacketData) GetToken() string
func (*FungibleTokenPacketData) Marshal ¶
func (m *FungibleTokenPacketData) Marshal() (dAtA []byte, err error)
func (*FungibleTokenPacketData) MarshalTo ¶
func (m *FungibleTokenPacketData) MarshalTo(dAtA []byte) (int, error)
func (*FungibleTokenPacketData) MarshalToSizedBuffer ¶
func (m *FungibleTokenPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FungibleTokenPacketData) ProtoMessage ¶
func (*FungibleTokenPacketData) ProtoMessage()
func (*FungibleTokenPacketData) Reset ¶
func (m *FungibleTokenPacketData) Reset()
func (*FungibleTokenPacketData) Size ¶
func (m *FungibleTokenPacketData) Size() (n int)
func (*FungibleTokenPacketData) String ¶
func (m *FungibleTokenPacketData) String() string
func (*FungibleTokenPacketData) Unmarshal ¶
func (m *FungibleTokenPacketData) Unmarshal(dAtA []byte) error
func (FungibleTokenPacketData) ValidateBasic ¶
func (data FungibleTokenPacketData) ValidateBasic() error
ValidateBasic is used for validating the ft transfer.
func (*FungibleTokenPacketData) XXX_DiscardUnknown ¶
func (m *FungibleTokenPacketData) XXX_DiscardUnknown()
func (*FungibleTokenPacketData) XXX_Marshal ¶
func (m *FungibleTokenPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FungibleTokenPacketData) XXX_Merge ¶
func (m *FungibleTokenPacketData) XXX_Merge(src proto.Message)
func (*FungibleTokenPacketData) XXX_Size ¶
func (m *FungibleTokenPacketData) XXX_Size() int
func (*FungibleTokenPacketData) XXX_Unmarshal ¶
func (m *FungibleTokenPacketData) XXX_Unmarshal(b []byte) error
type PacketKeeper ¶
type PacketKeeper interface { GetNextSequenceSend(ctx sdk.Context, sourceChain, destChain string) uint64 SendPacket(ctx sdk.Context, packet exported.PacketI) error }
PacketKeeper defines the expected packet keeper
type TransferData ¶
type TransferEventSendPacketData ¶
type TransferEventSendPacketData struct { SrcChain string `json:"srcChain"` DestChain string `json:"destChain"` RelayChain string `json:"relayChain"` Sequence uint64 `json:"sequence"` Sender string `json:"sender"` Receiver string `json:"receiver"` Amount *big.Int `json:"amount"` Token string `json:"token"` OriToken string `json:"oriToken"` }
func (*TransferEventSendPacketData) DecodeBytes ¶
func (data *TransferEventSendPacketData) DecodeBytes(bz []byte) error
func (*TransferEventSendPacketData) DecodeInterface ¶
func (data *TransferEventSendPacketData) DecodeInterface(bz interface{}) error
Click to show internal directories.
Click to hide internal directories.