diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 9e236c212..000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Docker Image - -on: - push: - branches: - - develop - # pull_request: - release: - types: - - released - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set Docker Tag - id: docker-tag - if: ${{ github.event_name != 'release' }} - run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)" | tee $GITHUB_ENV - - - name: Set Docker Tag - Release - id: docker-tag-release - if: ${{ github.event_name == 'release' }} - run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV - - - name: Login to Docker Repository - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_REPO_USER }} - password: ${{ secrets.DOCKER_REPO_TOKEN }} - - - - # Setting up Docker Buildx with docker-container driver is required - # at the moment to be able to use a subdirectory with Git context - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Docker Image Build - id: docker-build - if: ${{ github.event_name == 'pull_request' }} - uses: docker/build-push-action@v4 - with: - context: "{{defaultContext}}:packages/gateway" - push: false - tags: consensys/linea-resolver:${{ env.DOCKER_TAG }} - - - name: Docker Image Build and Publish - id: docker-build-publish - if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref,'refs/tags/') }} - uses: docker/build-push-action@v4 - with: - context: "{{defaultContext}}:packages/gateway" - push: true - tags: consensys/linea-resolver:${{ env.DOCKER_TAG }} \ No newline at end of file diff --git a/.github/workflows/frontend.yml b/.github/workflows/ens-app-build-publish.yml similarity index 74% rename from .github/workflows/frontend.yml rename to .github/workflows/ens-app-build-publish.yml index e563e52af..dc8a3de16 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/ens-app-build-publish.yml @@ -4,15 +4,19 @@ on: push: branches: - main + paths: + - "packages/ens-app-v3/**" pull_request: branches: - main + paths: + - "packages/ens-app-v3/**" release: types: - released jobs: - publish: + ens-app-build-publish: runs-on: ubuntu-latest steps: - name: Checkout @@ -21,14 +25,12 @@ jobs: - name: Set Docker Tag id: docker-tag if: ${{ github.event_name != 'release' }} - run: | - echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)" >> $GITHUB_ENV + run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-ens-app" | tee $GITHUB_ENV - name: Set Docker Tag - Release id: docker-tag-release if: ${{ github.event_name == 'release' }} - run: | - echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-ens-app-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV - name: Login to Docker Repository uses: docker/login-action@v2 @@ -43,11 +45,12 @@ jobs: env: NEXT_PUBLIC_BASE_DOMAIN: ${{ secrets.NEXT_PUBLIC_BASE_DOMAIN }} NEXT_PUBLIC_ALCHEMY_KEY: ${{ secrets.NEXT_PUBLIC_ALCHEMY_KEY }} + NEXT_PUBLIC_POH_SIGNATURE_API: "https://poh-verifier.dev.linea.build" if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} uses: docker/build-push-action@v4 with: context: ./ - file: ./Dockerfile + file: ./packages/ens-app-v3/Dockerfile push: true tags: consensys/linea-resolver:${{ env.DOCKER_TAG }} build-args: BUILD_COMMAND="pnpm build" diff --git a/.github/workflows/poh-verifier-build-publish.yml b/.github/workflows/poh-verifier-build-publish.yml new file mode 100644 index 000000000..9068f882f --- /dev/null +++ b/.github/workflows/poh-verifier-build-publish.yml @@ -0,0 +1,53 @@ +name: "Build and Publish PoH Verifier API" + +on: + push: + branches: + - main + paths: + - "packages/poh-verifier/**" + pull_request: + branches: + - main + paths: + - "packages/poh-verifier/**" + release: + types: + - released + +jobs: + poh-verifier-build-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set Docker Tag + id: docker-tag + if: ${{ github.event_name != 'release' }} + run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-poh-verifier" | tee $GITHUB_ENV + + - name: Set Docker Tag - Release + id: docker-tag-release + if: ${{ github.event_name == 'release' }} + run: echo "DOCKER_TAG=${GITHUB_SHA:0:7}-$(date +%s)-poh-verifier-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV + + - name: Login to Docker Repository + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_REPO_USER }} + password: ${{ secrets.DOCKER_REPO_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Docker Image Build and Publish + uses: docker/build-push-action@v4 + with: + build-args: | + ENV_FILE=.env.production + SIGNER_PRIVATE_KEY=${{ secrets.POH_VERIFIER_PRIVATE_KEY }} + context: ./packages/poh-verifier + file: ./packages/poh-verifier/Dockerfile + push: true + tags: consensys/linea-resolver:${{ env.DOCKER_TAG }} diff --git a/.github/workflows/slither.yml b/.github/workflows/slither.yml deleted file mode 100644 index d8634bb14..000000000 --- a/.github/workflows/slither.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Slither Analysis -on: - pull_request: - branches: - - develop - push: - branches: - - develop -jobs: - analyze: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Run Slither - uses: crytic/slither-action@v0.3.0 - id: slither - env: - L2_PROVIDER_URL: ${{ secrets.L2_PROVIDER_URL }} - L1_PROVIDER_URL: ${{ secrets.L1_PROVIDER_URL }} - with: - node-version: 16 - target: "packages/contracts" - sarif: results.sarif - fail-on: none - - - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: ${{ steps.slither.outputs.sarif }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index f0fc461f9..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: "Execute lint and test" - -on: - pull_request: - branches: - - develop - push: - branches: - - develop -jobs: - test-smart-contracts-and-build-gateway: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Install dependencies - working-directory: ./packages/contracts - run: yarn install - - name: Lint the code - working-directory: ./packages/contracts - run: yarn lint - - name: Run tests - working-directory: ./packages/contracts - env: - L2_PROVIDER_URL: ${{ secrets.L2_PROVIDER_URL }} - L1_PROVIDER_URL: ${{ secrets.L1_PROVIDER_URL }} - run: yarn test - - name: Build Gateway - working-directory: ./packages/gateway - run: | - yarn install - yarn build diff --git a/packages/ens-app-v3/.env.example b/packages/ens-app-v3/.env.example index 4672a2604..8e6dea656 100644 --- a/packages/ens-app-v3/.env.example +++ b/packages/ens-app-v3/.env.example @@ -21,4 +21,8 @@ BATCH_GATEWAY_URLS='["https://ccip-v2.ens.xyz/"]' NEXT_PUBLIC_BASE_DOMAIN='linea-test' # To be read by the frontend dapp BASE_DOMAIN='linea-test' # To be read by the deployment scripts in "l2-cntracts" -NEXT_PUBLIC_POH_SIGNATURE_API='http://localhost:4000' \ No newline at end of file +# Local +NEXT_PUBLIC_POH_SIGNATURE_API='http://localhost:4000' + +# Sepolia +# NEXT_PUBLIC_POH_SIGNATURE_API='https://poh-verifier.dev.linea.build' \ No newline at end of file diff --git a/Dockerfile b/packages/ens-app-v3/Dockerfile similarity index 100% rename from Dockerfile rename to packages/ens-app-v3/Dockerfile diff --git a/packages/ens-app-v3/src/constants/sepoliaCustom.ts b/packages/ens-app-v3/src/constants/sepoliaCustom.ts index e2c8c3dfc..3dd51c5a0 100644 --- a/packages/ens-app-v3/src/constants/sepoliaCustom.ts +++ b/packages/ens-app-v3/src/constants/sepoliaCustom.ts @@ -21,10 +21,10 @@ export const sepoliaCustom = /* #__PURE__ */ defineChain({ address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 751532, }, - ensRegistry: { address: '0x56c306b6d15287870B9484883335B8a929f97729' }, + ensRegistry: { address: '0xCeF1e850d0207B237Ae91e64037072F93C76aE35' }, ensUniversalResolver: { - address: '0x35B37282d7f7005DE1c3F867A6C663d4a530E229', - blockCreated: 5_647_522, + address: '0x7263bA3b95Ae6177dC39D22f7eF4E277806E8aCF', + blockCreated: 5_710_989, }, }, testnet: true, @@ -32,33 +32,33 @@ export const sepoliaCustom = /* #__PURE__ */ defineChain({ export const sepoliaCustomEnsAddresses = { ensBaseRegistrarImplementation: { - address: '0x3680EbF9a484B1250E46324328582AbcB53B6791', + address: '0x2372154B01F1071b2f2BB02e93Ab97404f1F7a76', }, ensBulkRenewal: { - address: '0x88Cd4C93b97271AaBA45Bf74a3df5178aB2Ef874', + address: '0x05341E05dc959eF86E08a41883F5B478947B790D', }, ensDnsRegistrar: { - address: '0x964429Cee5760eF8E10d52d7061DbD4A70d8B5F4', + address: '0x88eeA2489dCc3BeF6439E65a413b68F1a23F1DCf', }, ensDnssecImpl: { - address: '0x541B273dE31cd631544a164C6F1679FD2995FD34', + address: '0x45FC85e99c62359d2A778d759FA36dF3D53a31D4', }, ensEthRegistrarController: { - address: '0x65560259405ab2c6a14Aa753e47933a04C8c1b43', + address: '0x77D2a098D81580633091529FB93953dE9180c0c0', }, ensNameWrapper: { - address: '0x3b365991034a573d54E6D10e88BfacBF2788A23e', + address: '0xB496f723a0180418b0F15e2b1af7d60BBa8Afeb1', }, ensPublicResolver: { - address: '0xca710b440ad4457eE7a8C02355dcA985B78B7627', + address: '0xA4254Ba887ea0813A3F265A7442fAFa68E21a6bb', }, ensRegistry: { - address: '0x56c306b6d15287870B9484883335B8a929f97729', + address: '0xCeF1e850d0207B237Ae91e64037072F93C76aE35', }, ensReverseRegistrar: { - address: '0x8f71DD4896e0f005dC3dAF7435D75CaB8B0A721b', + address: '0xDf307b640a95E6ed82798Eb41A5f388D0eF75C38', }, ensUniversalResolver: { - address: '0x35B37282d7f7005DE1c3F867A6C663d4a530E229', + address: '0x7263bA3b95Ae6177dC39D22f7eF4E277806E8aCF', }, } diff --git a/packages/ens-app-v3/src/utils/query/wagmi.ts b/packages/ens-app-v3/src/utils/query/wagmi.ts index 8e54020fa..7fb299d82 100644 --- a/packages/ens-app-v3/src/utils/query/wagmi.ts +++ b/packages/ens-app-v3/src/utils/query/wagmi.ts @@ -119,9 +119,7 @@ const wagmiConfig_ = createConfig({ ]) as unknown as FallbackTransport, } as const), ...({ - [sepolia.id]: initialiseTransports('linea-sepolia', [ - infuraUrl, - ]) as unknown as FallbackTransport, + [sepolia.id]: initialiseTransports('sepolia', [infuraUrl]) as unknown as FallbackTransport, } as const), }, }) diff --git a/packages/ens-subgraph/networks.json b/packages/ens-subgraph/networks.json index fa2381f70..e99c0f2ac 100644 --- a/packages/ens-subgraph/networks.json +++ b/packages/ens-subgraph/networks.json @@ -59,32 +59,32 @@ }, "sepolia": { "ENSRegistry": { - "address": "0x9125C4f492Ca725A2EAE5d9Df5643F6f41Fe77BE", - "startBlock": 5570702 + "address": "0xCeF1e850d0207B237Ae91e64037072F93C76aE35", + "startBlock": 5710905 }, "ENSRegistryOld": { - "address": "0x529a47F9d92375Ea637b56e64C7eaec266B4A575", - "startBlock": 5570741 + "address": "0x4672c086d0dED53102b2cd6fC68a49f1574166a6", + "startBlock": 5710900 }, "Resolver": { - "address": "0x7161c2eEf390ef14053E13012D6E761938820127", - "startBlock": 5570761 + "address": "0xA4254Ba887ea0813A3F265A7442fAFa68E21a6bb", + "startBlock": 5710986 }, "BaseRegistrar": { - "address": "0x0d5446e2050DCDc373DbB13A2e6a81D89E85FEb6", - "startBlock": 5570704 + "address": "0x2372154B01F1071b2f2BB02e93Ab97404f1F7a76", + "startBlock": 5710907 }, "EthRegistrarControllerOld": { - "address": "0x34823AD0432e7BDB512556093A369539fd3cCb39", - "startBlock": 5570748 + "address": "0xca23A9C1129A62584A6a656cE03130020f6eaf53", + "startBlock": 5710964 }, "EthRegistrarController": { - "address": "0xE2f076220c4e456A10398A8482d84BE1E8b82516", - "startBlock": 5570752 + "address": "0x77D2a098D81580633091529FB93953dE9180c0c0", + "startBlock": 5710979 }, "NameWrapper": { - "address": "0x0Fb19ba94805a816471C84c90F167285bA888FD3", - "startBlock": 5570741 + "address": "0xB496f723a0180418b0F15e2b1af7d60BBa8Afeb1", + "startBlock": 5710956 } }, "holesky": { diff --git a/packages/ens-subgraph/package.json b/packages/ens-subgraph/package.json index a0e78bbe5..e8c101801 100644 --- a/packages/ens-subgraph/package.json +++ b/packages/ens-subgraph/package.json @@ -16,9 +16,8 @@ "docker:remove-local": "graph remove graphprotocol/ens --node http://ens-app_graph-node_1:8020", "build": "graph build", "deploy": "graph deploy --network mainnet --product hosted-service ensdomains/ens", - "deploy:goerli": "graph deploy --network goerli --product hosted-service ensdomains/ensgoerli", - "deploy:sepolia": "graph deploy --network sepolia --studio enssepolia", - "deploy:holesky": "graph deploy --network holesky --studio ensholesky", + "deploy:sepolia": "graph deploy --network sepolia --studio ens-sepolia", + "deploy:holesky": "graph deploy --network holesky --studio ens-sepolia", "watch-local": "graph deploy graphprotocol/ens --watch --debug --node http://127.0.0.1:8020/ --ipfs http://localhost:5001" }, "devDependencies": { diff --git a/packages/poh-verifier/.env.production b/packages/poh-verifier/.env.production new file mode 100644 index 000000000..45afe3bcd --- /dev/null +++ b/packages/poh-verifier/.env.production @@ -0,0 +1,11 @@ +# Env +NODE_ENV=development +PORT=3000 + +# Signer +VERIFIER_CONTRACT_ADDRESS=0xa904d832aBEBb150acde3Aa520cAC39B0970AF1b + +# Poh API +POH_API_URL=https://linea-xp-poh-api.linea.build + +CHAIN_ID=11155111 \ No newline at end of file diff --git a/packages/poh-verifier/Dockerfile b/packages/poh-verifier/Dockerfile new file mode 100644 index 000000000..b810bcd13 --- /dev/null +++ b/packages/poh-verifier/Dockerfile @@ -0,0 +1,19 @@ +FROM node:18 + +WORKDIR /app + +ARG ENV_FILE +ARG SIGNER_PRIVATE_KEY + +ENV SIGNER_PRIVATE_KEY=$SIGNER_PRIVATE_KEY + +COPY . . + +COPY $ENV_FILE .env + +RUN npm install +RUN npm run build + +EXPOSE 3000 + +CMD ["npm", "start"] \ No newline at end of file