client

package module
v0.0.0-...-7e7a532 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: LGPL-3.0 Imports: 21 Imported by: 0

README

Chainbridge ethereum module

discord

Chainbridge ethereum module is the part of Chainbrige-core framework. This module brings support of ethereum compatible client module.

Usage

Module should be used along with core framework.

Example

ChainSafe Security Policy

Reporting a Security Bug

We take all security issues seriously, if you believe you have found a security issue within a ChainSafe project please notify us immediately. If an issue is confirmed, we will take all necessary precautions to ensure a statement and patch release is made in a timely manner.

Please email us a description of the flaw and any related information (e.g. reproduction steps, version) to security at chainsafe dot io.

License

GNU Lesser General Public License v3.0

Documentation

Index

Constants

View Source
const DefaultGasLimit = 6721975
View Source
const DefaultGasPrice = 20000000000
View Source
const TxRetryInterval = time.Second * 2

Time between retrying a failed tx

View Source
const TxRetryLimit = 10

Tries to retry sending transaction

Variables

View Source
var ErrFatalTx = errors.New("submission of transaction failed")
View Source
var ErrNonceTooLow = errors.New("nonce too low")
View Source
var ErrTxUnderpriced = errors.New("replacement transaction underpriced")

Functions

This section is empty.

Types

type EVMClient

type EVMClient struct {
	*ethclient.Client
	// contains filtered or unexported fields
}

func NewEVMClient

func NewEVMClient(endpoint string, http bool, sender Sender) (*EVMClient, error)

func (*EVMClient) ExecuteProposal

func (c *EVMClient) ExecuteProposal(bridgeAddress string, proposal *evm.Proposal) error

func (*EVMClient) FetchDepositLogs

func (c *EVMClient) FetchDepositLogs(ctx context.Context, contractAddress string, sig string, startBlock *big.Int, endBlock *big.Int) ([]*coreListener.DepositLogs, error)

func (*EVMClient) GetEthClient

func (c *EVMClient) GetEthClient() *ethclient.Client

func (*EVMClient) LatestBlock

func (c *EVMClient) LatestBlock() (*big.Int, error)

LatestBlock returns the latest block from the current chain

func (*EVMClient) MatchResourceIDToHandlerAddress

func (c *EVMClient) MatchResourceIDToHandlerAddress(bridgeAddress string, rID [32]byte) (string, error)

func (*EVMClient) ProposalStatus

func (c *EVMClient) ProposalStatus(bridgeAddress string, p *evm.Proposal) (relayer.ProposalStatus, error)

func (*EVMClient) ReturnErc20HandlerFabric

func (c *EVMClient) ReturnErc20HandlerFabric() listener.EventHandler

func (*EVMClient) ReturnErc721HandlerFabric

func (c *EVMClient) ReturnErc721HandlerFabric() listener.EventHandler

func (*EVMClient) ReturnGenericHandlerFabric

func (c *EVMClient) ReturnGenericHandlerFabric() listener.EventHandler

func (*EVMClient) VoteProposal

func (c *EVMClient) VoteProposal(bridgeAddress string, proposal *evm.Proposal) error

func (*EVMClient) VotedBy

func (c *EVMClient) VotedBy(bridgeAddress string, p *evm.Proposal) bool

type Sender

type Sender interface {
	PrivateKey() *ecdsa.PrivateKey
	Address() string
}

Jump to

Keyboard shortcuts

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