Skip to content

Commit

Permalink
remove arbitrum in configs and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalgek committed Apr 16, 2024
1 parent d13586b commit ac8e584
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 357 deletions.
17 changes: 1 addition & 16 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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=

# ############################
Expand All @@ -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=
Expand All @@ -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
Expand All @@ -84,13 +71,11 @@ 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=

# ############################
# E2E Testing
# ############################

TESTING_PRIVATE_KEY=
TESTING_OPT_LDO_HOLDER_PRIVATE_KEY=
TESTING_ARB_LDO_HOLDER_PRIVATE_KEY=
TESTING_OPT_LDO_HOLDER_PRIVATE_KEY=
6 changes: 0 additions & 6 deletions .github/workflows/verify-bytecode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .solcover.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
skipFiles: ["stubs", "optimism/stubs", "proxy/stubs", "arbitrum/stubs"],
skipFiles: ["stubs", "optimism/stubs", "proxy/stubs"],
};
149 changes: 9 additions & 140 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
```
Expand All @@ -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=
Expand All @@ -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
```
Expand All @@ -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=
Expand All @@ -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=
Expand All @@ -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
Expand All @@ -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**
Expand All @@ -300,17 +223,14 @@ 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`
API key from the [Optimistic Ethereum](https://optimistic.etherscan.io/) block explorer.
### Bridge/Gateway Deployment
Below variables used in the Arbitrum/Optimism bridge deployment process.
Below variables used in the Optimism bridge deployment process.
#### `TOKEN`
Expand All @@ -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.
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -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.
Expand All @@ -532,14 +404,11 @@ 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/).
#### `TESTING_OPT_LDO_HOLDER_PRIVATE_KEY`
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
28 changes: 0 additions & 28 deletions artifacts-arb.json

This file was deleted.

Loading

0 comments on commit ac8e584

Please sign in to comment.