From 330977ebace2aac52175355347e08cd4b0dc3770 Mon Sep 17 00:00:00 2001 From: nogo <0xnogo@gmail.com> Date: Thu, 18 Jul 2024 17:28:07 +0200 Subject: [PATCH] removing mockery generate --- .mockery.yaml | 144 +++++++++++++++++- core/gethwrappers/ccip/go_generate.go | 9 -- .../liquiditymanager/go_generate.go | 15 -- 3 files changed, 140 insertions(+), 28 deletions(-) diff --git a/.mockery.yaml b/.mockery.yaml index db632a09a2d..5e438c4a8f8 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -314,7 +314,143 @@ packages: dir: core/services/relay/evm/mocks ChainReader: ChainWriter: - - - - + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_onramp: + config: + dir: core/gethwrappers/ccip/mocks/ + filename: evm_2_evm_onramp.go + outpkg: mock_contracts + interfaces: + EVM2EVMOnRampInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_offramp: + config: + dir: core/gethwrappers/ccip/mocks/ + filename: evm_2_evm_offramp.go + outpkg: mock_contracts + interfaces: + EVM2EVMOffRampInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_offramp_1_2_0: + config: + dir: core/gethwrappers/ccip/mocks/v1_2_0/ + filename: evm_2_evm_offramp_1_2_0.go + outpkg: mock_contracts + interfaces: + EVM2EVMOffRampInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/evm_2_evm_offramp_1_0_0: + config: + dir: core/gethwrappers/ccip/mocks/v1_0_0/ + filename: evm_2_evm_offramp_1_0_0.go + outpkg: mock_contracts + interfaces: + EVM2EVMOffRampInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/commit_store: + config: + dir: core/gethwrappers/ccip/mocks/ + filename: commit_store.go + outpkg: mock_contracts + interfaces: + CommitStoreInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/price_registry: + config: + dir: core/gethwrappers/ccip/mocks/ + filename: price_registry.go + outpkg: mock_contracts + interfaces: + PriceRegistryInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface: + config: + dir: core/gethwrappers/ccip/mocks/ + filename: link_token_interface.go + outpkg: mock_contracts + interfaces: + LinkTokenInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/arbitrum_l1_bridge_adapter: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_arbitrum_l1_bridge_adapter/ + filename: arbitrum_l1_bridge_adapter.go + outpkg: mock_arbitrum_l1_bridge_adapter + interfaces: + ArbitrumL1BridgeAdapterInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/arbitrum_l2_bridge_adapter: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_arbitrum_l2_bridge_adapter/ + filename: arbitrum_l2_bridge_adapter.go + outpkg: mock_arbitrum_l2_bridge_adapter + interfaces: + ArbitrumL2BridgeAdapterInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/arbitrum_gateway_router: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_arbitrum_gateway_router/ + filename: arbitrum_gateway_router.go + outpkg: mock_arbitrum_gateway_router + interfaces: + ArbitrumGatewayRouterInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/arbitrum_inbox: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_arbitrum_inbox/ + filename: arbitrum_inbox.go + outpkg: mock_arbitrum_inbox + interfaces: + ArbitrumInboxInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/l2_arbitrum_gateway: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_l2_arbitrum_gateway/ + filename: l2_arbitrum_gateway.go + outpkg: mock_l2_arbitrum_gateway + interfaces: + L2ArbitrumGatewayInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/arbsys: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_arbsys/ + filename: arbsys.go + outpkg: mock_arbsys + interfaces: + ArbSysInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/arb_node_interface: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_node_interface/ + filename: arb_node_interface.go + outpkg: mock_node_interface + interfaces: + NodeInterfaceInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/l2_arbitrum_messenger: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_l2_arbitrum_messenger/ + filename: l2_arbitrum_messenger.go + outpkg: mock_l2_arbitrum_messenger + interfaces: + L2ArbitrumMessengerInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/arbitrum_rollup_core: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_arbitrum_rollup_core/ + filename: arbitrum_rollup_core.go + outpkg: mock_arbitrum_rollup_core + interfaces: + ArbRollupCoreInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/optimism_portal: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_optimism_portal/ + filename: optimism_portal.go + outpkg: mock_optimism_portal + interfaces: + OptimismPortalInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/optimism_l2_output_oracle: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_optimism_l2_output_oracle/ + filename: optimism_l2_output_oracle.go + outpkg: mock_optimism_l2_output_oracle + interfaces: + OptimismL2OutputOracleInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/optimism_portal_2: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_optimism_portal_2/ + filename: optimism_portal_2.go + outpkg: mock_optimism_portal_2 + interfaces: + OptimismPortal2Interface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/liquiditymanager/generated/optimism_dispute_game_factory: + config: + dir: core/gethwrappers/liquiditymanager/mocks/mock_optimism_dispute_game_factory/ + filename: optimism_dispute_game_factory.go + outpkg: mock_optimism_dispute_game_factory + interfaces: + OptimismDisputeGameFactoryInterface: diff --git a/core/gethwrappers/ccip/go_generate.go b/core/gethwrappers/ccip/go_generate.go index 50b212dfe4f..1e280416c77 100644 --- a/core/gethwrappers/ccip/go_generate.go +++ b/core/gethwrappers/ccip/go_generate.go @@ -43,15 +43,6 @@ package ccip // Customer contracts //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.abi ../../../contracts/solc/v0.8.24/USDCTokenPool/USDCTokenPool.bin USDCTokenPool usdc_token_pool -// Generate mocks for our contracts -//go:generate mockery --quiet --dir ./generated/evm_2_evm_onramp/ --name EVM2EVMOnRampInterface --output ./mocks/ --outpkg mock_contracts --case=underscore -//go:generate mockery --quiet --dir ./generated/evm_2_evm_offramp/ --name EVM2EVMOffRampInterface --output ./mocks/ --outpkg mock_contracts --case=underscore -//go:generate mockery --quiet --dir ./generated/evm_2_evm_offramp_1_2_0/ --name EVM2EVMOffRampInterface --output ./mocks/v1_2_0/ --outpkg mock_contracts --case=underscore -//go:generate mockery --quiet --dir ./generated/evm_2_evm_offramp_1_0_0/ --name EVM2EVMOffRampInterface --output ./mocks/v1_0_0/ --outpkg mock_contracts --case=underscore -//go:generate mockery --quiet --dir ./generated/commit_store/ --name CommitStoreInterface --output ./mocks/ --outpkg mock_contracts --case=underscore -//go:generate mockery --quiet --dir ./generated/price_registry/ --name PriceRegistryInterface --output ./mocks/ --outpkg mock_contracts --case=underscore -//go:generate mockery --quiet --dir ../generated/link_token_interface/ --name LinkTokenInterface --output ./mocks/ --outpkg mock_contracts --case=underscore - // To run these commands, you must either install docker, or the correct version // of abigen. The latter can be installed with these commands, at least on linux: // diff --git a/core/gethwrappers/liquiditymanager/go_generate.go b/core/gethwrappers/liquiditymanager/go_generate.go index 5fb81744650..93507793bbd 100644 --- a/core/gethwrappers/liquiditymanager/go_generate.go +++ b/core/gethwrappers/liquiditymanager/go_generate.go @@ -35,18 +35,3 @@ package liquiditymanager //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/IOptimismDisputeGameFactory/IOptimismDisputeGameFactory.abi ../../../contracts/solc/v0.8.24/IOptimismDisputeGameFactory/IOptimismDisputeGameFactory.bin OptimismDisputeGameFactory optimism_dispute_game_factory //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/IOptimismStandardBridge/IOptimismStandardBridge.abi ../../../contracts/solc/v0.8.24/IOptimismStandardBridge/IOptimismStandardBridge.bin OptimismStandardBridge optimism_standard_bridge //go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/IOptimismL1StandardBridge/IOptimismL1StandardBridge.abi ../../../contracts/solc/v0.8.24/IOptimismL1StandardBridge/IOptimismL1StandardBridge.bin OptimismL1StandardBridge optimism_l1_standard_bridge - -// Generate mocks for tests -//go:generate mockery --quiet --dir ./generated/arbitrum_l1_bridge_adapter/ --name ArbitrumL1BridgeAdapterInterface --output ./mocks/mock_arbitrum_l1_bridge_adapter --outpkg mock_arbitrum_l1_bridge_adapter --case=underscore -//go:generate mockery --quiet --dir ./generated/arbitrum_l2_bridge_adapter/ --name ArbitrumL2BridgeAdapterInterface --output ./mocks/mock_arbitrum_l2_bridge_adapter --outpkg mock_arbitrum_l2_bridge_adapter --case=underscore -//go:generate mockery --quiet --dir ./generated/arbitrum_gateway_router/ --name ArbitrumGatewayRouterInterface --output ./mocks/mock_arbitrum_gateway_router --outpkg mock_arbitrum_gateway_router --case=underscore -//go:generate mockery --quiet --dir ./generated/arbitrum_inbox/ --name ArbitrumInboxInterface --output ./mocks/mock_arbitrum_inbox --outpkg mock_arbitrum_inbox --case=underscore -//go:generate mockery --quiet --dir ./generated/l2_arbitrum_gateway/ --name L2ArbitrumGatewayInterface --output ./mocks/mock_l2_arbitrum_gateway --outpkg mock_l2_arbitrum_gateway --case=underscore -//go:generate mockery --quiet --dir ./generated/arbsys/ --name ArbSysInterface --output ./mocks/mock_arbsys --outpkg mock_arbsys --case=underscore -//go:generate mockery --quiet --dir ./generated/arb_node_interface/ --name NodeInterfaceInterface --output ./mocks/mock_node_interface --outpkg mock_node_interface --case=underscore -//go:generate mockery --quiet --dir ./generated/l2_arbitrum_messenger/ --name L2ArbitrumMessengerInterface --output ./mocks/mock_l2_arbitrum_messenger --outpkg mock_l2_arbitrum_messenger --case=underscore -//go:generate mockery --quiet --dir ./generated/arbitrum_rollup_core/ --name ArbRollupCoreInterface --output ./mocks/mock_arbitrum_rollup_core --outpkg mock_arbitrum_rollup_core --case=underscore -//go:generate mockery --quiet --dir ./generated/optimism_portal/ --name OptimismPortalInterface --output ./mocks/mock_optimism_portal --outpkg mock_optimism_portal --case=underscore -//go:generate mockery --quiet --dir ./generated/optimism_l2_output_oracle/ --name OptimismL2OutputOracleInterface --output ./mocks/mock_optimism_l2_output_oracle --outpkg mock_optimism_l2_output_oracle --case=underscore -//go:generate mockery --quiet --dir ./generated/optimism_portal_2/ --name OptimismPortal2Interface --output ./mocks/mock_optimism_portal_2 --outpkg mock_optimism_portal_2 --case=underscore -//go:generate mockery --quiet --dir ./generated/optimism_dispute_game_factory/ --name OptimismDisputeGameFactoryInterface --output ./mocks/mock_optimism_dispute_game_factory --outpkg mock_optimism_dispute_game_factory --case=underscore