Versions in this module Expand all Collapse all v0 v0.5.0 Mar 23, 2021 Changes in this version + var ErrAccountNotFound = errors.New("could not find specified account") + var ErrKeysNotFound = errors.New("account either not found or not unlocked") + var ErrPasscodeNotFound = errors.New("could not find specified passcode") + func CalculateSelector(functionSignature string) [4]byte + func CloneBigInt(original *big.Int) *big.Int + func CloneBigInt2(original [2]*big.Int) [2]*big.Int + func CloneBigInt4(original [4]*big.Int) [4]*big.Int + func CloneBigIntSlice(original []*big.Int) []*big.Int + func CloneSliceBigInt2(original [][2]*big.Int) [][2]*big.Int + func SleepWithContext(ctx context.Context, delay time.Duration) error + func SlowReturn(ctx context.Context, delay time.Duration, value bool) bool + func StringToBytes32(str string) (b [32]byte) + type Contracts struct + Crypto *bindings.Crypto + CryptoAddress common.Address + Deposit *bindings.Deposit + DepositAddress common.Address + Ethdkg *bindings.ETHDKG + EthdkgAddress common.Address + Participants *bindings.Participants + Registry *bindings.Registry + RegistryAddress common.Address + Snapshots *bindings.Snapshots + Staking *bindings.Staking + StakingToken *bindings.Token + StakingTokenAddress common.Address + UtilityToken *bindings.Token + UtilityTokenAddress common.Address + Validators *bindings.Validators + ValidatorsAddress common.Address + func (c *Contracts) DeployContracts(ctx context.Context, account accounts.Account) (*bindings.Registry, common.Address, error) + func (c *Contracts) LookupContracts(registryAddress common.Address) error + type Ethereum interface + Close func() error + Commit func() + Contracts func() *Contracts + GetAccount func(common.Address) (accounts.Account, error) + GetAccountKeys func(addr common.Address) (*keystore.Key, error) + GetBalance func(common.Address) (*big.Int, error) + GetCallOpts func(context.Context, accounts.Account) *bind.CallOpts + GetCoinbaseAddress func() common.Address + GetCurrentHeight func(context.Context) (uint64, error) + GetDefaultAccount func() accounts.Account + GetEndpoint func() string + GetEvents func(ctx context.Context, firstBlock uint64, lastBlock uint64, ...) ([]types.Log, error) + GetFinalizedHeight func(context.Context) (uint64, error) + GetGethClient func() GethClient + GetPeerCount func(context.Context) (uint64, error) + GetSnapshot func() ([]byte, error) + GetSyncProgress func() (bool, *geth.SyncProgress, error) + GetTimeoutContext func() (context.Context, context.CancelFunc) + GetTransactionOpts func(context.Context, accounts.Account) (*bind.TransactOpts, error) + GetValidators func() ([]common.Address, error) + IsEthereumAccessible func() bool + LoadAccounts func(string) + LoadPasscodes func(string) error + RetryCount func() int + RetryDelay func() time.Duration + Timeout func() time.Duration + TransferEther func(common.Address, common.Address, *big.Int) error + UnlockAccount func(accounts.Account) error + WaitForReceipt func(context.Context, *types.Transaction) (*types.Receipt, error) + func NewEthereumEndpoint(endpoint string, pathKeystore string, pathPasscodes string, ...) (Ethereum, error) + func NewEthereumSimulator(pathKeystore string, pathPasscodes string, retryCount int, ...) (Ethereum, error) + type GethClient interface + BalanceAt func(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) + BlockByHash func(ctx context.Context, hash common.Hash) (*types.Block, error) + BlockByNumber func(ctx context.Context, number *big.Int) (*types.Block, error) + CallContract func(ctx context.Context, call geth.CallMsg, blockNumber *big.Int) ([]byte, error) + CodeAt func(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) + EstimateGas func(ctx context.Context, call geth.CallMsg) (gas uint64, err error) + FilterLogs func(ctx context.Context, query geth.FilterQuery) ([]types.Log, error) + HeaderByHash func(ctx context.Context, hash common.Hash) (*types.Header, error) + HeaderByNumber func(ctx context.Context, number *big.Int) (*types.Header, error) + NonceAt func(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) + PendingCodeAt func(ctx context.Context, account common.Address) ([]byte, error) + PendingNonceAt func(ctx context.Context, account common.Address) (uint64, error) + SendTransaction func(ctx context.Context, tx *types.Transaction) error + StorageAt func(ctx context.Context, account common.Address, key common.Hash, ...) ([]byte, error) + SubscribeFilterLogs func(ctx context.Context, query geth.FilterQuery, ch chan<- types.Log) (geth.Subscription, error) + SubscribeNewHead func(ctx context.Context, ch chan<- *types.Header) (geth.Subscription, error) + SuggestGasPrice func(ctx context.Context) (*big.Int, error) + TransactionByHash func(ctx context.Context, txHash common.Hash) (tx *types.Transaction, isPending bool, err error) + TransactionCount func(ctx context.Context, blockHash common.Hash) (uint, error) + TransactionInBlock func(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error) + TransactionReceipt func(ctx context.Context, txHash common.Hash) (*types.Receipt, error) + type Updater struct + Logger *logrus.Logger + TxnOpts *bind.TransactOpts + Updater *bindings.DiamondUpdateFacet + func (u *Updater) Add(signature string, facet common.Address) *types.Transaction