Documentation ¶
Index ¶
- Constants
- Variables
- func NewEth(config *ChainConfig) (repostitory.IChain, error)
- type ChainConfig
- type ContractBindOptsCfg
- type ContractCfg
- type ContractCfgGroup
- type Eth
- func (eth *Eth) ChainName() string
- func (eth *Eth) ChainType() string
- func (eth *Eth) GetBlockHeader(req *repotypes.GetBlockHeaderReq) (tibctypes.Header, error)
- func (eth *Eth) GetBlockTimestamp(height uint64) (uint64, error)
- func (eth *Eth) GetCommitmentsPacket(sourChainName, destChainName string, sequence uint64) error
- func (eth *Eth) GetLatestHeight() (uint64, error)
- func (eth *Eth) GetLightClientConsensusState(string, uint64) (tibctypes.ConsensusState, error)
- func (eth *Eth) GetLightClientDelayHeight(chainName string) (uint64, error)
- func (eth *Eth) GetLightClientDelayTime(chainName string) (uint64, error)
- func (eth *Eth) GetLightClientState(chainName string) (tibctypes.ClientState, error)
- func (eth *Eth) GetPackets(height uint64, destChainType string) (*repotypes.Packets, error)
- func (eth *Eth) GetProof(sourChainName, destChainName string, sequence uint64, height uint64, ...) ([]byte, error)
- func (eth *Eth) GetReceiptPacket(sourChainName, destChainName string, sequence uint64) (bool, error)
- func (eth *Eth) GetResult(hash string) (uint64, error)
- func (eth *Eth) RecvPackets(msgs types.Msgs) (*repotypes.ResultTx, types.Error)
- func (eth *Eth) UpdateClient(header tibctypes.Header, chainName string) (string, error)
- func (eth *Eth) UpdateClientFrequency() uint64
Constants ¶
View Source
const CtxTimeout = 10 * time.Second
View Source
const TryGetGasPriceTimeInterval = 10 * time.Second
Variables ¶
Functions ¶
func NewEth ¶
func NewEth(config *ChainConfig) (repostitory.IChain, error)
Types ¶
type ChainConfig ¶
type ChainConfig struct { ChainType string ChainName string UpdateClientFrequency uint64 ChainURI string ChainID uint64 Slot int64 TipCoefficient float64 ContractCfgGroup *ContractCfgGroup ContractBindOptsCfg *ContractBindOptsCfg }
func NewChainConfig ¶
func NewChainConfig() *ChainConfig
type ContractBindOptsCfg ¶
type ContractBindOptsCfg struct { ClientPrivKey string PacketPrivKey string GasLimit uint64 MaxGasPrice uint64 ChainID uint64 }
func NewContractBindOptsCfg ¶
func NewContractBindOptsCfg() *ContractBindOptsCfg
type ContractCfg ¶
type ContractCfgGroup ¶
type ContractCfgGroup struct { Client ContractCfg Packet ContractCfg AckPacket ContractCfg CleanPacket ContractCfg }
func NewContractCfgGroup ¶
func NewContractCfgGroup() *ContractCfgGroup
type Eth ¶
type Eth struct {
// contains filtered or unexported fields
}
func (*Eth) GetBlockHeader ¶
func (*Eth) GetCommitmentsPacket ¶
func (*Eth) GetLatestHeight ¶
func (*Eth) GetLightClientConsensusState ¶
func (*Eth) GetLightClientDelayHeight ¶
func (*Eth) GetLightClientDelayTime ¶
func (*Eth) GetLightClientState ¶
func (eth *Eth) GetLightClientState(chainName string) (tibctypes.ClientState, error)
func (*Eth) GetPackets ¶
func (*Eth) GetReceiptPacket ¶
func (*Eth) RecvPackets ¶
func (*Eth) UpdateClient ¶
func (*Eth) UpdateClientFrequency ¶
Click to show internal directories.
Click to hide internal directories.