From ac8e5843d4b7d089858a36b88826b10c963c4f7b Mon Sep 17 00:00:00 2001 From: Anton Kovalchuk Date: Tue, 16 Apr 2024 22:20:32 +0200 Subject: [PATCH] remove arbitrum in configs and scripts --- .env.example | 17 +-- .github/workflows/verify-bytecode.yml | 6 -- .solcover.js | 2 +- README.md | 149 ++------------------------ artifacts-arb.json | 28 ----- artifacts-eth.json | 14 --- hardhat.config.ts | 18 ---- package-lock.json | 28 ----- package.json | 11 -- utils/deployment/DeployScript.ts | 2 - utils/network.ts | 17 +-- utils/testing/e2e.ts | 54 ---------- utils/testing/env.ts | 23 ---- 13 files changed, 12 insertions(+), 357 deletions(-) delete mode 100644 artifacts-arb.json diff --git a/.env.example b/.env.example index 2f00c733..fd9f66e3 100644 --- a/.env.example +++ b/.env.example @@ -10,15 +10,11 @@ RPC_ETH_GOERLI= RPC_OPT_MAINNET=https://mainnet.optimism.io RPC_OPT_GOERLI=https://goerli.optimism.io -RPC_ARB_MAINNET=https://arb1.arbitrum.io/rpc -RPC_ARB_GOERLI=https://goerli-rollup.arbitrum.io/rpc - # ############################ # Etherscan # ############################ ETHERSCAN_API_KEY_ETH= -ETHERSCAN_API_KEY_ARB= ETHERSCAN_API_KEY_OPT= # ############################ @@ -38,7 +34,6 @@ FORKING=true # Private key of the deployer account used for deployment process ETH_DEPLOYER_PRIVATE_KEY= OPT_DEPLOYER_PRIVATE_KEY= -ARB_DEPLOYER_PRIVATE_KEY= L1_DEV_MULTISIG= L1_PROXY_ADMIN= @@ -63,14 +58,6 @@ L2_WITHDRAWALS_DISABLERS=[] # Integration Acceptance & E2E Testing # ############################ -TESTING_ARB_NETWORK= -TESTING_ARB_L1_TOKEN=0x7AEE39c46f20135114e85A03C02aB4FE73fB8127 -TESTING_ARB_L2_TOKEN=0x775ede8029C117effce283b3391E420EacF3c85F -TESTING_ARB_L1_ERC20_TOKEN_GATEWAY=0x0A7e12b563Ba623646a31a09F0182e8aD45D6cfD -TESTING_ARB_L2_ERC20_TOKEN_GATEWAY=0x8c269989D839eE9DaEe64D57C8c41404DF87F722 -TESTING_ARB_L1_GATEWAY_ROUTER=0xa2a8F940752aDc4A3278B63B96d56D72D2b075B1 -TESTING_ARB_L2_GATEWAY_ROUTER=0x57f54f87C44d816f60b92864e23b8c0897D4d81D - TESTING_OPT_NETWORK= TESTING_OPT_L1_TOKEN=0xaF8a2F0aE374b03376155BF745A3421Dac711C12 TESTING_OPT_L2_TOKEN=0xAED5F9aaF167923D34174b8E636aaF040A11f6F7 @@ -84,7 +71,6 @@ TESTING_OPT_L2_ERC20_TOKEN_BRIDGE=0x447CD1794d209Ac4E6B4097B34658bc00C4d0a51 TESTING_USE_DEPLOYED_CONTRACTS=false TESTING_L1_TOKENS_HOLDER= -TESTING_ARB_GOV_BRIDGE_EXECUTOR= TESTING_OPT_GOV_BRIDGE_EXECUTOR= # ############################ @@ -92,5 +78,4 @@ TESTING_OPT_GOV_BRIDGE_EXECUTOR= # ############################ TESTING_PRIVATE_KEY= -TESTING_OPT_LDO_HOLDER_PRIVATE_KEY= -TESTING_ARB_LDO_HOLDER_PRIVATE_KEY= +TESTING_OPT_LDO_HOLDER_PRIVATE_KEY= \ No newline at end of file diff --git a/.github/workflows/verify-bytecode.yml b/.github/workflows/verify-bytecode.yml index a9185fd4..55630fdd 100644 --- a/.github/workflows/verify-bytecode.yml +++ b/.github/workflows/verify-bytecode.yml @@ -49,9 +49,3 @@ jobs: file: artifacts-opt.json rpcUrl: ${{ secrets.OPTIMISM_RPC }} - - name: Verify bytecode of contracts on Arbitrum chain - uses: lidofinance/action-verify-bytecode@master - if: always() - with: - file: artifacts-arb.json - rpcUrl: ${{ secrets.ARBITRUM_RPC }} diff --git a/.solcover.js b/.solcover.js index 7554c821..108d686a 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,3 +1,3 @@ module.exports = { - skipFiles: ["stubs", "optimism/stubs", "proxy/stubs", "arbitrum/stubs"], + skipFiles: ["stubs", "optimism/stubs", "proxy/stubs"], }; diff --git a/README.md b/README.md index 5f9ca478..8d13cf99 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ # Lido L2 -This project contains the implementations of the L2 ERC20 token bridges for Arbitrum and Optimism chains. The current solution allows transferring ERC20 tokens between L1 and L2 chains. +This project contains the implementations of the L2 ERC20 token bridge for Optimism chain. The current solution allows transferring ERC20 tokens between L1 and L2 chains. To retrieve more detailed info about the bridging process, see the specifications for certain chains: -- [Lido's Arbitrum Gateway](https://github.com/lidofinance/lido-l2/blob/main/contracts/arbitrum/README.md). - [Lido's Optimism Bridge](https://github.com/lidofinance/lido-l2/blob/main/contracts/optimism/README.md). ## Project setup @@ -46,8 +45,7 @@ The configuration of the deployment scripts happens via the ENV variables. The f - [`NETWORK`](#NETWORK) - name of the network environments used by deployment scripts. Allowed values: `mainnet`, `goerli`. - [`FORKING`](#FORKING) - run deployment in the forking network instead of real ones - [`ETH_DEPLOYER_PRIVATE_KEY`](#ETH_DEPLOYER_PRIVATE_KEY) - The private key of the deployer account in the Ethereum network is used during the deployment process. -- [`ARB_DEPLOYER_PRIVATE_KEY`](#ARB_DEPLOYER_PRIVATE_KEY) - The private key of the deployer account in the Arbitrum network is used during the deployment process. -- [`OPT_DEPLOYER_PRIVATE_KEY`](#ARB_DEPLOYER_PRIVATE_KEY) - The private key of the deployer account in the Optimism network is used during the deployment process. +- [`OPT_DEPLOYER_PRIVATE_KEY`](#OPT_DEPLOYER_PRIVATE_KEY) - The private key of the deployer account in the Optimism network is used during the deployment process. - [`L1_PROXY_ADMIN`](#L1_PROXY_ADMIN) - The address to grant admin rights of the `OssifiableProxy` on the L1 bridge - [`L1_BRIDGE_ADMIN`](#L1_BRIDGE_ADMIN) - Address to grant the `DEFAULT_ADMIN_ROLE` on the L1 bridge - [`L2_PROXY_ADMIN`](#L2_PROXY_ADMIN) - The address to grant admin rights of the `OssifiableProxy` on the L2 bridge @@ -68,14 +66,6 @@ The following ENV variables are optional and might be used to make an additional - [`L2_WITHDRAWALS_ENABLERS`](#L2_WITHDRAWALS_ENABLES) - array of addresses to grant `WITHDRAWALS_ENABLER_ROLE` on the L2 bridge. - [`L2_WITHDRAWALS_DISABLERS`](#L2_WITHDRAWALS_DISABLERS) - array of addresses to grant `WITHDRAWALS_DISABLER_ROLE` on the L2 bridge. -### Deploying Arbitrum gateway - -To run the deployment of the ERC20 token gateway for the Ethereum <-> Arbitrum chains use the following command: - -```bash -npm run arbitrum:deploy -``` - ### Deploying Optimism bridge To run the deployment of the ERC20 token gateway for the Ethereum <-> Optimism chains use the following command: @@ -92,40 +82,30 @@ To run unit tests use one of the following commands: ```bash -# Run tests for both Arbitrum and Optimism bridges +# Run tests for Optimism bridge npm run test:unit -# Run tests only for Arbitrum gateway -npm run arbitrum:test:unit - # Run tests only for Optimism bridge npm run optimism:test:unit ``` ### Integration tests -Before running integration tests, run the hardhat forked nodes in the standalone tabs corresponding to `TESTING_ARB_NETWORK` \ `TESTING_OPT_NETWORK` env variable or if it's not set use `mainnet` network. Example of the commands for the `mainnet` network: +Before running integration tests, run the hardhat forked nodes in the standalone tabs corresponding to `TESTING_OPT_NETWORK` env variable or if it's not set use `mainnet` network. Example of the commands for the `mainnet` network: ```bash -# Required to run both Arbitrum and Optimism integraton tests +# Required to run Optimism integraton tests npm run fork:eth:mainnet # Required to run Optimism integration tests npm run fork:opt:mainnet -# Required to run Arbitrum integration tests -npm run fork:arb:mainnet -``` - The integration tests might be run via the following commands: ```bash -# Run integration tests for both Arbitrum and Optimism bridges +# Run integration tests for Optimism bridge npm run test:integration -# Run integration tests for Arbitrum bridge -npm run arbitrum:test:integration - # Run integration tests for Optimism bridge npm run optimism:test:integration ``` @@ -138,17 +118,6 @@ TESTING_USE_DEPLOYED_CONTRACTS=true # Address of the account which has tokens to test TESTING_L1_TOKENS_HOLDER= -# Addresses of the Arbitrum gateway -TESTING_ARB_NETWORK= -TESTING_ARB_L1_TOKEN= -TESTING_ARB_L2_TOKEN= -TESTING_ARB_L1_ERC20_TOKEN_GATEWAY= -TESTING_ARB_L2_ERC20_TOKEN_GATEWAY= - -# Below addresses are not required when the gateway uses the default Arbitrum router -TESTING_ARB_L1_GATEWAY_ROUTER= -TESTING_ARB_L2_GATEWAY_ROUTER= - # Addresses of the Optimism bridge TESTING_OPT_NETWORK= TESTING_OPT_L1_TOKEN= @@ -163,17 +132,13 @@ E2E tests run on the real contracts deployed on the testnet networks. To run suc [`TESTING_PRIVATE_KEY`](#TESTING_PRIVATE_KEY) [`TESTING_OPT_LDO_HOLDER_PRIVATE_KEY`](#TESTING_OPT_LDO_HOLDER_PRIVATE_KEY) -[`TESTING_ARB_LDO_HOLDER_PRIVATE_KEY`](#TESTING_ARB_LDO_HOLDER_PRIVATE_KEY) To run E2E tests use the following commands: ```bash -# Run E2E tests for both Arbitrum and Optimism bridges +# Run E2E tests for Optimism bridge npm run test:e2e -# Run E2E tests for Arbitrum bridge -npm run arbitrum:test:e2e - # Run E2E tests for Optimism bridge npm run optimism:test:e2e ``` @@ -184,17 +149,6 @@ Additionally, tests might be run on the deployed contracts. To do it, set the fo # private key of the tester. It must have tokens for testing TESTING_PRIVATE_KEY= -# Addresses of the Arbitrum gateway -TESTING_ARB_NETWORK= -TESTING_ARB_L1_TOKEN= -TESTING_ARB_L2_TOKEN= -TESTING_ARB_L1_ERC20_TOKEN_GATEWAY= -TESTING_ARB_L2_ERC20_TOKEN_GATEWAY= - -# Below addresses are not required when the gateway uses the default Arbitrum router -TESTING_ARB_L1_GATEWAY_ROUTER= -TESTING_ARB_L2_GATEWAY_ROUTER= - # Addresses of the Optimism bridge TESTING_OPT_NETWORK= TESTING_OPT_L1_TOKEN= @@ -210,16 +164,6 @@ The acceptance tests might be run after the deployment to validate that the brid The following ENV variables must be set before the tests running: ```bash -# Addresses of the Arbitrum gateway -TESTING_ARB_L1_TOKEN= -TESTING_ARB_L2_TOKEN= -TESTING_ARB_L1_ERC20_TOKEN_GATEWAY= -TESTING_ARB_L2_ERC20_TOKEN_GATEWAY= - -# Below addresses are not required when the gateway uses the default Arbitrum router -TESTING_ARB_L1_GATEWAY_ROUTER= -TESTING_ARB_L2_GATEWAY_ROUTER= - # Addresses of the Optimism bridge TESTING_OPT_L1_TOKEN= TESTING_OPT_L2_TOKEN= @@ -232,9 +176,6 @@ To run the acceptance tests, use the following commands: ```bash # Optimism bridge npm run optimism:test:acceptance - -# Arbitrum bridge -npm run arbitrum:test:acceptance ``` ## Code Coverage @@ -259,28 +200,10 @@ Address of the RPC node for **Mainnet** Ethereum network. Address of the RPC node for **Goerli** Ethereum network. -#### `RPC_ARB_MAINNET` - -> **Warning** -> -> Please, don't use the default value for production deployments! The default RPC node might not be available or fail suddenly during the request. - -Address of the RPC node for **Mainnet** Arbitrum network. - -> Default value: `https://arb1.arbitrum.io/rpc` - -#### `RPC_ARB_GOERLI` - -Address of the RPC node for **Goerli** Arbitrum network. - -> Default value: `https://goerli-rollup.arbitrum.io/rpc` - #### `RPC_OPT_GOERLI` Address of the RPC node for **Goerli** Optimism network. -> Default value: `https://goerli-rollup.arbitrum.io/rpc` - #### `RPC_OPT_MAINNET` > **Warning** @@ -300,9 +223,6 @@ Below variables are required for successfull verification of the contracts on bl API key from the [Etherscan](https://etherscan.io/) block explorer. See details here: https://info.etherscan.com/api-keys/ -#### `ETHERSCAN_API_KEY_ARB` - -API key from the [Arbiscan](https://arbiscan.io/) block explorer. #### `ETHERSCAN_API_KEY_OPT` @@ -310,7 +230,7 @@ API key from the [Optimistic Ethereum](https://optimistic.etherscan.io/) block e ### Bridge/Gateway Deployment -Below variables used in the Arbitrum/Optimism bridge deployment process. +Below variables used in the Optimism bridge deployment process. #### `TOKEN` @@ -332,10 +252,6 @@ Run deployment in the forking network instead of public ones The private key of the deployer account in the Ethereum network is used during the deployment process. -#### `ARB_DEPLOYER_PRIVATE_KEY` - -The private key of the deployer account in the Arbitrum network is used during the deployment process. - #### `OPT_DEPLOYER_PRIVATE_KEY` The private key of the deployer account in the Optimism network is used during the deployment process. @@ -440,46 +356,6 @@ The array of addresses to grant `WITHDRAWALS_DISABLER_ROLE` on L2 bridge/gateway The following variables are used in the process of the Integration & E2E testing. -#### `TESTING_ARB_NETWORK` - -Name of the network environments used for Arbitrum Integration & E2E testing. Might be one of: `mainnet`, `goerli`. - -#### `TESTING_ARB_L1_TOKEN` - -Address of the token to use in the Acceptance Integration & E2E (when `TESTING_USE_DEPLOYED_CONTRACTS` is set to true) testing of the bridging between Ethereum and Arbitrum networks. - -> Default value: `0x7AEE39c46f20135114e85A03C02aB4FE73fB8127` - -#### `TESTING_ARB_L2_TOKEN` - -Address of the token minted on L2 in the Acceptance Integration & E2E (when `TESTING_USE_DEPLOYED_CONTRACTS` is set to true) testing of the bridging between Ethereum and Arbitrum networks. - -> Default value: `0x775ede8029C117effce283b3391E420EacF3c85F` - -#### `TESTING_ARB_L1_ERC20_TOKEN_GATEWAY` - -Address of the L1 ERC20 token gateway used in the Acceptance Integration & E2E (when `TESTING_USE_DEPLOYED_CONTRACTS` is set to true) testing of the bridging between Ethereum and Arbitrum networks. - -> Default value: `0x0A7e12b563Ba623646a31a09F0182e8aD45D6cfD` - -#### `TESTING_ARB_L2_ERC20_TOKEN_GATEWAY` - -Address of the L2 ERC20 token gateway used in the Acceptance Integration & E2E (when `TESTING_USE_DEPLOYED_CONTRACTS` is set to true) testing of the bridging between Ethereum and Arbitrum networks. - -> Default value: `0x8c269989D839eE9DaEe64D57C8c41404DF87F722` - -#### `TESTING_ARB_L1_GATEWAY_ROUTER` - -Address of the L1 gateway router used in the Acceptance Integration & E2E (when `TESTING_USE_DEPLOYED_CONTRACTS` is set to true) testing of the bridging between Ethereum and Arbitrum networks. If not set, will be used default Arbitrum's L1 Gateway Router - -> Default value: `0xa2a8F940752aDc4A3278B63B96d56D72D2b075B1` - -#### `TESTING_ARB_L2_GATEWAY_ROUTER` - -Address of the L2 gateway router used in the Acceptance Integration & E2E (when `TESTING_USE_DEPLOYED_CONTRACTS` is set to true) testing of the bridging between Ethereum and Arbitrum networks. If not set, will be used default Arbitrum's L2 Gateway Router - -> Default value: `0x57f54f87C44d816f60b92864e23b8c0897D4d81D` - #### `TESTING_OPT_NETWORK` Name of the network environments used for Optimism Integration & E2E testing. Might be one of: `mainnet`, `goerli`. @@ -518,10 +394,6 @@ When set to `true` integration tests will use addresses of deployed contracts se When `TESTING_USE_DEPLOYED_CONTRACTS` is set to true, this address will be used as the holder of the tokens, bridged between L1 and L2. -#### `TESTING_ARB_GOV_BRIDGE_EXECUTOR` - -Address of the deployed Governance Bridge Executor in the Arbitrum network. If set, this contract will be used for integration tests of Governance Bridge. - #### `TESTING_OPT_GOV_BRIDGE_EXECUTOR` Address of the deployed Governance Bridge Executor in the Optimism network. If set, this contract will be used for integration tests of Governance Bridge. @@ -532,7 +404,7 @@ Address of the deployed Governance Bridge Executor in the Optimism network. If s The private key from the address which holds: -- Goerli and Arbitrum/Optimistic Goerli Ether to launch Arbitrum/Optimism E2E tests +- Goerli and Optimistic Goerli Ether to launch Optimism E2E tests The test Ether might be retrived via [Paradigm Faucet](https://faucet.paradigm.xyz/). @@ -540,6 +412,3 @@ The test Ether might be retrived via [Paradigm Faucet](https://faucet.paradigm.x The private key from the address which holds 50+% TLDO -#### `TESTING_ARB_LDO_HOLDER_PRIVATE_KEY` - -The private key from the address which holds 50+% TLDO diff --git a/artifacts-arb.json b/artifacts-arb.json deleted file mode 100644 index d27f07ba..00000000 --- a/artifacts-arb.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "artifactPath": "artifacts/contracts/proxy/OssifiableProxy.sol/OssifiableProxy.json", - "sourcePath": "contracts/proxy/OssifiableProxy.sol", - "name": "L2ERC20TokenGateway proxy", - "address": "0x07D4692291B9E30E326fd31706f686f83f331B82" - }, - { - "artifactPath": "artifacts/contracts/arbitrum/L2ERC20TokenGateway.sol/L2ERC20TokenGateway.json", - "sourcePath": "contracts/arbitrum/L2ERC20TokenGateway.sol", - "name": "L2ERC20TokenGateway", - "address": "0xe75886DE20dF66827e321EfdB88726e6Baa4b0A7", - "txHash": "0xe99cd25baf61300dcf57466bead148dac28fd975076593a8874bbdc64973696d" - }, - { - "artifactPath": "artifacts/contracts/proxy/OssifiableProxy.sol/OssifiableProxy.json", - "sourcePath": "contracts/proxy/OssifiableProxy.sol", - "name": "WstETH ERC20Bridged proxy", - "address": "0x5979D7b546E38E414F7E9822514be443A4800529" - }, - { - "artifactPath": "artifacts/contracts/token/ERC20Bridged.sol/ERC20Bridged.json", - "sourcePath": "contracts/token/ERC20Bridged.sol", - "name": "WstETH ERC20Bridged", - "address": "0x0fBcbaEA96Ce0cF7Ee00A8c19c3ab6f5Dc8E1921", - "txHash": "0x517ea5c206473d2116324939ab42f93ca1079a6388c0db41684e926e36e1a411" - } -] diff --git a/artifacts-eth.json b/artifacts-eth.json index 24dd4b91..c6f6ab47 100644 --- a/artifacts-eth.json +++ b/artifacts-eth.json @@ -1,18 +1,4 @@ [ - { - "artifactPath": "artifacts/contracts/proxy/OssifiableProxy.sol/OssifiableProxy.json", - "sourcePath": "contracts/proxy/OssifiableProxy.sol", - "name": "L1ERC20TokenGateway proxy", - "address": "0x0F25c1DC2a9922304f2eac71DCa9B07E310e8E5a", - "txHash": "0x912fc5992f5a24c2ffe5e230ac51fcc4724cb3e4a23535b04eec34f99f77e3a8" - }, - { - "artifactPath": "artifacts/contracts/arbitrum/L1ERC20TokenGateway.sol/L1ERC20TokenGateway.json", - "sourcePath": "contracts/arbitrum/L1ERC20TokenGateway.sol", - "name": "L1ERC20TokenGateway", - "address": "0xc4E3ff0b5B106f88Fc64c43031BE8b076ee9F21C", - "txHash": "0xce43376cd317471806c6ac2a8efbd5dc6dcfb7201ba643e447f446e50354edcf" - }, { "artifactPath": "artifacts/contracts/proxy/OssifiableProxy.sol/OssifiableProxy.json", "sourcePath": "contracts/proxy/OssifiableProxy.sol", diff --git a/hardhat.config.ts b/hardhat.config.ts index ed47221c..119bab69 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -52,22 +52,6 @@ const config: HardhatUserConfig = { url: "http://localhost:8545", }, - // Arbitrum Public Chains - arb_mainnet: { - url: env.string("RPC_ARB_MAINNET", ""), - }, - arb_sepolia: { - url: env.string("RPC_ARB_SEPOLIA", ""), - }, - - // Arbitrum Fork Chains - arb_mainnet_fork: { - url: "http://localhost:8546", - }, - arb_sepolia_fork: { - url: "http://localhost:8546", - }, - // Optimism Public Chains opt_mainnet: { url: env.string("RPC_OPT_MAINNET", ""), @@ -92,7 +76,6 @@ const config: HardhatUserConfig = { apiKey: { mainnet: env.string("ETHERSCAN_API_KEY_ETH", ""), sepolia: env.string("ETHERSCAN_API_KEY_ETH", ""), - arbitrumOne: env.string("ETHERSCAN_API_KEY_ARB", ""), optimisticEthereum: env.string("ETHERSCAN_API_KEY_OPT", ""), "opt_sepolia": env.string("ETHERSCAN_API_KEY_OPT", ""), }, @@ -120,7 +103,6 @@ const config: HardhatUserConfig = { externalArtifacts: [ "./interfaces/**/*.json", "./utils/optimism/artifacts/*.json", - "./utils/arbitrum/artifacts/*.json", ], }, mocha: { diff --git a/package-lock.json b/package-lock.json index cfddd6b4..f0518138 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@arbitrum/sdk": "3.1.6", "@eth-optimism/sdk": "3.2.0", "@ethersproject/providers": "^5.6.8", "@lidofinance/evm-script-decoder": "^0.2.2", @@ -58,22 +57,6 @@ "node": ">=0.10.0" } }, - "node_modules/@arbitrum/sdk": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@arbitrum/sdk/-/sdk-3.1.6.tgz", - "integrity": "sha512-wY7RHmvY26yc/OuwpJY+kjgAmUJZDGDXaQxfSQTp2t6sSFO+8oFFVsKIthBCY2RpDGFUVTGpRjCUEXiuJ6/SFA==", - "dependencies": { - "@ethersproject/address": "^5.0.8", - "@ethersproject/bignumber": "^5.1.1", - "@ethersproject/bytes": "^5.0.8", - "ethers": "^5.1.0" - }, - "engines": { - "node": ">=v11", - "npm": "please-use-yarn", - "yarn": ">= 1.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -24823,17 +24806,6 @@ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "dev": true }, - "@arbitrum/sdk": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@arbitrum/sdk/-/sdk-3.1.6.tgz", - "integrity": "sha512-wY7RHmvY26yc/OuwpJY+kjgAmUJZDGDXaQxfSQTp2t6sSFO+8oFFVsKIthBCY2RpDGFUVTGpRjCUEXiuJ6/SFA==", - "requires": { - "@ethersproject/address": "^5.0.8", - "@ethersproject/bignumber": "^5.1.1", - "@ethersproject/bytes": "^5.0.8", - "ethers": "^5.1.0" - } - }, "@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", diff --git a/package.json b/package.json index 820a38ee..0207de90 100644 --- a/package.json +++ b/package.json @@ -12,18 +12,8 @@ "test:integration": "hardhat test ./test/**/*.integration.test.ts", "fork:eth:mainnet": "hardhat node:fork eth_mainnet 8545", "fork:eth:sepolia": "hardhat node:fork eth_sepolia 8545", - "fork:arb:sepolia": "hardhat node:fork arb_sepolia 8546", - "fork:arb:mainnet": "hardhat node:fork arb_mainnet 8546", "fork:opt:sepolia": "hardhat node:fork opt_sepolia 9545", "fork:opt:mainnet": "hardhat node:fork opt_mainnet 9545", - "arbitrum:deploy": "ts-node --files ./scripts/arbitrum/deploy-gateway.ts", - "arbitrum:finalize-message": "ts-node --files ./scripts/arbitrum/finalize-message.ts", - "arbitrum:test:e2e": "hardhat test ./test/arbitrum/*.e2e.test.ts", - "arbitrum:test:unit": "hardhat test ./test/arbitrum/*.unit.test.ts", - "arbitrum:test:integration": "hardhat test ./test/arbitrum/*.integration.test.ts", - "arbitrum:test:acceptance": "hardhat test ./test/arbitrum/*.acceptance.test.ts", - "arbitrum:test:executor": "hardhat test ./test/bridge-executor/arbitrum.integration.test.ts", - "arbitrum:test:launch": "REVERT=false hardhat test ./test/arbitrum/{_launch.test.ts,bridging.integration.test.ts}", "optimism:deploy": "ts-node --files ./scripts/optimism/deploy-bridge.ts", "optimism:finalize-message": "ts-node --files ./scripts/optimism/finalize-message.ts", "optimism:test:e2e": "hardhat test ./test/optimism/*.e2e.test.ts", @@ -69,7 +59,6 @@ "typescript": "^4.6.3" }, "dependencies": { - "@arbitrum/sdk": "3.1.6", "@eth-optimism/sdk": "3.2.0", "@ethersproject/providers": "^5.6.8", "@lidofinance/evm-script-decoder": "^0.2.2", diff --git a/utils/deployment/DeployScript.ts b/utils/deployment/DeployScript.ts index a6adb1d9..3e9f7b8c 100644 --- a/utils/deployment/DeployScript.ts +++ b/utils/deployment/DeployScript.ts @@ -170,8 +170,6 @@ export class DeployScript { 10: "opt_mainnet", 11155420: "opt_sepolia", 31337: "hardhat", - 42161: "arb_mainnet", - 421613: "arb_sepolia", }; const networkName = networkNameByChainId[chainId] || ""; const arsString = stepInfo.args.map((a) => `"${a.value}"`).join(" "); diff --git a/utils/network.ts b/utils/network.ts index 1564aa27..30603cda 100644 --- a/utils/network.ts +++ b/utils/network.ts @@ -6,7 +6,7 @@ import { HardhatRuntimeEnvironment, HttpNetworkConfig } from "hardhat/types"; import env from "./env"; -type ChainNameShort = "arb" | "opt" | "eth"; +type ChainNameShort = "opt" | "eth"; export type NetworkName = "sepolia" | "mainnet"; export type SignerOrProvider = Signer | Provider; @@ -15,10 +15,6 @@ const HARDHAT_NETWORK_NAMES = { sepolia: "eth_sepolia", mainnet: "eth_mainnet", }, - arb: { - sepolia: "arb_sepolia", - mainnet: "arb_mainnet", - }, opt: { sepolia: "opt_sepolia", mainnet: "opt_mainnet", @@ -30,10 +26,6 @@ const HARDHAT_NETWORK_NAMES_FORK = { sepolia: "eth_sepolia_fork", mainnet: "eth_mainnet_fork", }, - arb: { - sepolia: "arb_sepolia_fork", - mainnet: "arb_mainnet_fork", - }, opt: { sepolia: "opt_sepolia_fork", mainnet: "opt_mainnet_fork", @@ -125,10 +117,6 @@ function getChainId(protocol: ChainNameShort, networkName: NetworkName) { mainnet: 10, sepolia: 11155420, }, - arb: { - mainnet: 42161, - sepolia: 421613, - }, }; const chainId = chainIds[protocol][networkName]; if (!chainId) { @@ -142,9 +130,6 @@ function getBlockExplorerBaseUrlByChainId(chainId: number) { // ethereum 1: "https://etherscan.io", 11155111: "https://sepolia.etherscan.io", - // arbitrum - 42161: "https://arbiscan.io", - 421613: "https://sepolia-rollup-explorer.arbitrum.io", // optimism 10: "https://optimistic.etherscan.io", 11155420: "https://blockscout.com/optimism/sepolia", diff --git a/utils/testing/e2e.ts b/utils/testing/e2e.ts index 010596e7..1c60955c 100644 --- a/utils/testing/e2e.ts +++ b/utils/testing/e2e.ts @@ -21,25 +21,6 @@ export const E2E_TEST_CONTRACTS_OPTIMISM = { }, }; -export const E2E_TEST_CONTRACTS_ARBITRUM = { - l1: { - l1Token: "0x7AEE39c46f20135114e85A03C02aB4FE73fB8127", - l1GatewayRouter: "0xa2a8F940752aDc4A3278B63B96d56D72D2b075B1", - l1ERC20TokenGateway: "0x46b10f1E65f19876F50bfdD59C9B39E9De6B9150", - aragonVoting: "0x04F9590D3EEC8e619D7714ffeF664aD3fd53b880", - tokenManager: "0x1ee7e87486f9ae6e27a5e58310a5319394360cf0", - agent: "0x12869c3349f993c5c20bab9482b7d16aff0ae2f9", - l1LDOToken: "0x84b4c77b260910fc02dddac41ef0e45e658b18af", - inbox: "0x578BAde599406A8fE3d24Fd7f7211c0911F5B29e", - }, - l2: { - l2Token: "0x57FA50b80f79b9140fe7249A93D432d9fa8C4192", - l2GatewayRouter: "0x57f54f87C44d816f60b92864e23b8c0897D4d81D", - l2ERC20TokenGateway: "0xD06491e4C8B3107B83dC134894C4c96ED8ddbfa2", - govBridgeExecutor: "0x4e8CC9024Ea3FE886623025fF2aD0CA4bb3D1F42", - }, -}; - export const createOptimismVoting = async ( ctx: any, executorCalldata: string @@ -84,40 +65,5 @@ export const encodeEVMScript = ( ); }; -export const createArbitrumVoting = async ( - ctx: any, - executorCalldata: string, - options: Record = {} -) => { - const messageCalldata = await ctx.inbox.interface.encodeFunctionData( - "createRetryableTicket", - [ - ctx.govBridgeExecutor.address, - 0, - options.maxSubmissionCost || wei`0.01 ether`, - ctx.l2Tester.address, - ctx.l2Tester.address, - options.maxGas || 3000000, - options.gasPriceBid || 5000000000, - executorCalldata, - ] - ); - - const agentCalldata = ctx.agent.interface.encodeFunctionData("execute", [ - ctx.inbox.address, - options.callValue || wei`0.01 ether`, - messageCalldata, - ]); - const agentEvmScript = encodeEVMScript(ctx.agent.address, agentCalldata); - - const newVoteCalldata = - "0xd5db2c80" + - abiCoder.encode(["bytes", "string"], [agentEvmScript, ""]).substring(2); - const votingEvmScript = encodeEVMScript(ctx.voting.address, newVoteCalldata); - const newVotingTx = await ctx.tokenMnanager.forward(votingEvmScript); - - await newVotingTx.wait(); -}; - export const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/utils/testing/env.ts b/utils/testing/env.ts index faf8acd6..7d78ab5b 100644 --- a/utils/testing/env.ts +++ b/utils/testing/env.ts @@ -4,29 +4,6 @@ export default { USE_DEPLOYED_CONTRACTS(defaultValue: boolean = false) { return env.bool("TESTING_USE_DEPLOYED_CONTRACTS", defaultValue); }, - - ARB_L1_TOKEN() { - return env.address("TESTING_ARB_L1_TOKEN"); - }, - ARB_L2_TOKEN() { - return env.address("TESTING_ARB_L2_TOKEN"); - }, - ARB_L1_ERC20_TOKEN_GATEWAY() { - return env.address("TESTING_ARB_L1_ERC20_TOKEN_GATEWAY"); - }, - ARB_L2_ERC20_TOKEN_GATEWAY() { - return env.address("TESTING_ARB_L2_ERC20_TOKEN_GATEWAY"); - }, - ARB_L1_GATEWAY_ROUTER(defaultValue?: string) { - return env.address("TESTING_ARB_L1_GATEWAY_ROUTER", defaultValue); - }, - ARB_L2_GATEWAY_ROUTER(defaultValue?: string) { - return env.address("TESTING_ARB_L2_GATEWAY_ROUTER", defaultValue); - }, - ARB_GOV_BRIDGE_EXECUTOR() { - return env.address("TESTING_ARB_GOV_BRIDGE_EXECUTOR"); - }, - OPT_L1_TOKEN() { return env.address("TESTING_OPT_L1_TOKEN"); },