diff --git a/core/chains/evm/forwarders/mocks/orm.go b/core/chains/evm/forwarders/mocks/orm.go index 691fbce8e9c..5786a1cd277 100644 --- a/core/chains/evm/forwarders/mocks/orm.go +++ b/core/chains/evm/forwarders/mocks/orm.go @@ -6,11 +6,13 @@ import ( common "github.com/ethereum/go-ethereum/common" big "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" + context "context" + forwarders "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" mock "github.com/stretchr/testify/mock" - pg "github.com/smartcontractkit/chainlink/v2/core/services/pg" + sqlutil "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ) // ORM is an autogenerated mock type for the ORM type @@ -18,9 +20,9 @@ type ORM struct { mock.Mock } -// CreateForwarder provides a mock function with given fields: addr, evmChainId -func (_m *ORM) CreateForwarder(addr common.Address, evmChainId big.Big) (forwarders.Forwarder, error) { - ret := _m.Called(addr, evmChainId) +// CreateForwarder provides a mock function with given fields: ctx, addr, evmChainId +func (_m *ORM) CreateForwarder(ctx context.Context, addr common.Address, evmChainId big.Big) (forwarders.Forwarder, error) { + ret := _m.Called(ctx, addr, evmChainId) if len(ret) == 0 { panic("no return value specified for CreateForwarder") @@ -28,17 +30,17 @@ func (_m *ORM) CreateForwarder(addr common.Address, evmChainId big.Big) (forward var r0 forwarders.Forwarder var r1 error - if rf, ok := ret.Get(0).(func(common.Address, big.Big) (forwarders.Forwarder, error)); ok { - return rf(addr, evmChainId) + if rf, ok := ret.Get(0).(func(context.Context, common.Address, big.Big) (forwarders.Forwarder, error)); ok { + return rf(ctx, addr, evmChainId) } - if rf, ok := ret.Get(0).(func(common.Address, big.Big) forwarders.Forwarder); ok { - r0 = rf(addr, evmChainId) + if rf, ok := ret.Get(0).(func(context.Context, common.Address, big.Big) forwarders.Forwarder); ok { + r0 = rf(ctx, addr, evmChainId) } else { r0 = ret.Get(0).(forwarders.Forwarder) } - if rf, ok := ret.Get(1).(func(common.Address, big.Big) error); ok { - r1 = rf(addr, evmChainId) + if rf, ok := ret.Get(1).(func(context.Context, common.Address, big.Big) error); ok { + r1 = rf(ctx, addr, evmChainId) } else { r1 = ret.Error(1) } @@ -46,17 +48,17 @@ func (_m *ORM) CreateForwarder(addr common.Address, evmChainId big.Big) (forward return r0, r1 } -// DeleteForwarder provides a mock function with given fields: id, cleanup -func (_m *ORM) DeleteForwarder(id int64, cleanup func(pg.Queryer, int64, common.Address) error) error { - ret := _m.Called(id, cleanup) +// DeleteForwarder provides a mock function with given fields: ctx, id, cleanup +func (_m *ORM) DeleteForwarder(ctx context.Context, id int64, cleanup func(sqlutil.Queryer, int64, common.Address) error) error { + ret := _m.Called(ctx, id, cleanup) if len(ret) == 0 { panic("no return value specified for DeleteForwarder") } var r0 error - if rf, ok := ret.Get(0).(func(int64, func(pg.Queryer, int64, common.Address) error) error); ok { - r0 = rf(id, cleanup) + if rf, ok := ret.Get(0).(func(context.Context, int64, func(sqlutil.Queryer, int64, common.Address) error) error); ok { + r0 = rf(ctx, id, cleanup) } else { r0 = ret.Error(0) } @@ -64,9 +66,9 @@ func (_m *ORM) DeleteForwarder(id int64, cleanup func(pg.Queryer, int64, common. return r0 } -// FindForwarders provides a mock function with given fields: offset, limit -func (_m *ORM) FindForwarders(offset int, limit int) ([]forwarders.Forwarder, int, error) { - ret := _m.Called(offset, limit) +// FindForwarders provides a mock function with given fields: ctx, offset, limit +func (_m *ORM) FindForwarders(ctx context.Context, offset int, limit int) ([]forwarders.Forwarder, int, error) { + ret := _m.Called(ctx, offset, limit) if len(ret) == 0 { panic("no return value specified for FindForwarders") @@ -75,25 +77,25 @@ func (_m *ORM) FindForwarders(offset int, limit int) ([]forwarders.Forwarder, in var r0 []forwarders.Forwarder var r1 int var r2 error - if rf, ok := ret.Get(0).(func(int, int) ([]forwarders.Forwarder, int, error)); ok { - return rf(offset, limit) + if rf, ok := ret.Get(0).(func(context.Context, int, int) ([]forwarders.Forwarder, int, error)); ok { + return rf(ctx, offset, limit) } - if rf, ok := ret.Get(0).(func(int, int) []forwarders.Forwarder); ok { - r0 = rf(offset, limit) + if rf, ok := ret.Get(0).(func(context.Context, int, int) []forwarders.Forwarder); ok { + r0 = rf(ctx, offset, limit) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]forwarders.Forwarder) } } - if rf, ok := ret.Get(1).(func(int, int) int); ok { - r1 = rf(offset, limit) + if rf, ok := ret.Get(1).(func(context.Context, int, int) int); ok { + r1 = rf(ctx, offset, limit) } else { r1 = ret.Get(1).(int) } - if rf, ok := ret.Get(2).(func(int, int) error); ok { - r2 = rf(offset, limit) + if rf, ok := ret.Get(2).(func(context.Context, int, int) error); ok { + r2 = rf(ctx, offset, limit) } else { r2 = ret.Error(2) } @@ -101,9 +103,9 @@ func (_m *ORM) FindForwarders(offset int, limit int) ([]forwarders.Forwarder, in return r0, r1, r2 } -// FindForwardersByChain provides a mock function with given fields: evmChainId -func (_m *ORM) FindForwardersByChain(evmChainId big.Big) ([]forwarders.Forwarder, error) { - ret := _m.Called(evmChainId) +// FindForwardersByChain provides a mock function with given fields: ctx, evmChainId +func (_m *ORM) FindForwardersByChain(ctx context.Context, evmChainId big.Big) ([]forwarders.Forwarder, error) { + ret := _m.Called(ctx, evmChainId) if len(ret) == 0 { panic("no return value specified for FindForwardersByChain") @@ -111,19 +113,19 @@ func (_m *ORM) FindForwardersByChain(evmChainId big.Big) ([]forwarders.Forwarder var r0 []forwarders.Forwarder var r1 error - if rf, ok := ret.Get(0).(func(big.Big) ([]forwarders.Forwarder, error)); ok { - return rf(evmChainId) + if rf, ok := ret.Get(0).(func(context.Context, big.Big) ([]forwarders.Forwarder, error)); ok { + return rf(ctx, evmChainId) } - if rf, ok := ret.Get(0).(func(big.Big) []forwarders.Forwarder); ok { - r0 = rf(evmChainId) + if rf, ok := ret.Get(0).(func(context.Context, big.Big) []forwarders.Forwarder); ok { + r0 = rf(ctx, evmChainId) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]forwarders.Forwarder) } } - if rf, ok := ret.Get(1).(func(big.Big) error); ok { - r1 = rf(evmChainId) + if rf, ok := ret.Get(1).(func(context.Context, big.Big) error); ok { + r1 = rf(ctx, evmChainId) } else { r1 = ret.Error(1) } @@ -131,9 +133,9 @@ func (_m *ORM) FindForwardersByChain(evmChainId big.Big) ([]forwarders.Forwarder return r0, r1 } -// FindForwardersInListByChain provides a mock function with given fields: evmChainId, addrs -func (_m *ORM) FindForwardersInListByChain(evmChainId big.Big, addrs []common.Address) ([]forwarders.Forwarder, error) { - ret := _m.Called(evmChainId, addrs) +// FindForwardersInListByChain provides a mock function with given fields: ctx, evmChainId, addrs +func (_m *ORM) FindForwardersInListByChain(ctx context.Context, evmChainId big.Big, addrs []common.Address) ([]forwarders.Forwarder, error) { + ret := _m.Called(ctx, evmChainId, addrs) if len(ret) == 0 { panic("no return value specified for FindForwardersInListByChain") @@ -141,19 +143,19 @@ func (_m *ORM) FindForwardersInListByChain(evmChainId big.Big, addrs []common.Ad var r0 []forwarders.Forwarder var r1 error - if rf, ok := ret.Get(0).(func(big.Big, []common.Address) ([]forwarders.Forwarder, error)); ok { - return rf(evmChainId, addrs) + if rf, ok := ret.Get(0).(func(context.Context, big.Big, []common.Address) ([]forwarders.Forwarder, error)); ok { + return rf(ctx, evmChainId, addrs) } - if rf, ok := ret.Get(0).(func(big.Big, []common.Address) []forwarders.Forwarder); ok { - r0 = rf(evmChainId, addrs) + if rf, ok := ret.Get(0).(func(context.Context, big.Big, []common.Address) []forwarders.Forwarder); ok { + r0 = rf(ctx, evmChainId, addrs) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]forwarders.Forwarder) } } - if rf, ok := ret.Get(1).(func(big.Big, []common.Address) error); ok { - r1 = rf(evmChainId, addrs) + if rf, ok := ret.Get(1).(func(context.Context, big.Big, []common.Address) error); ok { + r1 = rf(ctx, evmChainId, addrs) } else { r1 = ret.Error(1) } diff --git a/go.mod b/go.mod index c0ef2b819de..621091f56f7 100644 --- a/go.mod +++ b/go.mod @@ -97,6 +97,7 @@ require ( go.uber.org/zap v1.26.0 golang.org/x/crypto v0.19.0 golang.org/x/exp v0.0.0-20240213143201-ec583247a57a + golang.org/x/net v0.21.0 golang.org/x/sync v0.6.0 golang.org/x/term v0.17.0 golang.org/x/text v0.14.0 @@ -316,7 +317,6 @@ require ( go.uber.org/ratelimit v0.2.0 // indirect golang.org/x/arch v0.7.0 // indirect golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.21.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect