TheDZhon / lido-l2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lido L2

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:

Project Setup

  1. Clone the repo:
git clone git@github.com:lidofinance/lido-l2.git
cd ./lido-l2
  1. Install dependencies:
npm install
  1. Compile the contracts:
npm run compile

Create .env File

Create .env file in the project root:

cp .env.example .env

Fill the newly created .env file with required variables

Running Tests

Unit tests:

To run unit tests use:

npm run test:unit

Integration Tests:

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

Measuring Test Coverage

To run coverage measurement for unit tests:

npm run coverage

Deploying Contracts

Fill the required variables PRIVATE_KEY, L1_NETWORK, and L2_NETWORK in the .env file before the script execution.

Deploying Arbitrum Gateway

Run the deployment of the ERC20 token gateway for Ethereum/Arbitrum chain:

npm run arbitrum:deploy-gateway

Deploying Optimism Bridge

Run the deployment of the ERC20 token bridge for Ethereum/Optimism chain:

npm run optimism:deploy-bridge

About


Languages

Language:TypeScript 73.9%Language:Solidity 25.5%Language:Shell 0.3%Language:JavaScript 0.3%