Documentation ¶
Index ¶
- Constants
- Variables
- func GetModuleLogger() *log.RelayLogger
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- type Chain
- func (c *Chain) AverageBlockTime() time.Duration
- func (chain *Chain) CallOpts(ctx context.Context, height int64) *bind.CallOpts
- func (c *Chain) ChainID() string
- func (c *Chain) Client() *client.ETHClient
- func (c *Chain) Codec() codec.ProtoCodecMarshaler
- func (c *Chain) Config() ChainConfig
- func (c *Chain) GetAddress() (sdk.AccAddress, error)
- func (c *Chain) GetChainLogger() *log.RelayLogger
- func (chain *Chain) GetChannelLogger() *log.RelayLogger
- func (c *Chain) GetMsgResult(id core.MsgID) (core.MsgResult, error)
- func (c *Chain) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, ...) error
- func (c *Chain) LatestHeight() (ibcexported.Height, error)
- func (c *Chain) Path() *core.PathEnd
- func (c *Chain) QueryBalance(ctx core.QueryContext, address sdk.AccAddress) (sdk.Coins, error)
- func (c *Chain) QueryChannel(ctx core.QueryContext) (chanRes *chantypes.QueryChannelResponse, err error)
- func (c *Chain) QueryClientConsensusState(ctx core.QueryContext, dstClientConsHeight ibcexported.Height) (*clienttypes.QueryConsensusStateResponse, error)
- func (c *Chain) QueryClientState(ctx core.QueryContext) (*clienttypes.QueryClientStateResponse, error)
- func (c *Chain) QueryConnection(ctx core.QueryContext) (*conntypes.QueryConnectionResponse, error)
- func (c *Chain) QueryDenomTraces(ctx core.QueryContext, offset uint64, limit uint64) (*transfertypes.QueryDenomTracesResponse, error)
- func (c *Chain) QueryUnfinalizedRelayAcknowledgements(ctx core.QueryContext, counterparty core.LightClientICS04Querier) (core.PacketInfoList, error)
- func (c *Chain) QueryUnfinalizedRelayPackets(ctx core.QueryContext, counterparty core.LightClientICS04Querier) (core.PacketInfoList, error)
- func (c *Chain) QueryUnreceivedAcknowledgements(ctx core.QueryContext, seqs []uint64) ([]uint64, error)
- func (c *Chain) QueryUnreceivedPackets(ctx core.QueryContext, seqs []uint64) ([]uint64, error)
- func (c *Chain) RegisterMsgEventListener(listener core.MsgEventListener)
- func (c *Chain) SendMsgs(msgs []sdk.Msg) ([]core.MsgID, error)
- func (c *Chain) SetRelayInfo(p *core.PathEnd, _ *core.ProvableChain, _ *core.PathEnd) error
- func (c *Chain) SetupForRelay(ctx context.Context) error
- func (c *Chain) Timestamp(height ibcexported.Height) (time.Time, error)
- func (c *Chain) TxAcknowledgement(opts *bind.TransactOpts, msg *chantypes.MsgAcknowledgement) (*gethtypes.Transaction, error)
- func (c *Chain) TxChannelOpenAck(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenAck) (*gethtypes.Transaction, error)
- func (c *Chain) TxChannelOpenConfirm(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenConfirm) (*gethtypes.Transaction, error)
- func (c *Chain) TxChannelOpenInit(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenInit) (*gethtypes.Transaction, error)
- func (c *Chain) TxChannelOpenTry(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenTry) (*gethtypes.Transaction, error)
- func (c *Chain) TxConnectionOpenAck(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenAck) (*gethtypes.Transaction, error)
- func (c *Chain) TxConnectionOpenConfirm(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenConfirm) (*gethtypes.Transaction, error)
- func (c *Chain) TxConnectionOpenInit(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenInit) (*gethtypes.Transaction, error)
- func (c *Chain) TxConnectionOpenTry(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenTry) (*gethtypes.Transaction, error)
- func (c *Chain) TxCreateClient(opts *bind.TransactOpts, msg *clienttypes.MsgCreateClient) (*gethtypes.Transaction, error)
- func (chain *Chain) TxOpts(ctx context.Context) *bind.TransactOpts
- func (c *Chain) TxRecvPacket(opts *bind.TransactOpts, msg *chantypes.MsgRecvPacket) (*gethtypes.Transaction, error)
- func (c *Chain) TxUpdateClient(opts *bind.TransactOpts, msg *clienttypes.MsgUpdateClient) (*gethtypes.Transaction, error)
- type ChainConfig
- func (c ChainConfig) Build() (core.Chain, error)
- func (*ChainConfig) Descriptor() ([]byte, []int)
- func (c ChainConfig) IBCAddress() common.Address
- func (m *ChainConfig) Marshal() (dAtA []byte, err error)
- func (m *ChainConfig) MarshalTo(dAtA []byte) (int, error)
- func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ChainConfig) ProtoMessage()
- func (m *ChainConfig) Reset()
- func (m *ChainConfig) Size() (n int)
- func (m *ChainConfig) String() string
- func (m *ChainConfig) Unmarshal(dAtA []byte) error
- func (c ChainConfig) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
- func (c ChainConfig) Validate() error
- func (m *ChainConfig) XXX_DiscardUnknown()
- func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChainConfig) XXX_Merge(src proto.Message)
- func (m *ChainConfig) XXX_Size() int
- func (m *ChainConfig) XXX_Unmarshal(b []byte) error
- type Module
- type MsgID
- func (*MsgID) Descriptor() ([]byte, []int)
- func (*MsgID) Is_MsgID()
- func (m *MsgID) Marshal() (dAtA []byte, err error)
- func (m *MsgID) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgID) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgID) ProtoMessage()
- func (m *MsgID) Reset()
- func (m *MsgID) Size() (n int)
- func (m *MsgID) String() string
- func (id *MsgID) TxHash() common.Hash
- func (m *MsgID) Unmarshal(dAtA []byte) error
- func (m *MsgID) XXX_DiscardUnknown()
- func (m *MsgID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgID) XXX_Merge(src proto.Message)
- func (m *MsgID) XXX_Size() int
- func (m *MsgID) XXX_Unmarshal(b []byte) error
- type MsgResult
- type Signer
- type SignerConfig
Constants ¶
const ( PACKET_RECEIPT_NONE uint8 = 0 PACKET_RECEIPT_SUCCESSFUL uint8 = 1 )
const ModuleName = "ethereum.chain"
Variables ¶
Functions ¶
func GetModuleLogger ¶ added in v0.2.5
func GetModuleLogger() *log.RelayLogger
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the module interfaces to protobuf Any.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func NewChain ¶
func NewChain(config ChainConfig) (*Chain, error)
func (*Chain) AverageBlockTime ¶ added in v0.2.4
func (*Chain) Codec ¶
func (c *Chain) Codec() codec.ProtoCodecMarshaler
Marshaler returns the marshaler
func (*Chain) GetAddress ¶
func (c *Chain) GetAddress() (sdk.AccAddress, error)
GetAddress returns the address of relayer
func (*Chain) GetChainLogger ¶ added in v0.2.5
func (c *Chain) GetChainLogger() *log.RelayLogger
func (*Chain) GetChannelLogger ¶ added in v0.2.5
func (chain *Chain) GetChannelLogger() *log.RelayLogger
func (*Chain) GetMsgResult ¶ added in v0.2.4
func (*Chain) Init ¶
func (c *Chain) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, debug bool) error
Init ...
func (*Chain) LatestHeight ¶
func (c *Chain) LatestHeight() (ibcexported.Height, error)
GetLatestHeight gets the chain for the latest height and returns it
func (*Chain) QueryBalance ¶
func (c *Chain) QueryBalance(ctx core.QueryContext, address sdk.AccAddress) (sdk.Coins, error)
QueryBalance returns the amount of coins in the relayer account
func (*Chain) QueryChannel ¶
func (c *Chain) QueryChannel(ctx core.QueryContext) (chanRes *chantypes.QueryChannelResponse, err error)
QueryChannel returns the channel associated with a channelID
func (*Chain) QueryClientConsensusState ¶
func (c *Chain) QueryClientConsensusState(ctx core.QueryContext, dstClientConsHeight ibcexported.Height) (*clienttypes.QueryConsensusStateResponse, error)
QueryClientConsensusState retrevies the latest consensus state for a client in state at a given height
func (*Chain) QueryClientState ¶
func (c *Chain) QueryClientState(ctx core.QueryContext) (*clienttypes.QueryClientStateResponse, error)
QueryClientState returns the client state of dst chain height represents the height of dst chain
func (*Chain) QueryConnection ¶
func (c *Chain) QueryConnection(ctx core.QueryContext) (*conntypes.QueryConnectionResponse, error)
QueryConnection returns the remote end of a given connection
func (*Chain) QueryDenomTraces ¶
func (c *Chain) QueryDenomTraces(ctx core.QueryContext, offset uint64, limit uint64) (*transfertypes.QueryDenomTracesResponse, error)
QueryDenomTraces returns all the denom traces from a given chain
func (*Chain) QueryUnfinalizedRelayAcknowledgements ¶ added in v0.2.1
func (c *Chain) QueryUnfinalizedRelayAcknowledgements(ctx core.QueryContext, counterparty core.LightClientICS04Querier) (core.PacketInfoList, error)
QueryUnfinalizedRelayedAcknowledgements returns acks and heights that are sent but not received at the latest finalized block on the counterpartychain
func (*Chain) QueryUnfinalizedRelayPackets ¶ added in v0.2.1
func (c *Chain) QueryUnfinalizedRelayPackets(ctx core.QueryContext, counterparty core.LightClientICS04Querier) (core.PacketInfoList, error)
QueryUnfinalizedRelayedPackets returns packets and heights that are sent but not received at the latest finalized block on the counterparty chain
func (*Chain) QueryUnreceivedAcknowledgements ¶ added in v0.2.1
func (c *Chain) QueryUnreceivedAcknowledgements(ctx core.QueryContext, seqs []uint64) ([]uint64, error)
QueryUnreceivedAcknowledgements returns a list of unrelayed packet acks
func (*Chain) QueryUnreceivedPackets ¶ added in v0.2.1
QueryUnreceivedPackets returns a list of unrelayed packet commitments
func (*Chain) RegisterMsgEventListener ¶
func (c *Chain) RegisterMsgEventListener(listener core.MsgEventListener)
RegisterMsgEventListener registers a given EventListener to the chain
func (*Chain) SetRelayInfo ¶
SetRelayInfo sets source's path and counterparty's info to the chain
func (*Chain) SetupForRelay ¶
SetupForRelay ...
func (*Chain) TxAcknowledgement ¶
func (c *Chain) TxAcknowledgement(opts *bind.TransactOpts, msg *chantypes.MsgAcknowledgement) (*gethtypes.Transaction, error)
func (*Chain) TxChannelOpenAck ¶
func (c *Chain) TxChannelOpenAck(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenAck) (*gethtypes.Transaction, error)
func (*Chain) TxChannelOpenConfirm ¶
func (c *Chain) TxChannelOpenConfirm(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenConfirm) (*gethtypes.Transaction, error)
func (*Chain) TxChannelOpenInit ¶
func (c *Chain) TxChannelOpenInit(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenInit) (*gethtypes.Transaction, error)
func (*Chain) TxChannelOpenTry ¶
func (c *Chain) TxChannelOpenTry(opts *bind.TransactOpts, msg *chantypes.MsgChannelOpenTry) (*gethtypes.Transaction, error)
func (*Chain) TxConnectionOpenAck ¶
func (c *Chain) TxConnectionOpenAck(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenAck) (*gethtypes.Transaction, error)
func (*Chain) TxConnectionOpenConfirm ¶
func (c *Chain) TxConnectionOpenConfirm(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenConfirm) (*gethtypes.Transaction, error)
func (*Chain) TxConnectionOpenInit ¶
func (c *Chain) TxConnectionOpenInit(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenInit) (*gethtypes.Transaction, error)
func (*Chain) TxConnectionOpenTry ¶
func (c *Chain) TxConnectionOpenTry(opts *bind.TransactOpts, msg *conntypes.MsgConnectionOpenTry) (*gethtypes.Transaction, error)
func (*Chain) TxCreateClient ¶
func (c *Chain) TxCreateClient(opts *bind.TransactOpts, msg *clienttypes.MsgCreateClient) (*gethtypes.Transaction, error)
func (*Chain) TxRecvPacket ¶
func (c *Chain) TxRecvPacket(opts *bind.TransactOpts, msg *chantypes.MsgRecvPacket) (*gethtypes.Transaction, error)
func (*Chain) TxUpdateClient ¶
func (c *Chain) TxUpdateClient(opts *bind.TransactOpts, msg *clienttypes.MsgUpdateClient) (*gethtypes.Transaction, error)
type ChainConfig ¶
type ChainConfig struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` EthChainId uint64 `protobuf:"varint,2,opt,name=eth_chain_id,json=ethChainId,proto3" json:"eth_chain_id,omitempty"` RpcAddr string `protobuf:"bytes,3,opt,name=rpc_addr,json=rpcAddr,proto3" json:"rpc_addr,omitempty"` Signer *types.Any `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` IbcAddress string `protobuf:"bytes,5,opt,name=ibc_address,json=ibcAddress,proto3" json:"ibc_address,omitempty"` InitialSendCheckpoint uint64 `` /* 127-byte string literal not displayed */ InitialRecvCheckpoint uint64 `` /* 127-byte string literal not displayed */ EnableDebugTrace bool `protobuf:"varint,8,opt,name=enable_debug_trace,json=enableDebugTrace,proto3" json:"enable_debug_trace,omitempty"` AverageBlockTimeMsec uint64 `` /* 126-byte string literal not displayed */ MaxRetryForInclusion uint64 `` /* 127-byte string literal not displayed */ }
func (*ChainConfig) Descriptor ¶
func (*ChainConfig) Descriptor() ([]byte, []int)
func (ChainConfig) IBCAddress ¶
func (c ChainConfig) IBCAddress() common.Address
func (*ChainConfig) Marshal ¶
func (m *ChainConfig) Marshal() (dAtA []byte, err error)
func (*ChainConfig) MarshalToSizedBuffer ¶
func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ChainConfig) ProtoMessage ¶
func (*ChainConfig) ProtoMessage()
func (*ChainConfig) Reset ¶
func (m *ChainConfig) Reset()
func (*ChainConfig) Size ¶
func (m *ChainConfig) Size() (n int)
func (*ChainConfig) String ¶
func (m *ChainConfig) String() string
func (*ChainConfig) Unmarshal ¶
func (m *ChainConfig) Unmarshal(dAtA []byte) error
func (ChainConfig) UnpackInterfaces ¶ added in v0.2.8
func (c ChainConfig) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
func (ChainConfig) Validate ¶ added in v0.2.5
func (c ChainConfig) Validate() error
func (*ChainConfig) XXX_DiscardUnknown ¶
func (m *ChainConfig) XXX_DiscardUnknown()
func (*ChainConfig) XXX_Marshal ¶
func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChainConfig) XXX_Merge ¶
func (m *ChainConfig) XXX_Merge(src proto.Message)
func (*ChainConfig) XXX_Size ¶
func (m *ChainConfig) XXX_Size() int
func (*ChainConfig) XXX_Unmarshal ¶
func (m *ChainConfig) XXX_Unmarshal(b []byte) error
type Module ¶
type Module struct{}
func (Module) RegisterInterfaces ¶
func (Module) RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the module interfaces to protobuf Any.
type MsgID ¶ added in v0.2.4
type MsgID struct {
TxHashHex string `protobuf:"bytes,1,opt,name=tx_hash_hex,json=txHashHex,proto3" json:"tx_hash_hex,omitempty"`
}
func (*MsgID) Descriptor ¶ added in v0.2.6
func (*MsgID) MarshalToSizedBuffer ¶ added in v0.2.6
func (*MsgID) ProtoMessage ¶ added in v0.2.6
func (*MsgID) ProtoMessage()
func (*MsgID) XXX_DiscardUnknown ¶ added in v0.2.6
func (m *MsgID) XXX_DiscardUnknown()
func (*MsgID) XXX_Marshal ¶ added in v0.2.6
func (*MsgID) XXX_Unmarshal ¶ added in v0.2.6
type MsgResult ¶ added in v0.2.4
type MsgResult struct {
// contains filtered or unexported fields
}
func (*MsgResult) BlockHeight ¶ added in v0.2.4
func (r *MsgResult) BlockHeight() clienttypes.Height
func (*MsgResult) Events ¶ added in v0.2.4
func (r *MsgResult) Events() []core.MsgEventLog