From f769d2e206dc508d629ea93ff81960a65d6e23cf Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Abou Hatem De Liz Date: Thu, 13 Jul 2023 17:53:53 -0300 Subject: [PATCH 1/2] adding config to hardhat nodes with zkevm network; --- balancer-js/hardhat.config.zkevm.ts | 12 ++++++++++++ balancer-js/package.json | 1 + 2 files changed, 13 insertions(+) create mode 100644 balancer-js/hardhat.config.zkevm.ts diff --git a/balancer-js/hardhat.config.zkevm.ts b/balancer-js/hardhat.config.zkevm.ts new file mode 100644 index 000000000..591be8898 --- /dev/null +++ b/balancer-js/hardhat.config.zkevm.ts @@ -0,0 +1,12 @@ +import '@nomiclabs/hardhat-ethers'; + +/** + * @type import('hardhat/config').HardhatUserConfig + */ +export default { + networks: { + hardhat: { + chainId: 1101, + }, + }, +}; diff --git a/balancer-js/package.json b/balancer-js/package.json index 05ac61949..3a3d0b288 100644 --- a/balancer-js/package.json +++ b/balancer-js/package.json @@ -34,6 +34,7 @@ "node:polygon": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.polygon.ts node --fork $(. ./.env && echo $ALCHEMY_URL_POLYGON) --port 8137", "node:arbitrum": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.arbitrum.ts node --fork $(. ./.env && echo $ALCHEMY_URL_ARBITRUM) --port 8161", "node:gnosis": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.gnosis.ts node --fork $(. ./.env && echo $RPC_URL_GNOSIS) --port 8100", + "node:zkevm": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.zkevm.ts node --fork $(. ./.env && echo $ALCHEMY_URL_ZKEVM) --port 8101", "typechain:generate": "npx typechain --target ethers-v5 --out-dir src/contracts './src/lib/abi/*.json'" }, "devDependencies": { From 62facaedb71a448c5b9de55cfd64c71b305c9156 Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Abou Hatem De Liz Date: Mon, 17 Jul 2023 15:50:10 -0300 Subject: [PATCH 2/2] adding ZkEVM config to RPC_URL and FORK_NODES; --- balancer-js/src/test/lib/utils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/balancer-js/src/test/lib/utils.ts b/balancer-js/src/test/lib/utils.ts index 2e6bca26a..5fd58def1 100644 --- a/balancer-js/src/test/lib/utils.ts +++ b/balancer-js/src/test/lib/utils.ts @@ -64,6 +64,7 @@ export const RPC_URLS: Record = { [Network.GOERLI]: `http://127.0.0.1:8000`, [Network.POLYGON]: `http://127.0.0.1:8137`, [Network.ARBITRUM]: `http://127.0.0.1:8161`, + [Network.ZKEVM]: `http://127.0.0.1:8101`, }; export const FORK_NODES: Record = { @@ -71,6 +72,7 @@ export const FORK_NODES: Record = { [Network.GOERLI]: `${process.env.ALCHEMY_URL_GOERLI}`, [Network.POLYGON]: `${process.env.ALCHEMY_URL_POLYGON}`, [Network.ARBITRUM]: `${process.env.ALCHEMY_URL_ARBITRUM}`, + [Network.ZKEVM]: `${process.env.ALCHEMY_URL_ZKEVM}`, }; /**