From dff0e430ade96c5ddb1d80be98a99247e61d674a Mon Sep 17 00:00:00 2001 From: Julink Date: Wed, 10 Jul 2024 17:38:37 +0200 Subject: [PATCH] fix: linea-ens-contracts denv command + readme --- packages/linea-ens-app/README.md | 26 +++++++++++- .../05_deploy_public_suffix_list.ts | 1 + .../deploy/dnsregistrar/20_set_tlds.ts | 1 + .../deploy/dnssec-oracle/10_deploy_oracle.ts | 1 + ...00_deploy_base_registrar_implementation.ts | 1 + packages/linea-ens-contracts/tasks/seed.ts | 1 + packages/linea-ens-contracts/yarn.lock | 9 +++- packages/linea-ens-subgraph/subgraph.yaml | 41 +++++++++---------- packages/poh-signer-api/.env.example | 4 +- .../web3signer/keyFiles/examples/signer.yaml | 2 +- 10 files changed, 60 insertions(+), 27 deletions(-) diff --git a/packages/linea-ens-app/README.md b/packages/linea-ens-app/README.md index fcce22510..2effb5c22 100644 --- a/packages/linea-ens-app/README.md +++ b/packages/linea-ens-app/README.md @@ -30,19 +30,41 @@ yarn setup In a third terminal run: +```bash +cd services/web3signer/ +cp ./keyFiles/examples/signer.yaml ./keyFiles/signer.yaml +make dev-docker +``` + +In a fourth terminal run: + +```bash +cd packages/poh-signer-api +cp .env.example .env +cp pnpm i +make pnpm start +``` + +Make sure `VERIFIER_CONTRACT_ADDRESS` matches the `PohVerifier` contract address in ./packages/linea-ens-app/.env.local + +In a fifth terminal run: + ```bash cd packages/linea-ens-app pnpm dev:glocal ``` +You'll need an account with POH to fully use the local env, if you don't, you can get it [here] (https://poh.linea.build/) + - Then browse http://localhost:3000/ -- Import one of the hardhat test accounts in your metamask (eg: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80) +- Import one of the hardhat test accounts in your metamask to have funds (eg: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80) - Add the local test network to your metamask with this info: - Localhost 8545 - http://127.0.0.1:8545 - 1337 - ETH -- You can start testing the app +- Transfer some ETH from the test account to your POH account +- You can start testing the app and register a domain ### Running Dev env diff --git a/packages/linea-ens-contracts/deploy/dnsregistrar/05_deploy_public_suffix_list.ts b/packages/linea-ens-contracts/deploy/dnsregistrar/05_deploy_public_suffix_list.ts index 165a5c8b9..d157f45f5 100644 --- a/packages/linea-ens-contracts/deploy/dnsregistrar/05_deploy_public_suffix_list.ts +++ b/packages/linea-ens-contracts/deploy/dnsregistrar/05_deploy_public_suffix_list.ts @@ -1,4 +1,5 @@ import { ethers } from 'hardhat' +// @ts-ignore import packet from 'dns-packet' import { DeployFunction } from 'hardhat-deploy/types' import { HardhatRuntimeEnvironment } from 'hardhat/types' diff --git a/packages/linea-ens-contracts/deploy/dnsregistrar/20_set_tlds.ts b/packages/linea-ens-contracts/deploy/dnsregistrar/20_set_tlds.ts index 038402b84..3412fdfa8 100644 --- a/packages/linea-ens-contracts/deploy/dnsregistrar/20_set_tlds.ts +++ b/packages/linea-ens-contracts/deploy/dnsregistrar/20_set_tlds.ts @@ -1,3 +1,4 @@ +// @ts-ignore import packet from 'dns-packet' import { ethers } from 'hardhat' import { DeployFunction } from 'hardhat-deploy/types' diff --git a/packages/linea-ens-contracts/deploy/dnssec-oracle/10_deploy_oracle.ts b/packages/linea-ens-contracts/deploy/dnssec-oracle/10_deploy_oracle.ts index 9ec08c1a6..ea80e7e7e 100644 --- a/packages/linea-ens-contracts/deploy/dnssec-oracle/10_deploy_oracle.ts +++ b/packages/linea-ens-contracts/deploy/dnssec-oracle/10_deploy_oracle.ts @@ -1,3 +1,4 @@ +// @ts-ignore import packet from 'dns-packet' import { ethers } from 'hardhat' import { DeployFunction } from 'hardhat-deploy/types' diff --git a/packages/linea-ens-contracts/deploy/ethregistrar/00_deploy_base_registrar_implementation.ts b/packages/linea-ens-contracts/deploy/ethregistrar/00_deploy_base_registrar_implementation.ts index c1ee55da5..a05043c6f 100644 --- a/packages/linea-ens-contracts/deploy/ethregistrar/00_deploy_base_registrar_implementation.ts +++ b/packages/linea-ens-contracts/deploy/ethregistrar/00_deploy_base_registrar_implementation.ts @@ -1,3 +1,4 @@ +// @ts-ignore import namehash from 'eth-ens-namehash' import { ethers } from 'hardhat' import { DeployFunction } from 'hardhat-deploy/types' diff --git a/packages/linea-ens-contracts/tasks/seed.ts b/packages/linea-ens-contracts/tasks/seed.ts index e70028cf4..42c49d742 100644 --- a/packages/linea-ens-contracts/tasks/seed.ts +++ b/packages/linea-ens-contracts/tasks/seed.ts @@ -1,6 +1,7 @@ import fs from 'fs' import * as envfile from 'envfile' +// @ts-ignore import n from 'eth-ens-namehash' import { task } from 'hardhat/config' diff --git a/packages/linea-ens-contracts/yarn.lock b/packages/linea-ens-contracts/yarn.lock index 1c6533a9e..aee4e2160 100644 --- a/packages/linea-ens-contracts/yarn.lock +++ b/packages/linea-ens-contracts/yarn.lock @@ -3799,13 +3799,20 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -dns-packet@^5.0.4, dns-packet@^5.2.1, dns-packet@^5.3.0: +dns-packet@^5.0.4, dns-packet@^5.2.1: version "5.4.0" resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.4.0.tgz#1f88477cf9f27e78a213fb6d118ae38e759a879b" integrity sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g== dependencies: "@leichtgewicht/ip-codec" "^2.0.1" +dns-packet@^5.3.0: + version "5.6.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.1.tgz#ae888ad425a9d1478a0674256ab866de1012cf2f" + integrity sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw== + dependencies: + "@leichtgewicht/ip-codec" "^2.0.1" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" diff --git a/packages/linea-ens-subgraph/subgraph.yaml b/packages/linea-ens-subgraph/subgraph.yaml index 17b9c3e44..8b30c3880 100644 --- a/packages/linea-ens-subgraph/subgraph.yaml +++ b/packages/linea-ens-subgraph/subgraph.yaml @@ -8,11 +8,11 @@ schema: dataSources: - kind: ethereum/contract name: ENSRegistry - network: linea-sepolia + network: mainnet source: abi: EnsRegistry - address: "0x5B2636F0f2137B4aE722C01dd5122D7d3e9541f7" - startBlock: 2395094 + address: "0x5FbDB2315678afecb367f032d93F642f64180aa3" + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -36,11 +36,11 @@ dataSources: handler: handleNewTTL - kind: ethereum/contract name: ENSRegistryOld - network: linea-sepolia + network: mainnet source: abi: EnsRegistry - address: "0xB7e9e43A6D408f5703063f6b351c0Ce7Aa41A2E5" - startBlock: 2395085 + address: "0x8464135c8F25Da09e49BC8782676a84730C318bC" + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -64,11 +64,11 @@ dataSources: handler: handleNewTTLOldRegistry - kind: ethereum/contract name: Resolver - network: linea-sepolia + network: mainnet source: abi: Resolver - address: "0xA2008916Ed2d7ED0Ecd747a8a5309267e42cf1f1" - startBlock: 2395249 + address: "0x99bbA657f2BbC93c02D617f8bA121cB8Fc104Acf" + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -113,11 +113,11 @@ dataSources: handler: handleVersionChanged - kind: ethereum/contract name: BaseRegistrar - network: linea-sepolia + network: mainnet source: abi: BaseRegistrar - address: "0x83475a84C0ea834F06c8e636A62631e7d2e07A44" - startBlock: 2395099 + address: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0" + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -140,11 +140,11 @@ dataSources: handler: handleNameTransferred - kind: ethereum/contract name: EthRegistrarControllerOld - network: linea-sepolia + network: mainnet source: abi: EthRegistrarControllerOld - address: "0x9268085cc7bE551faf64B3e82913A6e963D3f58a" - startBlock: 2395216 + address: "0xf5059a5D33d5853360D16C683c16e67980206f36" + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -162,11 +162,10 @@ dataSources: handler: handleNameRenewedByController - kind: ethereum/contract name: EthRegistrarController - network: linea-sepolia + network: mainnet source: abi: EthRegistrarController - address: "0x0f81E3B3A32DFE1b8A08d3C0061d852337a09338" - startBlock: 2395231 + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.6 @@ -185,11 +184,11 @@ dataSources: handler: handleNameRenewedByController - kind: ethereum/contract name: NameWrapper - network: linea-sepolia + network: mainnet source: abi: NameWrapper - address: "0xF127De9E039a789806fEd4C6b1C0f3aFfeA9425e" - startBlock: 2395202 + address: "0x9E545E3C0baAB3E08CdfD552C960A1050f373042" + startBlock: 0 mapping: kind: ethereum/events apiVersion: 0.0.6 diff --git a/packages/poh-signer-api/.env.example b/packages/poh-signer-api/.env.example index a755cb15f..a0c1f3036 100644 --- a/packages/poh-signer-api/.env.example +++ b/packages/poh-signer-api/.env.example @@ -3,11 +3,11 @@ NODE_ENV=development PORT=4000 # Signer -VERIFIER_CONTRACT_ADDRESS=0x576754D133C02B2E229F2630Baa2F06110cE9a9A +VERIFIER_CONTRACT_ADDRESS=0x677df0cb865368207999F2862Ece576dC56D8dF6 # Poh API POH_API_URL=https://linea-xp-poh-api.linea.build # Web3Signer WEB3SIGNER_BASE_URL=http://localhost:9000 -WEB3SIGNER_PUBLIC_KEY=0x9d2a12cf4ff79398f8f930fed1b772dea9917aa62360067b6463af5f40a2182d26740cbeb5c8ea966e710d111be353dfb284b9b20b16406adfd94f7855fd22a1 +WEB3SIGNER_PUBLIC_KEY=0xba5734d8f7091719471e7f7ed6b9df170dc70cc661ca05e688601ad984f068b0d67351e5f06073092499336ab0839ef8a521afd334e53807205fa2f08eec74f4 diff --git a/services/web3signer/keyFiles/examples/signer.yaml b/services/web3signer/keyFiles/examples/signer.yaml index cbd8f4591..ef48c25c9 100644 --- a/services/web3signer/keyFiles/examples/signer.yaml +++ b/services/web3signer/keyFiles/examples/signer.yaml @@ -2,4 +2,4 @@ type: "file-raw" keyType: "SECP256K1" # WARNING: FOR LOCAL DEV ONLY - DO NOT REUSE THESE KEYS ELSEWHERE # Key for aggregation finalization -privateKey: "JustChangeMe" +privateKey: "59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"