Skip to content

Commit

Permalink
fix: linea-ens-contracts denv command + readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Julink-eth committed Jul 10, 2024
1 parent 677e7e0 commit dff0e43
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 27 deletions.
26 changes: 24 additions & 2 deletions packages/linea-ens-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore
import packet from 'dns-packet'
import { ethers } from 'hardhat'
import { DeployFunction } from 'hardhat-deploy/types'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore
import packet from 'dns-packet'
import { ethers } from 'hardhat'
import { DeployFunction } from 'hardhat-deploy/types'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore
import namehash from 'eth-ens-namehash'
import { ethers } from 'hardhat'
import { DeployFunction } from 'hardhat-deploy/types'
Expand Down
1 change: 1 addition & 0 deletions packages/linea-ens-contracts/tasks/seed.ts
Original file line number Diff line number Diff line change
@@ -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'

Expand Down
9 changes: 8 additions & 1 deletion packages/linea-ens-contracts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
41 changes: 20 additions & 21 deletions packages/linea-ens-subgraph/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/poh-signer-api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion services/web3signer/keyFiles/examples/signer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit dff0e43

Please sign in to comment.