Versions in this module Expand all Collapse all v1 v1.1.16 Apr 29, 2022 Changes in this version + const ETH + const GWei + const LiveEthTestNetwork + const LiveKlaytnTestNetwork + const LiveMetisTestNetwork + const SimulatedEthNetwork + func LiveEthTestnetURLs(e *environment.Environment) ([]*url.URL, error) + func SimulatedEthereumURLs(e *environment.Environment) ([]*url.URL, error) + func SimulatedSoakEthereumURLs(e *environment.Environment) ([]*url.URL, error) + func UnmarshalNetworkConfig(config map[string]interface{}, obj interface{}) error + type ClientURLFn func(e *environment.Environment) ([]*url.URL, error) + type ContractDeployer func(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, interface{}, error) + type EVMClient interface + AddHeaderEventSubscription func(key string, subscriber HeaderEventSubscription) + Close func() error + DeleteHeaderEventSubscription func(key string) + DeployContract func(contractName string, deployer ContractDeployer) (*common.Address, *types.Transaction, interface{}, error) + EstimateCostForChainlinkOperations func(amountOfOperations int) (*big.Float, error) + EstimateTransactionGasCost func() (*big.Int, error) + Fund func(toAddress string, amount *big.Float) error + GasStats func() *GasStats + Get func() interface{} + GetChainID func() *big.Int + GetClients func() []EVMClient + GetDefaultWallet func() *EthereumWallet + GetNetworkConfig func() *config.ETHNetwork + GetNetworkName func() string + GetNetworkType func() string + GetWallets func() []*EthereumWallet + HeaderHashByNumber func(ctx context.Context, bn *big.Int) (string, error) + HeaderTimestampByNumber func(ctx context.Context, bn *big.Int) (uint64, error) + IsTxConfirmed func(txHash common.Hash) (bool, error) + LatestBlockNumber func(ctx context.Context) (uint64, error) + LoadWallets func(ns interface{}) error + ParallelTransactions func(enabled bool) + ProcessTransaction func(tx *types.Transaction) error + SetDefaultWallet func(num int) error + SetID func(id int) + SetWallets func([]*EthereumWallet) + SwitchNode func(node int) error + TransactionOpts func(from *EthereumWallet) (*bind.TransactOpts, error) + WaitForEvents func() error + func NewEthereumClient(networkSettings *config.ETHNetwork) (EVMClient, error) + func NewEthereumMultiNodeClient(_ string, networkConfig map[string]interface{}, urls []*url.URL) (EVMClient, error) + func NewKlaytnClient(networkSettings *config.ETHNetwork) (EVMClient, error) + func NewKlaytnMultiNodeClient(_ string, networkConfig map[string]interface{}, urls []*url.URL) (EVMClient, error) + func NewMetisClient(networkSettings *config.ETHNetwork) (EVMClient, error) + func NewMetisMultiNodeClient(_ string, networkConfig map[string]interface{}, urls []*url.URL) (EVMClient, error) + type EthereumClient struct + BorrowNonces bool + Client *ethclient.Client + DefaultWallet *EthereumWallet + ID int + NetworkConfig *config.ETHNetwork + NonceMu *sync.Mutex + Nonces map[string]uint64 + Wallets []*EthereumWallet + func (e *EthereumClient) AddHeaderEventSubscription(key string, subscriber HeaderEventSubscription) + func (e *EthereumClient) BorrowedNonces(n bool) + func (e *EthereumClient) Close() error + func (e *EthereumClient) DeleteHeaderEventSubscription(key string) + func (e *EthereumClient) DeployContract(contractName string, deployer ContractDeployer) (*common.Address, *types.Transaction, interface{}, error) + func (e *EthereumClient) EstimateCostForChainlinkOperations(amountOfOperations int) (*big.Float, error) + func (e *EthereumClient) EstimateTransactionGasCost() (*big.Int, error) + func (e *EthereumClient) Fund(toAddress string, amount *big.Float) error + func (e *EthereumClient) GasStats() *GasStats + func (e *EthereumClient) Get() interface{} + func (e *EthereumClient) GetChainID() *big.Int + func (e *EthereumClient) GetClients() []EVMClient + func (e *EthereumClient) GetDefaultWallet() *EthereumWallet + func (e *EthereumClient) GetHeaderSubscriptions() map[string]HeaderEventSubscription + func (e *EthereumClient) GetNetworkConfig() *config.ETHNetwork + func (e *EthereumClient) GetNetworkName() string + func (e *EthereumClient) GetNetworkType() string + func (e *EthereumClient) GetNonce(ctx context.Context, addr common.Address) (uint64, error) + func (e *EthereumClient) GetWallets() []*EthereumWallet + func (e *EthereumClient) HeaderHashByNumber(ctx context.Context, bn *big.Int) (string, error) + func (e *EthereumClient) HeaderTimestampByNumber(ctx context.Context, bn *big.Int) (uint64, error) + func (e *EthereumClient) IsTxConfirmed(txHash common.Hash) (bool, error) + func (e *EthereumClient) LatestBlockNumber(ctx context.Context) (uint64, error) + func (e *EthereumClient) LoadWallets(cfg interface{}) error + func (e *EthereumClient) ParallelTransactions(enabled bool) + func (e *EthereumClient) ProcessTransaction(tx *types.Transaction) error + func (e *EthereumClient) SetDefaultWallet(num int) error + func (e *EthereumClient) SetID(id int) + func (e *EthereumClient) SetWallets(wallets []*EthereumWallet) + func (e *EthereumClient) SwitchNode(_ int) error + func (e *EthereumClient) TransactionOpts(from *EthereumWallet) (*bind.TransactOpts, error) + func (e *EthereumClient) WaitForEvents() error + type EthereumMultinodeClient struct + Clients []EVMClient + DefaultClient EVMClient + func (e *EthereumMultinodeClient) AddHeaderEventSubscription(key string, subscriber HeaderEventSubscription) + func (e *EthereumMultinodeClient) Close() error + func (e *EthereumMultinodeClient) DeleteHeaderEventSubscription(key string) + func (e *EthereumMultinodeClient) DeployContract(contractName string, deployer ContractDeployer) (*common.Address, *types.Transaction, interface{}, error) + func (e *EthereumMultinodeClient) EstimateCostForChainlinkOperations(amountOfOperations int) (*big.Float, error) + func (e *EthereumMultinodeClient) EstimateTransactionGasCost() (*big.Int, error) + func (e *EthereumMultinodeClient) Fund(toAddress string, nativeAmount *big.Float) error + func (e *EthereumMultinodeClient) GasStats() *GasStats + func (e *EthereumMultinodeClient) Get() interface{} + func (e *EthereumMultinodeClient) GetChainID() *big.Int + func (e *EthereumMultinodeClient) GetClients() []EVMClient + func (e *EthereumMultinodeClient) GetDefaultWallet() *EthereumWallet + func (e *EthereumMultinodeClient) GetNetworkConfig() *config.ETHNetwork + func (e *EthereumMultinodeClient) GetNetworkName() string + func (e *EthereumMultinodeClient) GetNetworkType() string + func (e *EthereumMultinodeClient) GetWallets() []*EthereumWallet + func (e *EthereumMultinodeClient) HeaderHashByNumber(ctx context.Context, bn *big.Int) (string, error) + func (e *EthereumMultinodeClient) HeaderTimestampByNumber(ctx context.Context, bn *big.Int) (uint64, error) + func (e *EthereumMultinodeClient) IsTxConfirmed(txHash common.Hash) (bool, error) + func (e *EthereumMultinodeClient) LatestBlockNumber(ctx context.Context) (uint64, error) + func (e *EthereumMultinodeClient) LoadWallets(cfg interface{}) error + func (e *EthereumMultinodeClient) ParallelTransactions(enabled bool) + func (e *EthereumMultinodeClient) ProcessTransaction(tx *types.Transaction) error + func (e *EthereumMultinodeClient) SetDefaultWallet(num int) error + func (e *EthereumMultinodeClient) SetID(id int) + func (e *EthereumMultinodeClient) SetWallets(wallets []*EthereumWallet) + func (e *EthereumMultinodeClient) SwitchNode(clientID int) error + func (e *EthereumMultinodeClient) TransactionOpts(from *EthereumWallet) (*bind.TransactOpts, error) + func (e *EthereumMultinodeClient) WaitForEvents() error + type EthereumWallet struct + func NewEthereumWallet(pk string) (*EthereumWallet, error) + func (e *EthereumWallet) Address() string + func (e *EthereumWallet) PrivateKey() string + func (e *EthereumWallet) RawPrivateKey() interface{} + type GasStats struct + ClientTXs []TXGasData + NodeID int + SeenHashes map[string]bool + TotalGasUsed int64 + func NewGasStats(nodeID int) *GasStats + func (g *GasStats) AddClientTXData(data TXGasData) + func (g *GasStats) PrintStats() + type HeaderEventSubscription interface + ReceiveBlock func(header NodeBlock) error + Wait func() error + type InstantConfirmations struct + func (i *InstantConfirmations) ReceiveBlock(block NodeBlock) error + func (i *InstantConfirmations) Wait() error + type KlaytnClient struct + func (k *KlaytnClient) DeployContract(contractName string, deployer ContractDeployer) (*common.Address, *types.Transaction, interface{}, error) + func (k *KlaytnClient) Fund(toAddress string, amount *big.Float) error + type KlaytnMultinodeClient struct + type MetisClient struct + func (m *MetisClient) DeployContract(contractName string, deployer ContractDeployer) (*common.Address, *types.Transaction, interface{}, error) + func (m *MetisClient) Fund(toAddress string, amount *big.Float) error + type MetisMultinodeClient struct + type NetworkRegistry struct + func NewDefaultNetworkRegistry() *NetworkRegistry + func NewSoakNetworkRegistry() *NetworkRegistry + func (n *NetworkRegistry) GetNetworks(env *environment.Environment) (*Networks, error) + func (n *NetworkRegistry) RegisterNetwork(networkType string, fn NewEVMClientFn, urlFn ClientURLFn) + type Networks struct + Default EVMClient + func (b *Networks) AllNetworks() []EVMClient + func (b *Networks) Get(index int) (EVMClient, error) + func (b *Networks) SetDefault(index int) error + func (b *Networks) Teardown() error + type NewEVMClientFn func(networkName string, networkConfig map[string]interface{}, urls []*url.URL) (EVMClient, error) + type NodeBlock struct + NodeID int + type TXGasData struct + CumulativeGasUsed uint64 + GasLimit uint64 + GasPrice uint64 + GasUsed uint64 + TXHash string + Value uint64 + type TransactionConfirmer struct + func NewTransactionConfirmer(client EVMClient, tx *types.Transaction, minConfirmations int) *TransactionConfirmer + func (t *TransactionConfirmer) ReceiveBlock(block NodeBlock) error + func (t *TransactionConfirmer) Wait() error