diff --git a/.mockery.yaml b/.mockery.yaml new file mode 100644 index 00000000..a2fdaa50 --- /dev/null +++ b/.mockery.yaml @@ -0,0 +1,149 @@ +with-expecter: true +issue-845-fix: True +resolve-type-alias: False +dir: "{{ .InterfaceDir }}/../mocks" +outpkg: "mocks" +filename: "{{ .InterfaceName | snakecase | lower }}.go" +mockname: "{{ .InterfaceName }}" +packages: + github.com/0xPolygon/cdk/agglayer: + config: + inpackage: True + dir: "{{ .InterfaceDir }}" + outpkg: "{{ .PackageName }}" + interfaces: + AgglayerClientInterface: + config: + mockname: AgglayerClientMock + filename: mock_agglayer_client.go + github.com/0xPolygonHermez/zkevm-synchronizer-l1/synchronizer: + config: + interfaces: + Synchronizer: + config: + dir: "./aggregator/mocks" + mockname: "{{ .InterfaceName }}InterfaceMock" + filename: "mock_{{ .InterfaceName | snakecase | lower }}.go" + github.com/0xPolygon/cdk/aggregator: + config: + dir: "{{ .InterfaceDir }}/mocks" + filename: "mock_{{ .InterfaceName | snakecase | lower }}.go" + mockname: "{{ .InterfaceName }}Mock" + interfaces: + ProverInterface: + Etherman: + StorageInterface: + EthTxManagerClient: + RPCInterface: + github.com/0xPolygon/cdk/aggregator/prover: + config: + dir: "{{ .InterfaceDir }}/mocks" + interfaces: + AggregatorService_ChannelServer: + config: + mockname: ChannelMock + filename: mock_channel.go + github.com/0xPolygon/cdk/bridgesync: + config: + dir: "{{ .InterfaceDir }}/mocks" + interfaces: + ReorgDetector: + EthClienter: + github.com/0xPolygon/cdk/dataavailability: + config: + dir: "{{ .InterfaceDir }}/mocks_da" + all: True + outpkg: "mocks_da" + github.com/0xPolygon/cdk/db: + config: + dir: "{{ .InterfaceDir }}/../aggregator/mocks" + filename: "mock_{{ .InterfaceName | snakecase | lower }}.go" + mockname: "{{ .InterfaceName }}Mock" + interfaces: + Txer: + github.com/0xPolygon/cdk/l1infotreesync: + config: + dir: "{{ .InterfaceDir }}/mocks" + interfaces: + EthClienter: + github.com/0xPolygon/cdk/reorgdetector: + config: + dir: "{{ .InterfaceDir }}" + outpkg: "{{ .PackageName }}" + mockname: "{{ .InterfaceName }}Mock" + filename: "mock_{{ .InterfaceName | snakecase | lower }}.go" + interfaces: + EthClient: + github.com/0xPolygon/cdk/rpc/client: + config: + interfaces: + BridgeClientInterface: + ClientInterface: + ClientFactoryInterface: + github.com/0xPolygon/cdk/rpc: + config: + dir: "{{ .InterfaceDir }}/mocks" + interfaces: + Bridger: + LastGERer: + L1InfoTreer: + ClaimSponsorer: + github.com/0xPolygon/cdk/sequencesender: + config: + dir: "{{ .InterfaceDir }}/mocks" + outpkg: "mocks" + mockname: "{{ .InterfaceName }}Mock" + interfaces: + EthTxManager: + configs: + - mockname: EthTxManagerMock + filename: mock_ethtxmanager.go + - mockname: EthTxManagerMock + filename: mock_ethtxmanager.go + dir: "{{ .InterfaceDir }}/../test/helpers" + outpkg: "helpers" + Etherman: + RPCInterface: + github.com/0xPolygon/cdk/sequencesender/txbuilder: + config: + dir: "{{ .InterfaceDir }}/mocks_txbuilder" + all: True + outpkg: "mocks_txbuilder" + mockname: "{{ .InterfaceName | camelcase | firstUpper }}" + interfaces: + TxBuilder: + configs: + - dir: "{{ .InterfaceDir }}/../mocks" + outpkg: "mocks" + mockname: "{{ .InterfaceName | camelcase | firstUpper }}Mock" + - dir: "{{ .InterfaceDir }}/mocks_txbuilder" + outpkg: "mocks_txbuilder" + mockname: "{{ .InterfaceName | camelcase | firstUpper }}" + github.com/0xPolygon/cdk/sync: + config: + dir: "{{ .InterfaceDir }}" + outpkg: "{{ .PackageName }}" + mockname: "{{ .InterfaceName }}Mock" + filename: "mock_{{ .InterfaceName | snakecase | lower }}.go" + inpackage: True + interfaces: + ReorgDetector: + configs: + - dir: "{{ .InterfaceDir }}/../l1infotreesync/mocks" + outpkg: "mocks" + mockname: "{{ .InterfaceName }}Mock" + filename: "mock_{{ .InterfaceName | snakecase | lower }}.go" + inpackage: False + - dir: "{{ .InterfaceDir }}" + outpkg: "{{ .PackageName }}" + mockname: "{{ .InterfaceName }}Mock" + filename: "mock_{{ .InterfaceName | snakecase | lower }}.go" + processorInterface: + config: + mockname: "ProcessorMock" + evmDownloaderFull: + config: + mockname: "EVMDownloaderMock" + EthClienter: + config: + mockname: "L2Mock" \ No newline at end of file diff --git a/agglayer/mock_agglayer_client.go b/agglayer/mock_agglayer_client.go index 8b9a819f..81f0deb2 100644 --- a/agglayer/mock_agglayer_client.go +++ b/agglayer/mock_agglayer_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package agglayer diff --git a/aggregator/mocks/mock_eth_tx_manager.go b/aggregator/mocks/mock_eth_tx_manager_client.go similarity index 99% rename from aggregator/mocks/mock_eth_tx_manager.go rename to aggregator/mocks/mock_eth_tx_manager_client.go index 47dabe1c..d3823720 100644 --- a/aggregator/mocks/mock_eth_tx_manager.go +++ b/aggregator/mocks/mock_eth_tx_manager_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/aggregator/mocks/mock_etherman.go b/aggregator/mocks/mock_etherman.go index 2982430d..e54df3bf 100644 --- a/aggregator/mocks/mock_etherman.go +++ b/aggregator/mocks/mock_etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/aggregator/mocks/mock_prover.go b/aggregator/mocks/mock_prover_interface.go similarity index 99% rename from aggregator/mocks/mock_prover.go rename to aggregator/mocks/mock_prover_interface.go index 7939667d..a387854d 100644 --- a/aggregator/mocks/mock_prover.go +++ b/aggregator/mocks/mock_prover_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/aggregator/mocks/mock_rpc.go b/aggregator/mocks/mock_rpc_interface.go similarity index 98% rename from aggregator/mocks/mock_rpc.go rename to aggregator/mocks/mock_rpc_interface.go index 3927b5db..dd7c56df 100644 --- a/aggregator/mocks/mock_rpc.go +++ b/aggregator/mocks/mock_rpc_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/aggregator/mocks/mock_storage.go b/aggregator/mocks/mock_storage_interface.go similarity index 99% rename from aggregator/mocks/mock_storage.go rename to aggregator/mocks/mock_storage_interface.go index 2615f6bc..41c6379c 100644 --- a/aggregator/mocks/mock_storage.go +++ b/aggregator/mocks/mock_storage_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/aggregator/mocks/mock_synchronizer.go b/aggregator/mocks/mock_synchronizer.go index ae7735b1..e141178a 100644 --- a/aggregator/mocks/mock_synchronizer.go +++ b/aggregator/mocks/mock_synchronizer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/aggregator/mocks/mock_txer.go b/aggregator/mocks/mock_txer.go index 39a98d03..06339bca 100644 --- a/aggregator/mocks/mock_txer.go +++ b/aggregator/mocks/mock_txer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/aggregator/prover/mocks/mock_channel.go b/aggregator/prover/mocks/mock_channel.go index 9ed3c47b..7c701569 100644 --- a/aggregator/prover/mocks/mock_channel.go +++ b/aggregator/prover/mocks/mock_channel.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks @@ -129,7 +129,7 @@ func (_c *ChannelMock_Recv_Call) RunAndReturn(run func() (*prover.ProverMessage, } // RecvMsg provides a mock function with given fields: m -func (_m *ChannelMock) RecvMsg(m interface{}) error { +func (_m *ChannelMock) RecvMsg(m any) error { ret := _m.Called(m) if len(ret) == 0 { @@ -137,7 +137,7 @@ func (_m *ChannelMock) RecvMsg(m interface{}) error { } var r0 error - if rf, ok := ret.Get(0).(func(interface{}) error); ok { + if rf, ok := ret.Get(0).(func(any) error); ok { r0 = rf(m) } else { r0 = ret.Error(0) @@ -152,14 +152,14 @@ type ChannelMock_RecvMsg_Call struct { } // RecvMsg is a helper method to define mock.On call -// - m interface{} +// - m any func (_e *ChannelMock_Expecter) RecvMsg(m interface{}) *ChannelMock_RecvMsg_Call { return &ChannelMock_RecvMsg_Call{Call: _e.mock.On("RecvMsg", m)} } -func (_c *ChannelMock_RecvMsg_Call) Run(run func(m interface{})) *ChannelMock_RecvMsg_Call { +func (_c *ChannelMock_RecvMsg_Call) Run(run func(m any)) *ChannelMock_RecvMsg_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(interface{})) + run(args[0].(any)) }) return _c } @@ -169,7 +169,7 @@ func (_c *ChannelMock_RecvMsg_Call) Return(_a0 error) *ChannelMock_RecvMsg_Call return _c } -func (_c *ChannelMock_RecvMsg_Call) RunAndReturn(run func(interface{}) error) *ChannelMock_RecvMsg_Call { +func (_c *ChannelMock_RecvMsg_Call) RunAndReturn(run func(any) error) *ChannelMock_RecvMsg_Call { _c.Call.Return(run) return _c } @@ -267,7 +267,7 @@ func (_c *ChannelMock_SendHeader_Call) RunAndReturn(run func(metadata.MD) error) } // SendMsg provides a mock function with given fields: m -func (_m *ChannelMock) SendMsg(m interface{}) error { +func (_m *ChannelMock) SendMsg(m any) error { ret := _m.Called(m) if len(ret) == 0 { @@ -275,7 +275,7 @@ func (_m *ChannelMock) SendMsg(m interface{}) error { } var r0 error - if rf, ok := ret.Get(0).(func(interface{}) error); ok { + if rf, ok := ret.Get(0).(func(any) error); ok { r0 = rf(m) } else { r0 = ret.Error(0) @@ -290,14 +290,14 @@ type ChannelMock_SendMsg_Call struct { } // SendMsg is a helper method to define mock.On call -// - m interface{} +// - m any func (_e *ChannelMock_Expecter) SendMsg(m interface{}) *ChannelMock_SendMsg_Call { return &ChannelMock_SendMsg_Call{Call: _e.mock.On("SendMsg", m)} } -func (_c *ChannelMock_SendMsg_Call) Run(run func(m interface{})) *ChannelMock_SendMsg_Call { +func (_c *ChannelMock_SendMsg_Call) Run(run func(m any)) *ChannelMock_SendMsg_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(interface{})) + run(args[0].(any)) }) return _c } @@ -307,7 +307,7 @@ func (_c *ChannelMock_SendMsg_Call) Return(_a0 error) *ChannelMock_SendMsg_Call return _c } -func (_c *ChannelMock_SendMsg_Call) RunAndReturn(run func(interface{}) error) *ChannelMock_SendMsg_Call { +func (_c *ChannelMock_SendMsg_Call) RunAndReturn(run func(any) error) *ChannelMock_SendMsg_Call { _c.Call.Return(run) return _c } diff --git a/bridgesync/mock_l2_test.go b/bridgesync/mock_l2_test.go deleted file mode 100644 index ef842d18..00000000 --- a/bridgesync/mock_l2_test.go +++ /dev/null @@ -1,577 +0,0 @@ -// Code generated by mockery v2.45.0. DO NOT EDIT. - -package bridgesync - -import ( - context "context" - big "math/big" - - common "github.com/ethereum/go-ethereum/common" - - ethereum "github.com/ethereum/go-ethereum" - - mock "github.com/stretchr/testify/mock" - - rpc "github.com/ethereum/go-ethereum/rpc" - - types "github.com/ethereum/go-ethereum/core/types" -) - -// L2Mock is an autogenerated mock type for the EthClienter type -type L2Mock struct { - mock.Mock -} - -// BlockByHash provides a mock function with given fields: ctx, hash -func (_m *L2Mock) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error) { - ret := _m.Called(ctx, hash) - - if len(ret) == 0 { - panic("no return value specified for BlockByHash") - } - - var r0 *types.Block - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, common.Hash) (*types.Block, error)); ok { - return rf(ctx, hash) - } - if rf, ok := ret.Get(0).(func(context.Context, common.Hash) *types.Block); ok { - r0 = rf(ctx, hash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Block) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, common.Hash) error); ok { - r1 = rf(ctx, hash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockByNumber provides a mock function with given fields: ctx, number -func (_m *L2Mock) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) { - ret := _m.Called(ctx, number) - - if len(ret) == 0 { - panic("no return value specified for BlockByNumber") - } - - var r0 *types.Block - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *big.Int) (*types.Block, error)); ok { - return rf(ctx, number) - } - if rf, ok := ret.Get(0).(func(context.Context, *big.Int) *types.Block); ok { - r0 = rf(ctx, number) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Block) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *big.Int) error); ok { - r1 = rf(ctx, number) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// BlockNumber provides a mock function with given fields: ctx -func (_m *L2Mock) BlockNumber(ctx context.Context) (uint64, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for BlockNumber") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (uint64, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) uint64); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CallContract provides a mock function with given fields: ctx, call, blockNumber -func (_m *L2Mock) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { - ret := _m.Called(ctx, call, blockNumber) - - if len(ret) == 0 { - panic("no return value specified for CallContract") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ethereum.CallMsg, *big.Int) ([]byte, error)); ok { - return rf(ctx, call, blockNumber) - } - if rf, ok := ret.Get(0).(func(context.Context, ethereum.CallMsg, *big.Int) []byte); ok { - r0 = rf(ctx, call, blockNumber) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ethereum.CallMsg, *big.Int) error); ok { - r1 = rf(ctx, call, blockNumber) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Client provides a mock function with given fields: -func (_m *L2Mock) Client() *rpc.Client { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Client") - } - - var r0 *rpc.Client - if rf, ok := ret.Get(0).(func() *rpc.Client); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*rpc.Client) - } - } - - return r0 -} - -// CodeAt provides a mock function with given fields: ctx, contract, blockNumber -func (_m *L2Mock) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) { - ret := _m.Called(ctx, contract, blockNumber) - - if len(ret) == 0 { - panic("no return value specified for CodeAt") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, common.Address, *big.Int) ([]byte, error)); ok { - return rf(ctx, contract, blockNumber) - } - if rf, ok := ret.Get(0).(func(context.Context, common.Address, *big.Int) []byte); ok { - r0 = rf(ctx, contract, blockNumber) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, common.Address, *big.Int) error); ok { - r1 = rf(ctx, contract, blockNumber) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// EstimateGas provides a mock function with given fields: ctx, call -func (_m *L2Mock) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error) { - ret := _m.Called(ctx, call) - - if len(ret) == 0 { - panic("no return value specified for EstimateGas") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ethereum.CallMsg) (uint64, error)); ok { - return rf(ctx, call) - } - if rf, ok := ret.Get(0).(func(context.Context, ethereum.CallMsg) uint64); ok { - r0 = rf(ctx, call) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(context.Context, ethereum.CallMsg) error); ok { - r1 = rf(ctx, call) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterLogs provides a mock function with given fields: ctx, q -func (_m *L2Mock) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) { - ret := _m.Called(ctx, q) - - if len(ret) == 0 { - panic("no return value specified for FilterLogs") - } - - var r0 []types.Log - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ethereum.FilterQuery) ([]types.Log, error)); ok { - return rf(ctx, q) - } - if rf, ok := ret.Get(0).(func(context.Context, ethereum.FilterQuery) []types.Log); ok { - r0 = rf(ctx, q) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]types.Log) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ethereum.FilterQuery) error); ok { - r1 = rf(ctx, q) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// HeaderByHash provides a mock function with given fields: ctx, hash -func (_m *L2Mock) HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error) { - ret := _m.Called(ctx, hash) - - if len(ret) == 0 { - panic("no return value specified for HeaderByHash") - } - - var r0 *types.Header - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, common.Hash) (*types.Header, error)); ok { - return rf(ctx, hash) - } - if rf, ok := ret.Get(0).(func(context.Context, common.Hash) *types.Header); ok { - r0 = rf(ctx, hash) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Header) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, common.Hash) error); ok { - r1 = rf(ctx, hash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// HeaderByNumber provides a mock function with given fields: ctx, number -func (_m *L2Mock) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error) { - ret := _m.Called(ctx, number) - - if len(ret) == 0 { - panic("no return value specified for HeaderByNumber") - } - - var r0 *types.Header - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *big.Int) (*types.Header, error)); ok { - return rf(ctx, number) - } - if rf, ok := ret.Get(0).(func(context.Context, *big.Int) *types.Header); ok { - r0 = rf(ctx, number) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Header) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *big.Int) error); ok { - r1 = rf(ctx, number) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// PendingCodeAt provides a mock function with given fields: ctx, account -func (_m *L2Mock) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) { - ret := _m.Called(ctx, account) - - if len(ret) == 0 { - panic("no return value specified for PendingCodeAt") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, common.Address) ([]byte, error)); ok { - return rf(ctx, account) - } - if rf, ok := ret.Get(0).(func(context.Context, common.Address) []byte); ok { - r0 = rf(ctx, account) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, common.Address) error); ok { - r1 = rf(ctx, account) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// PendingNonceAt provides a mock function with given fields: ctx, account -func (_m *L2Mock) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) { - ret := _m.Called(ctx, account) - - if len(ret) == 0 { - panic("no return value specified for PendingNonceAt") - } - - var r0 uint64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, common.Address) (uint64, error)); ok { - return rf(ctx, account) - } - if rf, ok := ret.Get(0).(func(context.Context, common.Address) uint64); ok { - r0 = rf(ctx, account) - } else { - r0 = ret.Get(0).(uint64) - } - - if rf, ok := ret.Get(1).(func(context.Context, common.Address) error); ok { - r1 = rf(ctx, account) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SendTransaction provides a mock function with given fields: ctx, tx -func (_m *L2Mock) SendTransaction(ctx context.Context, tx *types.Transaction) error { - ret := _m.Called(ctx, tx) - - if len(ret) == 0 { - panic("no return value specified for SendTransaction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *types.Transaction) error); ok { - r0 = rf(ctx, tx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SubscribeFilterLogs provides a mock function with given fields: ctx, q, ch -func (_m *L2Mock) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { - ret := _m.Called(ctx, q, ch) - - if len(ret) == 0 { - panic("no return value specified for SubscribeFilterLogs") - } - - var r0 ethereum.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ethereum.FilterQuery, chan<- types.Log) (ethereum.Subscription, error)); ok { - return rf(ctx, q, ch) - } - if rf, ok := ret.Get(0).(func(context.Context, ethereum.FilterQuery, chan<- types.Log) ethereum.Subscription); ok { - r0 = rf(ctx, q, ch) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(ethereum.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ethereum.FilterQuery, chan<- types.Log) error); ok { - r1 = rf(ctx, q, ch) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SubscribeNewHead provides a mock function with given fields: ctx, ch -func (_m *L2Mock) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error) { - ret := _m.Called(ctx, ch) - - if len(ret) == 0 { - panic("no return value specified for SubscribeNewHead") - } - - var r0 ethereum.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, chan<- *types.Header) (ethereum.Subscription, error)); ok { - return rf(ctx, ch) - } - if rf, ok := ret.Get(0).(func(context.Context, chan<- *types.Header) ethereum.Subscription); ok { - r0 = rf(ctx, ch) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(ethereum.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, chan<- *types.Header) error); ok { - r1 = rf(ctx, ch) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SuggestGasPrice provides a mock function with given fields: ctx -func (_m *L2Mock) SuggestGasPrice(ctx context.Context) (*big.Int, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuggestGasPrice") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*big.Int, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *big.Int); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SuggestGasTipCap provides a mock function with given fields: ctx -func (_m *L2Mock) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SuggestGasTipCap") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*big.Int, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *big.Int); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TransactionCount provides a mock function with given fields: ctx, blockHash -func (_m *L2Mock) TransactionCount(ctx context.Context, blockHash common.Hash) (uint, error) { - ret := _m.Called(ctx, blockHash) - - if len(ret) == 0 { - panic("no return value specified for TransactionCount") - } - - var r0 uint - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, common.Hash) (uint, error)); ok { - return rf(ctx, blockHash) - } - if rf, ok := ret.Get(0).(func(context.Context, common.Hash) uint); ok { - r0 = rf(ctx, blockHash) - } else { - r0 = ret.Get(0).(uint) - } - - if rf, ok := ret.Get(1).(func(context.Context, common.Hash) error); ok { - r1 = rf(ctx, blockHash) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TransactionInBlock provides a mock function with given fields: ctx, blockHash, index -func (_m *L2Mock) TransactionInBlock(ctx context.Context, blockHash common.Hash, index uint) (*types.Transaction, error) { - ret := _m.Called(ctx, blockHash, index) - - if len(ret) == 0 { - panic("no return value specified for TransactionInBlock") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, common.Hash, uint) (*types.Transaction, error)); ok { - return rf(ctx, blockHash, index) - } - if rf, ok := ret.Get(0).(func(context.Context, common.Hash, uint) *types.Transaction); ok { - r0 = rf(ctx, blockHash, index) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, common.Hash, uint) error); ok { - r1 = rf(ctx, blockHash, index) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewL2Mock creates a new instance of L2Mock. 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 NewL2Mock(t interface { - mock.TestingT - Cleanup(func()) -}) *L2Mock { - mock := &L2Mock{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/bridgesync/mocks/eth_clienter.go b/bridgesync/mocks/eth_clienter.go index 12a99a98..fa1e60bc 100644 --- a/bridgesync/mocks/eth_clienter.go +++ b/bridgesync/mocks/eth_clienter.go @@ -1,6 +1,6 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. -package mocks_bridgesync +package mocks import ( big "math/big" diff --git a/bridgesync/mocks/reorg_detector.go b/bridgesync/mocks/reorg_detector.go index d24f4b83..605faf2f 100644 --- a/bridgesync/mocks/reorg_detector.go +++ b/bridgesync/mocks/reorg_detector.go @@ -1,6 +1,6 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. -package mocks_bridgesync +package mocks import ( context "context" diff --git a/dataavailability/mocks_da/batch_data_provider.go b/dataavailability/mocks_da/batch_data_provider.go index 36e782ac..9a682fc8 100644 --- a/dataavailability/mocks_da/batch_data_provider.go +++ b/dataavailability/mocks_da/batch_data_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_da diff --git a/dataavailability/mocks_da/da_backender.go b/dataavailability/mocks_da/da_backender.go index d7ae9a05..a03a9c98 100644 --- a/dataavailability/mocks_da/da_backender.go +++ b/dataavailability/mocks_da/da_backender.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_da diff --git a/dataavailability/mocks_da/data_manager.go b/dataavailability/mocks_da/data_manager.go index 34345d71..96d9adc8 100644 --- a/dataavailability/mocks_da/data_manager.go +++ b/dataavailability/mocks_da/data_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_da diff --git a/dataavailability/mocks_da/sequence_retriever.go b/dataavailability/mocks_da/sequence_retriever.go index f82d9a70..081a94b6 100644 --- a/dataavailability/mocks_da/sequence_retriever.go +++ b/dataavailability/mocks_da/sequence_retriever.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_da diff --git a/dataavailability/mocks_da/sequence_sender.go b/dataavailability/mocks_da/sequence_sender.go index f1e44741..ba5dc633 100644 --- a/dataavailability/mocks_da/sequence_sender.go +++ b/dataavailability/mocks_da/sequence_sender.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_da diff --git a/dataavailability/mocks_da/sequence_sender_banana.go b/dataavailability/mocks_da/sequence_sender_banana.go index aca7b1a3..33a1fabe 100644 --- a/dataavailability/mocks_da/sequence_sender_banana.go +++ b/dataavailability/mocks_da/sequence_sender_banana.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_da diff --git a/dataavailability/mocks_da/sequence_sender_elderberry.go b/dataavailability/mocks_da/sequence_sender_elderberry.go index 3816fa1b..7cf7f191 100644 --- a/dataavailability/mocks_da/sequence_sender_elderberry.go +++ b/dataavailability/mocks_da/sequence_sender_elderberry.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_da diff --git a/l1infotreesync/mocks/eth_clienter.go b/l1infotreesync/mocks/eth_clienter.go index 270c40d9..d89cbd98 100644 --- a/l1infotreesync/mocks/eth_clienter.go +++ b/l1infotreesync/mocks/eth_clienter.go @@ -1,6 +1,6 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. -package mocks_l1infotreesync +package mocks import ( context "context" diff --git a/l1infotreesync/mocks/mock_reorgdetector.go b/l1infotreesync/mocks/mock_reorg_detector.go similarity index 98% rename from l1infotreesync/mocks/mock_reorgdetector.go rename to l1infotreesync/mocks/mock_reorg_detector.go index 74a8afc3..04e4137a 100644 --- a/l1infotreesync/mocks/mock_reorgdetector.go +++ b/l1infotreesync/mocks/mock_reorg_detector.go @@ -1,6 +1,6 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. -package mocks_l1infotreesync +package mocks import ( context "context" diff --git a/reorgdetector/mock_eth_client.go b/reorgdetector/mock_eth_client.go index 1a42104b..ed33e8b2 100644 --- a/reorgdetector/mock_eth_client.go +++ b/reorgdetector/mock_eth_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package reorgdetector diff --git a/rpc/mocks/bridge_client_interface.go b/rpc/mocks/bridge_client_interface.go index 4c5200e4..4ab51d92 100644 --- a/rpc/mocks/bridge_client_interface.go +++ b/rpc/mocks/bridge_client_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/rpc/mocks/bridger.go b/rpc/mocks/bridger.go index d0344c29..ae5efbae 100644 --- a/rpc/mocks/bridger.go +++ b/rpc/mocks/bridger.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/rpc/mocks/claim_sponsorer.go b/rpc/mocks/claim_sponsorer.go index 9a9ef9b5..83e2b203 100644 --- a/rpc/mocks/claim_sponsorer.go +++ b/rpc/mocks/claim_sponsorer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/rpc/mocks/client_factory_interface.go b/rpc/mocks/client_factory_interface.go index aca7aed0..3b9b4fc7 100644 --- a/rpc/mocks/client_factory_interface.go +++ b/rpc/mocks/client_factory_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/rpc/mocks/client_interface.go b/rpc/mocks/client_interface.go index 28b87775..8c8a02cc 100644 --- a/rpc/mocks/client_interface.go +++ b/rpc/mocks/client_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/rpc/mocks/l1_info_treer.go b/rpc/mocks/l1_info_treer.go index a4e0f66c..0ac4f651 100644 --- a/rpc/mocks/l1_info_treer.go +++ b/rpc/mocks/l1_info_treer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks @@ -27,7 +27,7 @@ func (_m *L1InfoTreer) EXPECT() *L1InfoTreer_Expecter { return &L1InfoTreer_Expecter{mock: &_m.Mock} } -// GetFirstInfo provides a mock function with given fields: +// GetFirstInfo provides a mock function with no fields func (_m *L1InfoTreer) GetFirstInfo() (*l1infotreesync.L1InfoTreeLeaf, error) { ret := _m.Called() @@ -376,7 +376,7 @@ func (_c *L1InfoTreer_GetInfoByIndex_Call) RunAndReturn(run func(context.Context return _c } -// GetLastInfo provides a mock function with given fields: +// GetLastInfo provides a mock function with no fields func (_m *L1InfoTreer) GetLastInfo() (*l1infotreesync.L1InfoTreeLeaf, error) { ret := _m.Called() diff --git a/rpc/mocks/last_ge_rer.go b/rpc/mocks/last_ge_rer.go index 7b338e2e..4e83d5ba 100644 --- a/rpc/mocks/last_ge_rer.go +++ b/rpc/mocks/last_ge_rer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/sequencesender/mocks/mock_etherman.go b/sequencesender/mocks/etherman.go similarity index 99% rename from sequencesender/mocks/mock_etherman.go rename to sequencesender/mocks/etherman.go index 298d96c3..8be53a5d 100644 --- a/sequencesender/mocks/mock_etherman.go +++ b/sequencesender/mocks/etherman.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/sequencesender/mocks/mock_ethtxmanager.go b/sequencesender/mocks/mock_ethtxmanager.go index 3d0ebebc..fca8ef1f 100644 --- a/sequencesender/mocks/mock_ethtxmanager.go +++ b/sequencesender/mocks/mock_ethtxmanager.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/sequencesender/mocks/mock_rpc.go b/sequencesender/mocks/rpc_interface.go similarity index 98% rename from sequencesender/mocks/mock_rpc.go rename to sequencesender/mocks/rpc_interface.go index eef0188d..19a638dd 100644 --- a/sequencesender/mocks/mock_rpc.go +++ b/sequencesender/mocks/rpc_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks diff --git a/sequencesender/mocks/mock_txbuilder.go b/sequencesender/mocks/tx_builder.go similarity index 99% rename from sequencesender/mocks/mock_txbuilder.go rename to sequencesender/mocks/tx_builder.go index 0607313b..7a6c9ff3 100644 --- a/sequencesender/mocks/mock_txbuilder.go +++ b/sequencesender/mocks/tx_builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.40.1. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks @@ -307,7 +307,7 @@ func (_c *TxBuilderMock_SetCondNewSeq_Call) RunAndReturn(run func(txbuilder.Cond return _c } -// String provides a mock function with given fields: +// String provides a mock function with no fields func (_m *TxBuilderMock) String() string { ret := _m.Called() diff --git a/sequencesender/txbuilder/mocks_txbuilder/cond_new_sequence.go b/sequencesender/txbuilder/mocks_txbuilder/cond_new_sequence.go index ae818ce9..8942ec7f 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/cond_new_sequence.go +++ b/sequencesender/txbuilder/mocks_txbuilder/cond_new_sequence.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_contractor.go index 86fd4366..a89d70ba 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_contractor.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_zkevm_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_zkevm_contractor.go index 57c6c157..1a6aa52e 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_zkevm_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/global_exit_root_banana_zkevm_contractor.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/l1_client.go b/sequencesender/txbuilder/mocks_txbuilder/l1_client.go index 853494f9..113e9855 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/l1_client.go +++ b/sequencesender/txbuilder/mocks_txbuilder/l1_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/l1_info_syncer.go b/sequencesender/txbuilder/mocks_txbuilder/l1_info_syncer.go index 12d641a8..a38f9cec 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/l1_info_syncer.go +++ b/sequencesender/txbuilder/mocks_txbuilder/l1_info_syncer.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_base_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_base_contractor.go index acd82a4e..60551ef5 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_base_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_base_contractor.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_validium_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_validium_contractor.go index a59b88dd..f4a1969f 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_validium_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_validium_contractor.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_zkevm_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_zkevm_contractor.go index e29e3252..b0e1a233 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_zkevm_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/rollup_banana_zkevm_contractor.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/rollup_elderberry_validium_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/rollup_elderberry_validium_contractor.go index 0d94c081..1e9d3061 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/rollup_elderberry_validium_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/rollup_elderberry_validium_contractor.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/rollup_elderberry_zkevm_contractor.go b/sequencesender/txbuilder/mocks_txbuilder/rollup_elderberry_zkevm_contractor.go index 1ed208ab..2f6166e6 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/rollup_elderberry_zkevm_contractor.go +++ b/sequencesender/txbuilder/mocks_txbuilder/rollup_elderberry_zkevm_contractor.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sequencesender/txbuilder/mocks_txbuilder/tx_builder.go b/sequencesender/txbuilder/mocks_txbuilder/tx_builder.go index 32ab8ab4..63c54144 100644 --- a/sequencesender/txbuilder/mocks_txbuilder/tx_builder.go +++ b/sequencesender/txbuilder/mocks_txbuilder/tx_builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package mocks_txbuilder diff --git a/sync/mock_l2_test.go b/sync/mock_eth_clienter.go similarity index 99% rename from sync/mock_l2_test.go rename to sync/mock_eth_clienter.go index 955af0db..bf19df78 100644 --- a/sync/mock_l2_test.go +++ b/sync/mock_eth_clienter.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package sync diff --git a/sync/mock_downloader_test.go b/sync/mock_evm_downloader_full.go similarity index 99% rename from sync/mock_downloader_test.go rename to sync/mock_evm_downloader_full.go index 662f49f7..1cdebef2 100644 --- a/sync/mock_downloader_test.go +++ b/sync/mock_evm_downloader_full.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package sync diff --git a/sync/mock_processor_test.go b/sync/mock_processor_interface.go similarity index 99% rename from sync/mock_processor_test.go rename to sync/mock_processor_interface.go index 96ece8d4..aa3d0330 100644 --- a/sync/mock_processor_test.go +++ b/sync/mock_processor_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package sync diff --git a/sync/mock_reorgdetector_test.go b/sync/mock_reorg_detector.go similarity index 98% rename from sync/mock_reorgdetector_test.go rename to sync/mock_reorg_detector.go index 43551baa..ad466d58 100644 --- a/sync/mock_reorgdetector_test.go +++ b/sync/mock_reorg_detector.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package sync diff --git a/test/Makefile b/test/Makefile index 2b621797..065ab8d6 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,64 +1,6 @@ .PHONY: generate-mocks -generate-mocks: generate-mocks-bridgesync generate-mocks-reorgdetector \ - generate-mocks-sequencesender generate-mocks-da \ - generate-mocks-l1infotreesync generate-mocks-helpers \ - generate-mocks-sync generate-mocks-aggregator \ - generate-mocks-agglayer - -.PHONY: generate-mocks-bridgesync -generate-mocks-bridgesync: ## Generates mocks for bridgesync, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../bridgesync --output ../bridgesync/mocks --outpkg mocks_bridgesync ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-reorgdetector -generate-mocks-reorgdetector: ## Generates mocks for reorgdetector, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthClient --dir=../reorgdetector --output=../reorgdetector --outpkg=reorgdetector --inpackage --structname=EthClientMock --filename=mock_eth_client.go ${COMMON_MOCKERY_PARAMS} - -COMMON_MOCKERY_PARAMS=--disable-version-string --with-expecter --exported -.PHONY: generate-mocks-sequencesender -generate-mocks-sequencesender: ## Generates mocks for sequencesender, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../sequencesender/txbuilder --output ../sequencesender/txbuilder/mocks_txbuilder --outpkg mocks_txbuilder ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManager --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=EthTxManagerMock --filename=mock_ethtxmanager.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Etherman --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=EthermanMock --filename=mock_etherman.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=RPCInterface --dir=../sequencesender --output=../sequencesender/mocks --outpkg=mocks --structname=RPCInterfaceMock --filename=mock_rpc.go ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-da -generate-mocks-da: ## Generates mocks for dataavailability, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../dataavailability --output ../dataavailability/mocks_da --outpkg mocks_da ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-rpc -generate-mocks-rpc: ## Generates mocks for rpc, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../rpc --output ../rpc/mocks --outpkg mocks ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-l1infotreesync -generate-mocks-l1infotreesync: ## Generates mocks for l1infotreesync, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --all --case snake --dir ../l1infotreesync --output ../l1infotreesync/mocks --outpkg mocks_l1infotreesync ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ReorgDetector --dir=../sync --output=../l1infotreesync/mocks --outpkg=mocks_l1infotreesync --structname=ReorgDetectorMock --filename=mock_reorgdetector.go ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-helpers -generate-mocks-helpers: ## Generates mocks for helpers, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManager --dir=../sequencesender --output=./helpers --outpkg=helpers --structname=EthTxManagerMock --filename=mock_ethtxmanager.go ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-sync -generate-mocks-sync: ## Generates mocks for sync, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthClienter --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=L2Mock --filename=mock_l2_test.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=evmDownloaderFull --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=EVMDownloaderMock --filename=mock_downloader_test.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=processorInterface --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=ProcessorMock --filename=mock_processor_test.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ReorgDetector --dir=../sync --output=../sync --outpkg=sync --inpackage --structname=ReorgDetectorMock --filename=mock_reorgdetector_test.go ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-aggregator -generate-mocks-aggregator: ## Generates mocks for aggregator, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ProverInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=ProverInterfaceMock --filename=mock_prover.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Etherman --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=EthermanMock --filename=mock_etherman.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=StorageInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=StorageInterfaceMock --filename=mock_storage.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Synchronizer --srcpkg=github.com/0xPolygonHermez/zkevm-synchronizer-l1/synchronizer --output=../aggregator/mocks --outpkg=mocks --structname=SynchronizerInterfaceMock --filename=mock_synchronizer.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=EthTxManagerClient --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=EthTxManagerClientMock --filename=mock_eth_tx_manager.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Txer --dir=../db --output=../aggregator/mocks --outpkg=mocks --structname=TxerMock --filename=mock_txer.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=RPCInterface --dir=../aggregator --output=../aggregator/mocks --outpkg=mocks --structname=RPCInterfaceMock --filename=mock_rpc.go ${COMMON_MOCKERY_PARAMS} - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=AggregatorService_ChannelServer --dir=../aggregator/prover --output=../aggregator/prover/mocks --outpkg=mocks --structname=ChannelMock --filename=mock_channel.go ${COMMON_MOCKERY_PARAMS} - -.PHONY: generate-mocks-agglayer -generate-mocks-agglayer: ## Generates mocks for agglayer, using mockery tool - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=AgglayerClientInterface --dir=../agglayer --output=../agglayer --outpkg=agglayer --inpackage --structname=AgglayerClientMock --filename=mock_agglayer_client.go ${COMMON_MOCKERY_PARAMS} +generate-mocks: + mockery .PHONY: test-e2e-fork9-validium test-e2e-fork9-validium: stop diff --git a/test/helpers/mock_ethtxmanager.go b/test/helpers/mock_ethtxmanager.go index 7937bf1d..f06ba2bf 100644 --- a/test/helpers/mock_ethtxmanager.go +++ b/test/helpers/mock_ethtxmanager.go @@ -1,4 +1,4 @@ -// Code generated by mockery. DO NOT EDIT. +// Code generated by mockery v2.50.2. DO NOT EDIT. package helpers