ethermint

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const CtxTimeout = 10 * time.Second
View Source
const TryGetGasPriceTimeInterval = 10 * time.Second

Variables

View Source
var (
	Uint64, _  = abi.NewType("uint64", "", nil)
	Bytes32, _ = abi.NewType("bytes32", "", nil)
	Bytes, _   = abi.NewType("bytes", "", nil)
	String, _  = abi.NewType("string", "", nil)
)
View Source
var (
	KeyPrefixStorage = []byte{prefixStorage}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Tendermint *TendermintConfig
	Eth        *EthChainConfig
}

func NewConfig

func NewConfig() *Config

type ContractBindOptsCfg

type ContractBindOptsCfg struct {
	ClientPrivKey string
	PacketPrivKey string
	GasLimit      uint64
	MaxGasPrice   uint64
	ChainID       uint64
}

func NewContractBindOptsCfg

func NewContractBindOptsCfg() *ContractBindOptsCfg

type ContractCfg

type ContractCfg struct {
	Addr       string
	Topic      string
	OptPrivKey string
}

type ContractCfgGroup

type ContractCfgGroup struct {
	Client      ContractCfg
	Packet      ContractCfg
	AckPacket   ContractCfg
	CleanPacket ContractCfg
}

func NewContractCfgGroup

func NewContractCfgGroup() *ContractCfgGroup

type EthChainConfig

type EthChainConfig struct {
	ChainURI string

	Slot           int64
	TipCoefficient float64

	ContractCfgGroup    *ContractCfgGroup
	ContractBindOptsCfg *ContractBindOptsCfg
}

func NewEthChainConfig

func NewEthChainConfig() *EthChainConfig

type Ethermint

type Ethermint struct {
	// contains filtered or unexported fields
}

func NewEthermintClient

func NewEthermintClient(
	chainType string,
	chainName string,
	updateClientFrequency uint64,
	config *Config) (*Ethermint, error)

func (*Ethermint) ChainName

func (c *Ethermint) ChainName() string

func (*Ethermint) ChainType

func (c *Ethermint) ChainType() string

func (*Ethermint) GetBlockHeader

func (c *Ethermint) GetBlockHeader(req *repotypes.GetBlockHeaderReq) (tibctypes.Header, error)

func (*Ethermint) GetBlockTimestamp

func (c *Ethermint) GetBlockTimestamp(height uint64) (uint64, error)

func (*Ethermint) GetCommitmentsPacket

func (eth *Ethermint) GetCommitmentsPacket(sourChainName, destChainName string, sequence uint64) error

func (*Ethermint) GetLatestHeight

func (c *Ethermint) GetLatestHeight() (uint64, error)

func (*Ethermint) GetLightClientConsensusState

func (eth *Ethermint) GetLightClientConsensusState(string, uint64) (tibctypes.ConsensusState, error)

func (*Ethermint) GetLightClientDelayHeight

func (c *Ethermint) GetLightClientDelayHeight(chainName string) (uint64, error)

func (*Ethermint) GetLightClientDelayTime

func (c *Ethermint) GetLightClientDelayTime(chainName string) (uint64, error)

func (*Ethermint) GetLightClientState

func (eth *Ethermint) GetLightClientState(chainName string) (tibctypes.ClientState, error)

func (*Ethermint) GetPackets

func (eth *Ethermint) GetPackets(height uint64, destChainType string) (*repotypes.Packets, error)

func (*Ethermint) GetProof

func (eth *Ethermint) GetProof(sourChainName, destChainName string, sequence uint64, height uint64, typ string) ([]byte, error)

func (*Ethermint) GetReceiptPacket

func (eth *Ethermint) GetReceiptPacket(sourChainName, destChainName string, sequence uint64) (bool, error)

func (*Ethermint) GetResult

func (c *Ethermint) GetResult(hash string) (uint64, error)

func (*Ethermint) RecvPackets

func (eth *Ethermint) RecvPackets(msgs types.Msgs) (*repotypes.ResultTx, types.Error)

func (*Ethermint) UpdateClient

func (eth *Ethermint) UpdateClient(header tibctypes.Header, chainName string) (string, error)

func (*Ethermint) UpdateClientFrequency

func (c *Ethermint) UpdateClientFrequency() uint64

type TendermintConfig

type TendermintConfig struct {
	Options []coretypes.Option

	RPCAddr  string
	GrpcAddr string
	ChainID  string
}

func NewTendermintConfig

func NewTendermintConfig() *TendermintConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL