Versions in this module Expand all Collapse all v0 v0.2.0 Oct 19, 2022 Changes in this version + func InitMockWallet() + type Context interface + BlockNumber func(timeoutCtx context.Context) (uint64, error) + BuildTxOpts func(value, gasLimit uint64) (*bind.TransactOpts, error) + CallContract func(timeoutCtx context.Context, to ethcommon.Address, data []byte) ([]byte, error) + EstimateGas func(timeoutCtx context.Context, to ethcommon.Address, data []byte) (uint64, error) + GetAddress func() ethcommon.Address + GetClient func() *ethclient.Client + GetLog func(timeoutCtx context.Context, toAddr ethcommon.Address, blockNo *big.Int) ([]ethtypes.Log, error) + GetPrivateKey func() *ecdsa.PrivateKey + GetPublicKey func() *ecdsa.PublicKey + PendingNonceAt func(timeoutCtx context.Context) (uint64, error) + SetPrivateKey func(*ecdsa.PrivateKey) + SuggestGasPrice func(timeoutCtx context.Context) (*big.Int, error) + WaitReceipt func(timeoutCtx context.Context, txHash ethcommon.Hash, interval time.Duration) *ethtypes.Receipt + type EthContext struct + func NewEthClientContext(chainUrl string, hrp string, wallet WalletWrapper) *EthContext + func (ctx *EthContext) BlockNumber(timeoutCtx context.Context) (uint64, error) + func (ctx *EthContext) BuildTxOpts(value, gasLimit uint64) (*bind.TransactOpts, error) + func (ctx *EthContext) CallContract(timeoutCtx context.Context, to ethcommon.Address, input []byte) ([]byte, error) + func (ctx *EthContext) EstimateGas(timeoutCtx context.Context, to ethcommon.Address, input []byte) (uint64, error) + func (ctx *EthContext) GetAddress() ethcommon.Address + func (ctx *EthContext) GetClient() *ethclient.Client + func (ctx *EthContext) GetLog(timeoutCtx context.Context, toAddr ethcommon.Address, blockNo *big.Int) ([]ethtypes.Log, error) + func (ctx *EthContext) GetPrivateKey() *ecdsa.PrivateKey + func (ctx *EthContext) GetPublicKey() *ecdsa.PublicKey + func (ctx *EthContext) PendingNonceAt(timeoutCtx context.Context) (uint64, error) + func (ctx *EthContext) SetPrivateKey(privateKey *ecdsa.PrivateKey) + func (ctx *EthContext) SuggestGasPrice(timeoutCtx context.Context) (*big.Int, error) + func (ctx *EthContext) WaitReceipt(timeoutCtx context.Context, txHash ethcommon.Hash, interval time.Duration) *ethtypes.Receipt + type MockWallet struct + func MockWalletInstance() *MockWallet + func (m *MockWallet) GetAddress() ethcommon.Address + func (m *MockWallet) GetPrivateKey() *ecdsa.PrivateKey + func (m *MockWallet) GetPublicKey() *ecdsa.PublicKey + func (m *MockWallet) SetPrivateKey(privateKey *ecdsa.PrivateKey) + type WalletWrapper interface + GetAddress func() ethcommon.Address + GetPrivateKey func() *ecdsa.PrivateKey + GetPublicKey func() *ecdsa.PublicKey + SetPrivateKey func(privateKey *ecdsa.PrivateKey)