Documentation
¶
Index ¶
- func AddressToBytes(address string) ([]byte, error)
- type AddressConverter
- type Chain
- type ConfirmFunc
- type MockOnchainClient
- func (_mock *MockOnchainClient) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
- func (_mock *MockOnchainClient) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (_mock *MockOnchainClient) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- func (_m *MockOnchainClient) EXPECT() *MockOnchainClient_Expecter
- func (_mock *MockOnchainClient) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error)
- func (_mock *MockOnchainClient) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
- func (_mock *MockOnchainClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (_mock *MockOnchainClient) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
- func (_mock *MockOnchainClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
- func (_mock *MockOnchainClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (_mock *MockOnchainClient) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (_mock *MockOnchainClient) StorageAt(ctx context.Context, account common.Address, key common.Hash, ...) ([]byte, error)
- func (_mock *MockOnchainClient) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (_mock *MockOnchainClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (_mock *MockOnchainClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error)
- func (_mock *MockOnchainClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- type MockOnchainClient_BalanceAt_Call
- func (_c *MockOnchainClient_BalanceAt_Call) Return(intParam *big.Int, err error) *MockOnchainClient_BalanceAt_Call
- func (_c *MockOnchainClient_BalanceAt_Call) Run(run func(ctx context.Context, account common.Address, blockNumber *big.Int)) *MockOnchainClient_BalanceAt_Call
- func (_c *MockOnchainClient_BalanceAt_Call) RunAndReturn(...) *MockOnchainClient_BalanceAt_Call
- type MockOnchainClient_CallContract_Call
- func (_c *MockOnchainClient_CallContract_Call) Return(bytes []byte, err error) *MockOnchainClient_CallContract_Call
- func (_c *MockOnchainClient_CallContract_Call) Run(run func(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int)) *MockOnchainClient_CallContract_Call
- func (_c *MockOnchainClient_CallContract_Call) RunAndReturn(...) *MockOnchainClient_CallContract_Call
- type MockOnchainClient_CodeAt_Call
- func (_c *MockOnchainClient_CodeAt_Call) Return(bytes []byte, err error) *MockOnchainClient_CodeAt_Call
- func (_c *MockOnchainClient_CodeAt_Call) Run(run func(ctx context.Context, contract common.Address, blockNumber *big.Int)) *MockOnchainClient_CodeAt_Call
- func (_c *MockOnchainClient_CodeAt_Call) RunAndReturn(...) *MockOnchainClient_CodeAt_Call
- type MockOnchainClient_EstimateGas_Call
- func (_c *MockOnchainClient_EstimateGas_Call) Return(v uint64, err error) *MockOnchainClient_EstimateGas_Call
- func (_c *MockOnchainClient_EstimateGas_Call) Run(run func(ctx context.Context, call ethereum.CallMsg)) *MockOnchainClient_EstimateGas_Call
- func (_c *MockOnchainClient_EstimateGas_Call) RunAndReturn(run func(ctx context.Context, call ethereum.CallMsg) (uint64, error)) *MockOnchainClient_EstimateGas_Call
- type MockOnchainClient_Expecter
- func (_e *MockOnchainClient_Expecter) BalanceAt(ctx interface{}, account interface{}, blockNumber interface{}) *MockOnchainClient_BalanceAt_Call
- func (_e *MockOnchainClient_Expecter) CallContract(ctx interface{}, call interface{}, blockNumber interface{}) *MockOnchainClient_CallContract_Call
- func (_e *MockOnchainClient_Expecter) CodeAt(ctx interface{}, contract interface{}, blockNumber interface{}) *MockOnchainClient_CodeAt_Call
- func (_e *MockOnchainClient_Expecter) EstimateGas(ctx interface{}, call interface{}) *MockOnchainClient_EstimateGas_Call
- func (_e *MockOnchainClient_Expecter) FilterLogs(ctx interface{}, q interface{}) *MockOnchainClient_FilterLogs_Call
- func (_e *MockOnchainClient_Expecter) HeaderByNumber(ctx interface{}, number interface{}) *MockOnchainClient_HeaderByNumber_Call
- func (_e *MockOnchainClient_Expecter) NonceAt(ctx interface{}, account interface{}, blockNumber interface{}) *MockOnchainClient_NonceAt_Call
- func (_e *MockOnchainClient_Expecter) PendingCodeAt(ctx interface{}, account interface{}) *MockOnchainClient_PendingCodeAt_Call
- func (_e *MockOnchainClient_Expecter) PendingNonceAt(ctx interface{}, account interface{}) *MockOnchainClient_PendingNonceAt_Call
- func (_e *MockOnchainClient_Expecter) SendTransaction(ctx interface{}, tx interface{}) *MockOnchainClient_SendTransaction_Call
- func (_e *MockOnchainClient_Expecter) StorageAt(ctx interface{}, account interface{}, key interface{}, blockNumber interface{}) *MockOnchainClient_StorageAt_Call
- func (_e *MockOnchainClient_Expecter) SubscribeFilterLogs(ctx interface{}, q interface{}, ch interface{}) *MockOnchainClient_SubscribeFilterLogs_Call
- func (_e *MockOnchainClient_Expecter) SuggestGasPrice(ctx interface{}) *MockOnchainClient_SuggestGasPrice_Call
- func (_e *MockOnchainClient_Expecter) SuggestGasTipCap(ctx interface{}) *MockOnchainClient_SuggestGasTipCap_Call
- func (_e *MockOnchainClient_Expecter) TransactionReceipt(ctx interface{}, txHash interface{}) *MockOnchainClient_TransactionReceipt_Call
- type MockOnchainClient_FilterLogs_Call
- func (_c *MockOnchainClient_FilterLogs_Call) Return(logs []types.Log, err error) *MockOnchainClient_FilterLogs_Call
- func (_c *MockOnchainClient_FilterLogs_Call) Run(run func(ctx context.Context, q ethereum.FilterQuery)) *MockOnchainClient_FilterLogs_Call
- func (_c *MockOnchainClient_FilterLogs_Call) RunAndReturn(run func(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)) *MockOnchainClient_FilterLogs_Call
- type MockOnchainClient_HeaderByNumber_Call
- func (_c *MockOnchainClient_HeaderByNumber_Call) Return(header *types.Header, err error) *MockOnchainClient_HeaderByNumber_Call
- func (_c *MockOnchainClient_HeaderByNumber_Call) Run(run func(ctx context.Context, number *big.Int)) *MockOnchainClient_HeaderByNumber_Call
- func (_c *MockOnchainClient_HeaderByNumber_Call) RunAndReturn(run func(ctx context.Context, number *big.Int) (*types.Header, error)) *MockOnchainClient_HeaderByNumber_Call
- type MockOnchainClient_NonceAt_Call
- func (_c *MockOnchainClient_NonceAt_Call) Return(v uint64, err error) *MockOnchainClient_NonceAt_Call
- func (_c *MockOnchainClient_NonceAt_Call) Run(run func(ctx context.Context, account common.Address, blockNumber *big.Int)) *MockOnchainClient_NonceAt_Call
- func (_c *MockOnchainClient_NonceAt_Call) RunAndReturn(...) *MockOnchainClient_NonceAt_Call
- type MockOnchainClient_PendingCodeAt_Call
- func (_c *MockOnchainClient_PendingCodeAt_Call) Return(bytes []byte, err error) *MockOnchainClient_PendingCodeAt_Call
- func (_c *MockOnchainClient_PendingCodeAt_Call) Run(run func(ctx context.Context, account common.Address)) *MockOnchainClient_PendingCodeAt_Call
- func (_c *MockOnchainClient_PendingCodeAt_Call) RunAndReturn(run func(ctx context.Context, account common.Address) ([]byte, error)) *MockOnchainClient_PendingCodeAt_Call
- type MockOnchainClient_PendingNonceAt_Call
- func (_c *MockOnchainClient_PendingNonceAt_Call) Return(v uint64, err error) *MockOnchainClient_PendingNonceAt_Call
- func (_c *MockOnchainClient_PendingNonceAt_Call) Run(run func(ctx context.Context, account common.Address)) *MockOnchainClient_PendingNonceAt_Call
- func (_c *MockOnchainClient_PendingNonceAt_Call) RunAndReturn(run func(ctx context.Context, account common.Address) (uint64, error)) *MockOnchainClient_PendingNonceAt_Call
- type MockOnchainClient_SendTransaction_Call
- func (_c *MockOnchainClient_SendTransaction_Call) Return(err error) *MockOnchainClient_SendTransaction_Call
- func (_c *MockOnchainClient_SendTransaction_Call) Run(run func(ctx context.Context, tx *types.Transaction)) *MockOnchainClient_SendTransaction_Call
- func (_c *MockOnchainClient_SendTransaction_Call) RunAndReturn(run func(ctx context.Context, tx *types.Transaction) error) *MockOnchainClient_SendTransaction_Call
- type MockOnchainClient_StorageAt_Call
- func (_c *MockOnchainClient_StorageAt_Call) Return(bytes []byte, err error) *MockOnchainClient_StorageAt_Call
- func (_c *MockOnchainClient_StorageAt_Call) Run(run func(ctx context.Context, account common.Address, key common.Hash, ...)) *MockOnchainClient_StorageAt_Call
- func (_c *MockOnchainClient_StorageAt_Call) RunAndReturn(...) *MockOnchainClient_StorageAt_Call
- type MockOnchainClient_SubscribeFilterLogs_Call
- func (_c *MockOnchainClient_SubscribeFilterLogs_Call) Return(subscription ethereum.Subscription, err error) *MockOnchainClient_SubscribeFilterLogs_Call
- func (_c *MockOnchainClient_SubscribeFilterLogs_Call) Run(run func(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log)) *MockOnchainClient_SubscribeFilterLogs_Call
- func (_c *MockOnchainClient_SubscribeFilterLogs_Call) RunAndReturn(...) *MockOnchainClient_SubscribeFilterLogs_Call
- type MockOnchainClient_SuggestGasPrice_Call
- func (_c *MockOnchainClient_SuggestGasPrice_Call) Return(intParam *big.Int, err error) *MockOnchainClient_SuggestGasPrice_Call
- func (_c *MockOnchainClient_SuggestGasPrice_Call) Run(run func(ctx context.Context)) *MockOnchainClient_SuggestGasPrice_Call
- func (_c *MockOnchainClient_SuggestGasPrice_Call) RunAndReturn(run func(ctx context.Context) (*big.Int, error)) *MockOnchainClient_SuggestGasPrice_Call
- type MockOnchainClient_SuggestGasTipCap_Call
- func (_c *MockOnchainClient_SuggestGasTipCap_Call) Return(intParam *big.Int, err error) *MockOnchainClient_SuggestGasTipCap_Call
- func (_c *MockOnchainClient_SuggestGasTipCap_Call) Run(run func(ctx context.Context)) *MockOnchainClient_SuggestGasTipCap_Call
- func (_c *MockOnchainClient_SuggestGasTipCap_Call) RunAndReturn(run func(ctx context.Context) (*big.Int, error)) *MockOnchainClient_SuggestGasTipCap_Call
- type MockOnchainClient_TransactionReceipt_Call
- func (_c *MockOnchainClient_TransactionReceipt_Call) Return(receipt *types.Receipt, err error) *MockOnchainClient_TransactionReceipt_Call
- func (_c *MockOnchainClient_TransactionReceipt_Call) Run(run func(ctx context.Context, txHash common.Hash)) *MockOnchainClient_TransactionReceipt_Call
- func (_c *MockOnchainClient_TransactionReceipt_Call) RunAndReturn(run func(ctx context.Context, txHash common.Hash) (*types.Receipt, error)) *MockOnchainClient_TransactionReceipt_Call
- type OnchainClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressToBytes ¶ added in v0.44.0
AddressToBytes converts an EVM address string to bytes. EVM addresses are hex strings (with or without 0x prefix) representing 20 bytes.
Types ¶
type AddressConverter ¶ added in v0.44.0
type AddressConverter struct{}
AddressConverter implements address conversion for EVM-compatible chains. This struct implements the AddressConverter strategy interface.
func (AddressConverter) ConvertToBytes ¶ added in v0.44.0
func (e AddressConverter) ConvertToBytes(address string) ([]byte, error)
ConvertToBytes converts an EVM address string to bytes.
func (AddressConverter) Supports ¶ added in v0.44.0
func (e AddressConverter) Supports(family string) bool
Supports returns true if this converter supports the given chain family.
type Chain ¶
type Chain struct {
Selector uint64
Client OnchainClient
// Note the Sign function can be abstract supporting a variety of key storage mechanisms (e.g. KMS etc).
DeployerKey *bind.TransactOpts
Confirm ConfirmFunc
// Users are a set of keys that can be used to interact with the chain.
// These are distinct from the deployer key.
Users []*bind.TransactOpts
// SignHash allows signing of arbitrary hashes using the deployer key's signing mechanism.
// This function signature matches the expected format: func([]byte) ([]byte, error)
SignHash func([]byte) ([]byte, error)
// ZK deployment specifics
IsZkSyncVM bool
ClientZkSyncVM *clients.Client
DeployerKeyZkSyncVM *accounts.Wallet
}
Chain represents an EVM chain.
func (Chain) ChainSelector ¶
ChainSelector returns the chain selector of the chain
type ConfirmFunc ¶ added in v0.14.0
type ConfirmFunc func(tx *types.Transaction) (uint64, error)
ConfirmFunc is a function that takes a transaction, waits for the transaction to be confirmed, and returns the block number and an error.
type MockOnchainClient ¶ added in v0.65.0
MockOnchainClient is an autogenerated mock type for the OnchainClient type
func NewMockOnchainClient ¶ added in v0.65.0
func NewMockOnchainClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockOnchainClient
NewMockOnchainClient creates a new instance of MockOnchainClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockOnchainClient) BalanceAt ¶ added in v0.65.0
func (_mock *MockOnchainClient) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
BalanceAt provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) CallContract ¶ added in v0.65.0
func (_mock *MockOnchainClient) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
CallContract provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) CodeAt ¶ added in v0.65.0
func (_mock *MockOnchainClient) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
CodeAt provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) EXPECT ¶ added in v0.65.0
func (_m *MockOnchainClient) EXPECT() *MockOnchainClient_Expecter
func (*MockOnchainClient) EstimateGas ¶ added in v0.65.0
func (_mock *MockOnchainClient) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error)
EstimateGas provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) FilterLogs ¶ added in v0.65.0
func (_mock *MockOnchainClient) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)
FilterLogs provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) HeaderByNumber ¶ added in v0.65.0
func (_mock *MockOnchainClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
HeaderByNumber provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) NonceAt ¶ added in v0.65.0
func (_mock *MockOnchainClient) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
NonceAt provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) PendingCodeAt ¶ added in v0.65.0
func (_mock *MockOnchainClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
PendingCodeAt provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) PendingNonceAt ¶ added in v0.65.0
func (_mock *MockOnchainClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
PendingNonceAt provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) SendTransaction ¶ added in v0.65.0
func (_mock *MockOnchainClient) SendTransaction(ctx context.Context, tx *types.Transaction) error
SendTransaction provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) StorageAt ¶ added in v0.65.0
func (_mock *MockOnchainClient) StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error)
StorageAt provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) SubscribeFilterLogs ¶ added in v0.65.0
func (_mock *MockOnchainClient) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
SubscribeFilterLogs provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) SuggestGasPrice ¶ added in v0.65.0
SuggestGasPrice provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) SuggestGasTipCap ¶ added in v0.65.0
SuggestGasTipCap provides a mock function for the type MockOnchainClient
func (*MockOnchainClient) TransactionReceipt ¶ added in v0.65.0
func (_mock *MockOnchainClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
TransactionReceipt provides a mock function for the type MockOnchainClient
type MockOnchainClient_BalanceAt_Call ¶ added in v0.65.0
MockOnchainClient_BalanceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BalanceAt'
func (*MockOnchainClient_BalanceAt_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_BalanceAt_Call) Return(intParam *big.Int, err error) *MockOnchainClient_BalanceAt_Call
func (*MockOnchainClient_BalanceAt_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_BalanceAt_Call) Run(run func(ctx context.Context, account common.Address, blockNumber *big.Int)) *MockOnchainClient_BalanceAt_Call
func (*MockOnchainClient_BalanceAt_Call) RunAndReturn ¶ added in v0.65.0
type MockOnchainClient_CallContract_Call ¶ added in v0.65.0
MockOnchainClient_CallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContract'
func (*MockOnchainClient_CallContract_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_CallContract_Call) Return(bytes []byte, err error) *MockOnchainClient_CallContract_Call
func (*MockOnchainClient_CallContract_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_CallContract_Call) Run(run func(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int)) *MockOnchainClient_CallContract_Call
func (*MockOnchainClient_CallContract_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_CallContract_Call) RunAndReturn(run func(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)) *MockOnchainClient_CallContract_Call
type MockOnchainClient_CodeAt_Call ¶ added in v0.65.0
MockOnchainClient_CodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CodeAt'
func (*MockOnchainClient_CodeAt_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_CodeAt_Call) Return(bytes []byte, err error) *MockOnchainClient_CodeAt_Call
func (*MockOnchainClient_CodeAt_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_CodeAt_Call) Run(run func(ctx context.Context, contract common.Address, blockNumber *big.Int)) *MockOnchainClient_CodeAt_Call
func (*MockOnchainClient_CodeAt_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_CodeAt_Call) RunAndReturn(run func(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)) *MockOnchainClient_CodeAt_Call
type MockOnchainClient_EstimateGas_Call ¶ added in v0.65.0
MockOnchainClient_EstimateGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimateGas'
func (*MockOnchainClient_EstimateGas_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_EstimateGas_Call) Return(v uint64, err error) *MockOnchainClient_EstimateGas_Call
func (*MockOnchainClient_EstimateGas_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_EstimateGas_Call) Run(run func(ctx context.Context, call ethereum.CallMsg)) *MockOnchainClient_EstimateGas_Call
func (*MockOnchainClient_EstimateGas_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_EstimateGas_Call) RunAndReturn(run func(ctx context.Context, call ethereum.CallMsg) (uint64, error)) *MockOnchainClient_EstimateGas_Call
type MockOnchainClient_Expecter ¶ added in v0.65.0
type MockOnchainClient_Expecter struct {
// contains filtered or unexported fields
}
func (*MockOnchainClient_Expecter) BalanceAt ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) BalanceAt(ctx interface{}, account interface{}, blockNumber interface{}) *MockOnchainClient_BalanceAt_Call
BalanceAt is a helper method to define mock.On call
- ctx context.Context
- account common.Address
- blockNumber *big.Int
func (*MockOnchainClient_Expecter) CallContract ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) CallContract(ctx interface{}, call interface{}, blockNumber interface{}) *MockOnchainClient_CallContract_Call
CallContract is a helper method to define mock.On call
- ctx context.Context
- call ethereum.CallMsg
- blockNumber *big.Int
func (*MockOnchainClient_Expecter) CodeAt ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) CodeAt(ctx interface{}, contract interface{}, blockNumber interface{}) *MockOnchainClient_CodeAt_Call
CodeAt is a helper method to define mock.On call
- ctx context.Context
- contract common.Address
- blockNumber *big.Int
func (*MockOnchainClient_Expecter) EstimateGas ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) EstimateGas(ctx interface{}, call interface{}) *MockOnchainClient_EstimateGas_Call
EstimateGas is a helper method to define mock.On call
- ctx context.Context
- call ethereum.CallMsg
func (*MockOnchainClient_Expecter) FilterLogs ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) FilterLogs(ctx interface{}, q interface{}) *MockOnchainClient_FilterLogs_Call
FilterLogs is a helper method to define mock.On call
- ctx context.Context
- q ethereum.FilterQuery
func (*MockOnchainClient_Expecter) HeaderByNumber ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) HeaderByNumber(ctx interface{}, number interface{}) *MockOnchainClient_HeaderByNumber_Call
HeaderByNumber is a helper method to define mock.On call
- ctx context.Context
- number *big.Int
func (*MockOnchainClient_Expecter) NonceAt ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) NonceAt(ctx interface{}, account interface{}, blockNumber interface{}) *MockOnchainClient_NonceAt_Call
NonceAt is a helper method to define mock.On call
- ctx context.Context
- account common.Address
- blockNumber *big.Int
func (*MockOnchainClient_Expecter) PendingCodeAt ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) PendingCodeAt(ctx interface{}, account interface{}) *MockOnchainClient_PendingCodeAt_Call
PendingCodeAt is a helper method to define mock.On call
- ctx context.Context
- account common.Address
func (*MockOnchainClient_Expecter) PendingNonceAt ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) PendingNonceAt(ctx interface{}, account interface{}) *MockOnchainClient_PendingNonceAt_Call
PendingNonceAt is a helper method to define mock.On call
- ctx context.Context
- account common.Address
func (*MockOnchainClient_Expecter) SendTransaction ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) SendTransaction(ctx interface{}, tx interface{}) *MockOnchainClient_SendTransaction_Call
SendTransaction is a helper method to define mock.On call
- ctx context.Context
- tx *types.Transaction
func (*MockOnchainClient_Expecter) StorageAt ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) StorageAt(ctx interface{}, account interface{}, key interface{}, blockNumber interface{}) *MockOnchainClient_StorageAt_Call
StorageAt is a helper method to define mock.On call
- ctx context.Context
- account common.Address
- key common.Hash
- blockNumber *big.Int
func (*MockOnchainClient_Expecter) SubscribeFilterLogs ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) SubscribeFilterLogs(ctx interface{}, q interface{}, ch interface{}) *MockOnchainClient_SubscribeFilterLogs_Call
SubscribeFilterLogs is a helper method to define mock.On call
- ctx context.Context
- q ethereum.FilterQuery
- ch chan<- types.Log
func (*MockOnchainClient_Expecter) SuggestGasPrice ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) SuggestGasPrice(ctx interface{}) *MockOnchainClient_SuggestGasPrice_Call
SuggestGasPrice is a helper method to define mock.On call
- ctx context.Context
func (*MockOnchainClient_Expecter) SuggestGasTipCap ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) SuggestGasTipCap(ctx interface{}) *MockOnchainClient_SuggestGasTipCap_Call
SuggestGasTipCap is a helper method to define mock.On call
- ctx context.Context
func (*MockOnchainClient_Expecter) TransactionReceipt ¶ added in v0.65.0
func (_e *MockOnchainClient_Expecter) TransactionReceipt(ctx interface{}, txHash interface{}) *MockOnchainClient_TransactionReceipt_Call
TransactionReceipt is a helper method to define mock.On call
- ctx context.Context
- txHash common.Hash
type MockOnchainClient_FilterLogs_Call ¶ added in v0.65.0
MockOnchainClient_FilterLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterLogs'
func (*MockOnchainClient_FilterLogs_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_FilterLogs_Call) Return(logs []types.Log, err error) *MockOnchainClient_FilterLogs_Call
func (*MockOnchainClient_FilterLogs_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_FilterLogs_Call) Run(run func(ctx context.Context, q ethereum.FilterQuery)) *MockOnchainClient_FilterLogs_Call
func (*MockOnchainClient_FilterLogs_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_FilterLogs_Call) RunAndReturn(run func(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error)) *MockOnchainClient_FilterLogs_Call
type MockOnchainClient_HeaderByNumber_Call ¶ added in v0.65.0
MockOnchainClient_HeaderByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByNumber'
func (*MockOnchainClient_HeaderByNumber_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_HeaderByNumber_Call) Return(header *types.Header, err error) *MockOnchainClient_HeaderByNumber_Call
func (*MockOnchainClient_HeaderByNumber_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_HeaderByNumber_Call) Run(run func(ctx context.Context, number *big.Int)) *MockOnchainClient_HeaderByNumber_Call
func (*MockOnchainClient_HeaderByNumber_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_HeaderByNumber_Call) RunAndReturn(run func(ctx context.Context, number *big.Int) (*types.Header, error)) *MockOnchainClient_HeaderByNumber_Call
type MockOnchainClient_NonceAt_Call ¶ added in v0.65.0
MockOnchainClient_NonceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NonceAt'
func (*MockOnchainClient_NonceAt_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_NonceAt_Call) Return(v uint64, err error) *MockOnchainClient_NonceAt_Call
func (*MockOnchainClient_NonceAt_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_NonceAt_Call) Run(run func(ctx context.Context, account common.Address, blockNumber *big.Int)) *MockOnchainClient_NonceAt_Call
func (*MockOnchainClient_NonceAt_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_NonceAt_Call) RunAndReturn(run func(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)) *MockOnchainClient_NonceAt_Call
type MockOnchainClient_PendingCodeAt_Call ¶ added in v0.65.0
MockOnchainClient_PendingCodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingCodeAt'
func (*MockOnchainClient_PendingCodeAt_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_PendingCodeAt_Call) Return(bytes []byte, err error) *MockOnchainClient_PendingCodeAt_Call
func (*MockOnchainClient_PendingCodeAt_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_PendingCodeAt_Call) Run(run func(ctx context.Context, account common.Address)) *MockOnchainClient_PendingCodeAt_Call
func (*MockOnchainClient_PendingCodeAt_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_PendingCodeAt_Call) RunAndReturn(run func(ctx context.Context, account common.Address) ([]byte, error)) *MockOnchainClient_PendingCodeAt_Call
type MockOnchainClient_PendingNonceAt_Call ¶ added in v0.65.0
MockOnchainClient_PendingNonceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingNonceAt'
func (*MockOnchainClient_PendingNonceAt_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_PendingNonceAt_Call) Return(v uint64, err error) *MockOnchainClient_PendingNonceAt_Call
func (*MockOnchainClient_PendingNonceAt_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_PendingNonceAt_Call) Run(run func(ctx context.Context, account common.Address)) *MockOnchainClient_PendingNonceAt_Call
func (*MockOnchainClient_PendingNonceAt_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_PendingNonceAt_Call) RunAndReturn(run func(ctx context.Context, account common.Address) (uint64, error)) *MockOnchainClient_PendingNonceAt_Call
type MockOnchainClient_SendTransaction_Call ¶ added in v0.65.0
MockOnchainClient_SendTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTransaction'
func (*MockOnchainClient_SendTransaction_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_SendTransaction_Call) Return(err error) *MockOnchainClient_SendTransaction_Call
func (*MockOnchainClient_SendTransaction_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_SendTransaction_Call) Run(run func(ctx context.Context, tx *types.Transaction)) *MockOnchainClient_SendTransaction_Call
func (*MockOnchainClient_SendTransaction_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_SendTransaction_Call) RunAndReturn(run func(ctx context.Context, tx *types.Transaction) error) *MockOnchainClient_SendTransaction_Call
type MockOnchainClient_StorageAt_Call ¶ added in v0.65.0
MockOnchainClient_StorageAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StorageAt'
func (*MockOnchainClient_StorageAt_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_StorageAt_Call) Return(bytes []byte, err error) *MockOnchainClient_StorageAt_Call
func (*MockOnchainClient_StorageAt_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_StorageAt_Call) Run(run func(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int)) *MockOnchainClient_StorageAt_Call
func (*MockOnchainClient_StorageAt_Call) RunAndReturn ¶ added in v0.65.0
type MockOnchainClient_SubscribeFilterLogs_Call ¶ added in v0.65.0
MockOnchainClient_SubscribeFilterLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeFilterLogs'
func (*MockOnchainClient_SubscribeFilterLogs_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_SubscribeFilterLogs_Call) Return(subscription ethereum.Subscription, err error) *MockOnchainClient_SubscribeFilterLogs_Call
func (*MockOnchainClient_SubscribeFilterLogs_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_SubscribeFilterLogs_Call) Run(run func(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log)) *MockOnchainClient_SubscribeFilterLogs_Call
func (*MockOnchainClient_SubscribeFilterLogs_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_SubscribeFilterLogs_Call) RunAndReturn(run func(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)) *MockOnchainClient_SubscribeFilterLogs_Call
type MockOnchainClient_SuggestGasPrice_Call ¶ added in v0.65.0
MockOnchainClient_SuggestGasPrice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuggestGasPrice'
func (*MockOnchainClient_SuggestGasPrice_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_SuggestGasPrice_Call) Return(intParam *big.Int, err error) *MockOnchainClient_SuggestGasPrice_Call
func (*MockOnchainClient_SuggestGasPrice_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_SuggestGasPrice_Call) Run(run func(ctx context.Context)) *MockOnchainClient_SuggestGasPrice_Call
func (*MockOnchainClient_SuggestGasPrice_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_SuggestGasPrice_Call) RunAndReturn(run func(ctx context.Context) (*big.Int, error)) *MockOnchainClient_SuggestGasPrice_Call
type MockOnchainClient_SuggestGasTipCap_Call ¶ added in v0.65.0
MockOnchainClient_SuggestGasTipCap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuggestGasTipCap'
func (*MockOnchainClient_SuggestGasTipCap_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_SuggestGasTipCap_Call) Return(intParam *big.Int, err error) *MockOnchainClient_SuggestGasTipCap_Call
func (*MockOnchainClient_SuggestGasTipCap_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_SuggestGasTipCap_Call) Run(run func(ctx context.Context)) *MockOnchainClient_SuggestGasTipCap_Call
func (*MockOnchainClient_SuggestGasTipCap_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_SuggestGasTipCap_Call) RunAndReturn(run func(ctx context.Context) (*big.Int, error)) *MockOnchainClient_SuggestGasTipCap_Call
type MockOnchainClient_TransactionReceipt_Call ¶ added in v0.65.0
MockOnchainClient_TransactionReceipt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionReceipt'
func (*MockOnchainClient_TransactionReceipt_Call) Return ¶ added in v0.65.0
func (_c *MockOnchainClient_TransactionReceipt_Call) Return(receipt *types.Receipt, err error) *MockOnchainClient_TransactionReceipt_Call
func (*MockOnchainClient_TransactionReceipt_Call) Run ¶ added in v0.65.0
func (_c *MockOnchainClient_TransactionReceipt_Call) Run(run func(ctx context.Context, txHash common.Hash)) *MockOnchainClient_TransactionReceipt_Call
func (*MockOnchainClient_TransactionReceipt_Call) RunAndReturn ¶ added in v0.65.0
func (_c *MockOnchainClient_TransactionReceipt_Call) RunAndReturn(run func(ctx context.Context, txHash common.Hash) (*types.Receipt, error)) *MockOnchainClient_TransactionReceipt_Call
type OnchainClient ¶
type OnchainClient interface {
bind.ContractBackend
bind.DeployBackend
BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error)
NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)
// StorageAt reads a storage slot from the given account at the specified block number.
// This is needed for operations like EIP-1967 proxy detection.
StorageAt(ctx context.Context, account common.Address, key common.Hash, blockNumber *big.Int) ([]byte, error)
}
OnchainClient is an EVM chain client. For EVM specifically we can use existing geth interface to abstract chain clients.