Skip to content

Commit

Permalink
Merge pull request #185 from Consensys/chore/monorepo-reorg
Browse files Browse the repository at this point in the history
feat: reorganisation of the package's names
  • Loading branch information
Julink-eth authored Jul 5, 2024
2 parents 68f4e80 + 38fb175 commit 7cf7c7e
Show file tree
Hide file tree
Showing 1,865 changed files with 597 additions and 2,626 deletions.
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
name: Build and Publish Gateway
name: Build and Publish linea-ccip-gateway
on:
push:
branches:
- main
paths:
- "packages/gateway/**"
- "packages/linea-ccip-gateway/**"
pull_request:
branches:
- main
paths:
- "packages/gateway/**"
- "packages/linea-ccip-gateway/**"
release:
types:
- released

jobs:
gateway-build-publish:
linea-ccip-gateway-build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
packages/gateway
packages/linea-verifier
packages/linea-ccip-gateway
packages/linea-state-verifier
pnpm-workspace.yaml
pnpm-lock.yaml
sparse-checkout-cone-mode: false

- name: Set Docker Tag Testnet
id: docker-tag-testnet
if: ${{ github.event_name != 'release' }}
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-gateway-testnet" | tee $GITHUB_ENV
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-linea-ccip-gateway-testnet" | tee $GITHUB_ENV

- name: Set Docker Tag Mainnet
id: docker-tag-mainnet
if: ${{ github.event_name != 'release' }}
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-gateway-mainnet" | tee $GITHUB_ENV
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-linea-ccip-gateway-mainnet" | tee $GITHUB_ENV

- name: Set Docker Tag Testnet - Release
id: docker-tag-testnet-release
if: ${{ github.event_name == 'release' }}
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-gateway-testnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-linea-ccip-gateway-testnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV

- name: Set Docker Tag Mainnet - Release
id: docker-tag-mainnet-release
if: ${{ github.event_name == 'release' }}
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-gateway-mainnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-linea-ccip-gateway-mainnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV

- name: Login to Docker Repository
uses: docker/login-action@v2
Expand All @@ -64,7 +64,7 @@ jobs:
L2_PROVIDER_URL=https://linea-sepolia.infura.io/v3/${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
L1_ROLLUP_ADDRESS=${{ vars.L1_TESTNET_ROLLUP_ADDRESS }}
L2_CHAIN_ID=${{ vars.L2_TESTNET_CHAIN_ID }}
file: ./packages/gateway/Dockerfile
file: ./packages/linea-ccip-gateway/Dockerfile
context: ./
push: true
tags: consensys/linea-resolver:${{ env.DOCKER_TAG_TESTNET }}
Expand All @@ -77,7 +77,7 @@ jobs:
L2_PROVIDER_URL=https://linea-mainnet.infura.io/v3/${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
L1_ROLLUP_ADDRESS=${{ vars.L1_MAINNET_ROLLUP_ADDRESS }}
L2_CHAIN_ID=${{ vars.L2_MAINNET_CHAIN_ID }}
file: ./packages/gateway/Dockerfile
file: ./packages/linea-ccip-gateway/Dockerfile
context: ./
push: true
tags: consensys/linea-resolver:${{ env.DOCKER_TAG_MAINNET }}
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Run gateway tests
name: Run linea-ccip-gateway tests

on:
pull_request:
branches:
- main
paths:
- "packages/gateway/**"
- "packages/linea-ccip-gateway/**"

jobs:
gateway-tests:
linea-ccip-gateway-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
packages/gateway
packages/linea-verifier
packages/linea-ccip-gateway
packages/linea-state-verifier
pnpm-workspace.yaml
pnpm-lock.yaml
sparse-checkout-cone-mode: false
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Compile contract
run: pnpm --filter linea-resolver-gateway compile
run: pnpm --filter linea-ccip-gateway compile

- name: Run tests
run: pnpm --filter linea-resolver-gateway test
run: pnpm --filter linea-ccip-gateway test
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: "Build and Publish ENS Frontend"
name: "Build and Publish Linea ENS Frontend"

on:
push:
branches:
- main
paths:
- "packages/ens-app-v3/**"
- "packages/linea-ens-app/**"
pull_request:
branches:
- main
paths:
- "packages/ens-app-v3/**"
- "packages/linea-ens-app/**"
release:
types:
- released

jobs:
ens-app-build-publish:
linea-ens-app-build-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: ./
file: ./packages/ens-app-v3/Dockerfile
file: ./packages/linea-ens-app/Dockerfile
push: true
tags: consensys/linea-resolver:${{ env.DOCKER_TAG }}
build-args: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Run l2-contracts unit tests
name: Run linea-ens-contracts unit tests

on:
pull_request:
branches:
- main
paths:
- "packages/l2-contracts/**"
- "packages/linea-ens-contracts/**"

jobs:
l2-contracts-tests:
linea-ens-contracts-tests:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./packages/l2-contracts
working-directory: ./packages/linea-ens-contracts

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: Run l1-contracts unit tests
name: Run linea-ens-resolver unit tests

on:
pull_request:
branches:
- main
paths:
- "packages/l1-contracts/**"
- "packages/linea-ens-resolver/**"

jobs:
l1-contracts-tests:
linea-ens-resolver-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
packages/l1-contracts
packages/gateway
packages/linea-verifier
packages/linea-ens-resolver
packages/linea-ccip-gateway
packages/linea-state-verifier
pnpm-workspace.yaml
pnpm-lock.yaml
sparse-checkout-cone-mode: false
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Compile contract
run: pnpm --filter l1-contracts compile
run: pnpm --filter linea-ens-resolver compile

- name: Run tests
run: pnpm --filter l1-contracts test
run: pnpm --filter linea-ens-resolver test
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: "Build and Publish PoH Verifier API"
name: "Build and Publish poh-signer-api"

on:
push:
branches:
- main
paths:
- "packages/poh-verifier/**"
- "packages/poh-signer-api/**"
pull_request:
branches:
- main
paths:
- "packages/poh-verifier/**"
- "packages/poh-signer-api/**"
release:
types:
- released

jobs:
poh-verifier-build-publish:
poh-signer-api-build-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -25,22 +25,22 @@ jobs:
- name: Set Docker Tag Tesnet
id: docker-tag-testnet
if: ${{ github.event_name != 'release' }}
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-poh-verifier-testnet" | tee $GITHUB_ENV
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-poh-signer-api-testnet" | tee $GITHUB_ENV

- name: Set Docker Tag Mainnet
id: docker-tag-mainnet
if: ${{ github.event_name != 'release' }}
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-poh-verifier-mainnet" | tee $GITHUB_ENV
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-poh-signer-api-mainnet" | tee $GITHUB_ENV

- name: Set Docker Tag Testnet - Release
id: docker-tag-testnet-release
if: ${{ github.event_name == 'release' }}
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-poh-verifier-testnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-poh-signer-api-testnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV

- name: Set Docker Tag Mainnet - Release
id: docker-tag-mainnet-release
if: ${{ github.event_name == 'release' }}
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-poh-verifier-mainnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-poh-signer-api-mainnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV

- name: Login to Docker Repository
uses: docker/login-action@v2
Expand All @@ -57,8 +57,8 @@ jobs:
build-args: |
ENV_FILE=.env.testnet
SIGNER_PRIVATE_KEY=${{ secrets.POH_VERIFIER_TESTNET_PRIVATE_KEY }}
context: ./packages/poh-verifier
file: ./packages/poh-verifier/Dockerfile
context: ./packages/poh-signer-api
file: ./packages/poh-signer-api/Dockerfile
push: true
tags: consensys/linea-resolver:${{ env.DOCKER_TAG_TESTNET }}

Expand All @@ -68,7 +68,7 @@ jobs:
build-args: |
ENV_FILE=.env.mainnet
SIGNER_PRIVATE_KEY=${{ secrets.POH_VERIFIER_MAINNET_PRIVATE_KEY }}
context: ./packages/poh-verifier
file: ./packages/poh-verifier/Dockerfile
context: ./packages/poh-signer-api
file: ./packages/poh-signer-api/Dockerfile
push: true
tags: consensys/linea-resolver:${{ env.DOCKER_TAG_MAINNET }}
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Linea Name Service
# Linea ENS

This repository contains smart contracts and a Node.js Gateway server that allow storing ENS names on Linea using [EIP 3668](https://eips.ethereum.org/EIPS/eip-3668) and [ENSIP 10](https://docs.ens.domains/ens-improvement-proposals/ensip-10-wildcard-resolution).
Also contain a frontend adapted from [ENS's frontend](https://github.com/ensdomains/ens-app-v3) to interact with the deployed contract, to create and manage domains on Linea.
Expand Down Expand Up @@ -67,40 +67,44 @@ contract TestL1 is EVMFetchTarget {

- NodeJs v18.x.
- pnpm v9.x
- yarn for the l2-contracts package only
- yarn for the linea-ens-contracts package only

## Packages

### l1/l2 contracts
### linea-ens-resolver

The l1-contracts intented to be deployed on L1 (Ethereum) implements the proposed protocol, with functions to return the gateway address and required prefix for a query, and to verify the response from the gateway.
The linea-ens-resolver contract that is built on top of [linea-state-verifier](./packages/packages/linea-state-verifier) and verify Linea ENS data (domain names, metadata etc).

The l2-contracts intented to be deployed on L2 (Linea) stores and returns the data necessary to resolve an domain name.
More documentation available in [linea-ens-resolver/README.md](./packages/linea-ens-resolver/README.md)

More Smart Contracts documentation available in [./packages/l1-contracts/README.md](./packages/l1-contracts/README.md) and [./packages/l2-contracts/README.md](./packages/l2-contracts/README.md)
### linea-ens-contracts

### gateway
The linea-ens-contracts contracts intented to be deployed on L2 (Linea) stores and returns the data necessary to resolve an domain name and more data related to ENS.

A node-based gateway server that answers queries for L2 Gateway function calls relating to Linea-based L2 resolvers.
More documentation available in [linea-ens-contracts/README.md](./packages/linea-ens-contracts/README.md)

### ens-app-v3
### linea-ccip-gateway

The Linea NS frontend forked from [ens-app-v3](https://github.com/ensdomains/ens-app-v3)
A node-based gateway server that answers queries from L1 Gateway function calls relating to Linea-based L2 contracts.

### ens-subgraph
### linea-ens-app

The Linea NS subgrah consumed by the frontend, adapted from [ens-subgraph](https://github.com/ensdomains/ens-subgraph)
The Linea ENS frontend forked from [ens-app-v3](https://github.com/ensdomains/ens-app-v3)

### linea-verifier
### linea-ens-subgraph

The linea verifier contracts are responsible for checking the proofs and values returned by the gateway for specific slots values stored on Linea, adapted from [evm-verifier](https://github.com/ensdomains/evmgateway/tree/main/evm-verifier)
The Linea ENS subgrah consumed by the frontend, adapted from [ens-subgraph](https://github.com/ensdomains/ens-subgraph)

### poh-verifier
### linea-state-verifier

A NestJS API responsible for signing a message aknowledging an address has passed the POH process, the signature created is then checked by the poh verifier in the l2-contracts.
The linea state verifier contracts are responsible for checking values using sparse merkle proofs returned by the linea-ccip-gateway for specific slots values stored on Linea, adapted from [evm-verifier](https://github.com/ensdomains/evmgateway/tree/main/evm-verifier)

### poh-signer-api

A NestJS API responsible for signing a message aknowledging an address has passed the POH process, the signature created is then checked by the poh signer api in the linea-ens-contracts.

## Deployed contracts

Check the deployment folders in [./packages/l1-contracts/deployments](./packages/l1-contracts/deployments) and [./packages/l2-contracts/deployments](./packages/l2-contracts/deployments)
Check the deployment folders in [./packages/linea-ens-resolver/deployments](./packages/linea-ens-resolver/deployments) and [./packages/linea-ens-contracts/deployments](./packages/linea-ens-contracts/deployments)

For detailed information about each package, please check their own Readme file.
3 changes: 0 additions & 3 deletions packages/gateway/contracts/deps.sol

This file was deleted.

12 changes: 0 additions & 12 deletions packages/l1-contracts/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions packages/l2-contracts/.husky/pre-commit

This file was deleted.

Loading

0 comments on commit 7cf7c7e

Please sign in to comment.