This project contains the implementation of the L2 ERC20 token bridges for Arbitrum and Optimism chains. The current solution allows transferring ERC20 tokens between L1 and L2 chains.
More detailed info about the bridging process might be found in the specifications for certain chains:
- Clone the repo:
git clone git@github.com:lidofinance/lido-l2.git
cd ./lido-l2
- Install dependencies:
npm install
- Compile the contracts:
npm run compile
Create .env
file in the project root:
cp .env.example .env
Fill the newly created .env
file with required variables
To run unit tests use:
npm run test:unit
Before running integration tests, run the hardhat forked nodes:
npm run fork:ethereum
npm run fork:optimism
npm run fork:arbitrum
Run the integration tests via:
npm run test:integration
To run coverage measurement for unit tests:
npm run coverage
Fill the required variables PRIVATE_KEY
, L1_NETWORK
, and L2_NETWORK
in the .env
file before the script execution.
Run the deployment of the ERC20 token gateway for Ethereum/Arbitrum chain:
npm run arbitrum:deploy-gateway
Run the deployment of the ERC20 token bridge for Ethereum/Optimism chain:
npm run optimism:deploy-bridge