Skip to content

Commit cd2a354

Browse files
committed
fixes merge conflicts
2 parents ac62176 + 5cf6e9d commit cd2a354

File tree

87 files changed

+2517
-330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2517
-330
lines changed

.claude/settings.local.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,28 @@
66
"Bash(npx eslint:*)",
77
"Bash(sed:*)",
88
"Bash(grep:*)",
9-
"Bash(find:*)"
9+
"Bash(find:*)",
10+
"Bash(git commit:*)",
11+
"Bash(pnpm lint:*)",
12+
"Bash(npx tsc:*)",
13+
"Bash(git add:*)",
14+
"Bash(git checkout:*)",
15+
"Bash(rm:*)",
16+
"Bash(mkdir:*)",
17+
"Bash(mv:*)",
18+
"Bash(git rm:*)",
19+
"Bash(node:*)",
20+
"Bash(pnpm unlink:*)",
21+
"Bash(pnpm test:*)",
22+
"Bash(timeout 60 pnpm lint:types:*)",
23+
"Bash(gh pr list:*)",
24+
"Bash(ls:*)",
25+
"mcp__github__list_workflow_runs",
26+
"mcp__github__list_workflows",
27+
"mcp__github__list_workflow_jobs",
28+
"mcp__github__get_job_logs",
29+
"mcp__github__get_pull_request_diff",
30+
"mcp__github__get_pull_request"
1031
],
1132
"deny": []
1233
}

.github/workflows/pages-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6464
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
6565
wranglerVersion: 'v3.57.1'
66+
packageManager: 'pnpm'
6667
command: pages deploy --project-name=ens-app-v3
6768
secrets: |
6869
GITHUB_TOKEN

.github/workflows/test.yaml

Lines changed: 78 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,45 @@ jobs:
4242
name: stateless-build
4343
path: stateless-build.tar
4444

45-
build-stateful:
45+
build-stateful-sepolia:
4646
runs-on: blacksmith-4vcpu-ubuntu-2404
4747
steps:
4848
- uses: actions/checkout@v4
4949
- uses: ./.github/actions/setup
5050

51-
- name: Build stateful and export
51+
- name: Build stateful sepolia and export
5252
run: |
5353
export NEXT_PUBLIC_CHAIN_NAME=sepolia
5454
pnpm build && pnpm export
5555
56-
- name: Tar stateful files
57-
run: tar -cvf stateful-build.tar out
56+
- name: Tar stateful sepolia files
57+
run: tar -cvf stateful-sepolia-build.tar out
5858

59-
- name: Upload stateful
59+
- name: Upload stateful sepolia
6060
uses: actions/upload-artifact@v4
6161
with:
62-
name: stateful-build
63-
path: stateful-build.tar
62+
name: stateful-sepolia-build
63+
path: stateful-sepolia-build.tar
64+
65+
build-stateful-mainnet:
66+
runs-on: blacksmith-4vcpu-ubuntu-2404
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: ./.github/actions/setup
70+
71+
- name: Build stateful mainnet and export
72+
run: |
73+
export NEXT_PUBLIC_CHAIN_NAME=mainnet
74+
pnpm build && pnpm export
75+
76+
- name: Tar stateful mainnet files
77+
run: tar -cvf stateful-mainnet-build.tar out
78+
79+
- name: Upload stateful mainnet
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: stateful-mainnet-build
83+
path: stateful-mainnet-build.tar
6484

6585
stateless:
6686
name: stateless (${{matrix.shard}})
@@ -134,9 +154,9 @@ jobs:
134154
retention-days: 30
135155
overwrite: true
136156

137-
stateful:
138-
name: stateful (${{matrix.shard}})
139-
needs: build-stateful
157+
stateful-sepolia:
158+
name: stateful-sepolia (${{matrix.shard}})
159+
needs: build-stateful-sepolia
140160
timeout-minutes: 10
141161
runs-on: blacksmith-4vcpu-ubuntu-2404
142162
strategy:
@@ -151,26 +171,67 @@ jobs:
151171

152172
- run: pnpm rebuild -r
153173

154-
- name: Download build
174+
- name: Download sepolia build
155175
id: download
156176
uses: actions/download-artifact@v4
157177
with:
158-
name: stateful-build
178+
name: stateful-sepolia-build
159179

160-
- name: Untar files
161-
run: tar -xvf stateful-build.tar
180+
- name: Untar sepolia files
181+
run: tar -xvf stateful-sepolia-build.tar
162182

163-
- name: Run tests
183+
- name: Run sepolia tests
164184
run: |
165185
parallel --lb --halt now,success=1,fail=1 ::: \
166186
"pnpm wrangle" \
167-
"pnpm wait-on http://127.0.0.1:8788 && npx playwright test --shard=${{matrix.shard}}/${{strategy.job-total}} --project=stateful"
187+
"pnpm wait-on http://127.0.0.1:8788 && npx playwright test --shard=${{matrix.shard}}/${{strategy.job-total}} --project=stateful --grep-invert='@mainnet'"
188+
env:
189+
SECRET_WORDS: ${{ secrets.SECRET_WORDS }}
190+
191+
- uses: actions/upload-artifact@v4
192+
if: always()
193+
with:
194+
name: stateful-sepolia-report-${{matrix.shard}}
195+
path: playwright-report/
196+
retention-days: 30
197+
198+
stateful-mainnet:
199+
name: stateful-mainnet (${{matrix.shard}})
200+
needs: build-stateful-mainnet
201+
timeout-minutes: 10
202+
runs-on: blacksmith-4vcpu-ubuntu-2404
203+
strategy:
204+
matrix:
205+
shard: [1, 2, 3]
206+
steps:
207+
- uses: actions/checkout@v4
208+
- uses: ./.github/actions/setup
209+
- uses: ./.github/actions/setup-playwright
210+
211+
- run: |
212+
export NEXT_PUBLIC_CHAIN_NAME=mainnet
213+
pnpm rebuild -r
214+
215+
- name: Download mainnet build
216+
id: download
217+
uses: actions/download-artifact@v4
218+
with:
219+
name: stateful-mainnet-build
220+
221+
- name: Untar mainnet files
222+
run: tar -xvf stateful-mainnet-build.tar
223+
224+
- name: Run mainnet tests
225+
run: |
226+
parallel --lb --halt now,success=1,fail=1 ::: \
227+
"pnpm dev:mainnet" \
228+
"pnpm wait-on http://127.0.0.1:3000 && CHAIN=mainnet npx playwright test --shard=${{matrix.shard}}/${{strategy.job-total}} --project=stateful --grep='@mainnet'"
168229
env:
169230
SECRET_WORDS: ${{ secrets.SECRET_WORDS }}
170231

171232
- uses: actions/upload-artifact@v4
172233
if: always()
173234
with:
174-
name: stateful-report-${{matrix.shard}}
235+
name: stateful-mainnet-report-${{matrix.shard}}
175236
path: playwright-report/
176237
retention-days: 30

CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

5+
## IMPORTANT: Git Workflow Rules
6+
7+
### NEVER push directly to main branch
8+
- Always work on feature branches
9+
- Create pull requests for all changes
10+
- Use `git push origin <branch-name>` to push to feature branches only
11+
- If on main branch, switch to a feature branch before making changes
12+
- Direct pushes to main will bypass GitHub protections and break CI/CD workflows
13+
514
## Development Commands
615

716
### Build & Development

deploy/00_register_legacy.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,24 @@ const names: Name[] = [
363363
],
364364
},
365365
},
366+
{
367+
label: 'with-testnet-records',
368+
namedOwner: 'owner',
369+
namedAddr: 'owner',
370+
records: {
371+
addr: [
372+
{ key: 61n, value: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC' },
373+
{ key: 0n, value: '0x00149010587f8364b964fcaa70687216b53bd2cbd798' },
374+
{ key: 2n, value: '0x0000000000000000000000000000000000000000' },
375+
{ key: 2147568180n, value: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC' },
376+
{ key: 2147905262n, value: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC' },
377+
{ key: 2158639068n, value: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC' },
378+
{ key: 2147542789n, value: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC' },
379+
{ key: 2148017999n, value: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC' },
380+
{ key: 2147500648n, value: '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC' },
381+
],
382+
},
383+
},
366384
] as const
367385

368386
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { expect } from '@playwright/test'
2+
3+
import { test } from '../../../playwright/index.js'
4+
5+
test.describe('More Tab Primary Names', () => {
6+
test(`should enter primary name more tab @mainnet`, async ({ page, login, makePageObject }) => {
7+
const name = 'default-ens.eth'
8+
9+
// Enter ens app and connect
10+
await page.goto('/')
11+
await login.connect()
12+
13+
// Go to more page of default-ens.eth
14+
const morePage = makePageObject('MorePage')
15+
await morePage.goto(name)
16+
await expect(morePage.wrapButton).toHaveCount(0)
17+
18+
// Check primary name section is showing
19+
await expect(page.getByText('Your primary name')).toBeVisible()
20+
21+
// Check eth and scr is showing with correct addresses
22+
const address = '0xFc5958B4B6F9a06D21E06429c8833f865577acf0'
23+
await expect(page.getByTestId(`primary-name-eth-${address}`)).toBeVisible()
24+
await expect(page.getByTestId(`primary-name-scr-${address}`)).toBeVisible()
25+
})
26+
})
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { expect } from '@playwright/test'
2+
3+
import { test } from '../../../playwright/index.js'
4+
5+
test.describe('Settings Tab Primary Names', () => {
6+
test(`should enter settings tab and check network specific primary names @mainnet`, async ({
7+
page,
8+
login,
9+
}) => {
10+
test.slow()
11+
const ensNames = [
12+
'default-ens.eth',
13+
'arbprimary.eth',
14+
'baseprimary.eth',
15+
'opprimary.eth',
16+
'lineaprimary.eth',
17+
]
18+
19+
// Enter ens app and connect
20+
await page.goto('/')
21+
await login.connect()
22+
23+
// Go to settings page
24+
await page.goto('/my/settings')
25+
await expect(page.getByText('Settings').first()).toBeVisible()
26+
27+
// Check network specific primary names section is showing
28+
await expect(page.getByText('Network-specific primary names').first()).toBeVisible()
29+
30+
// Check network specific names are showing correctly
31+
await expect(page.getByText(ensNames[0]).first()).toBeVisible({ timeout: 20000 })
32+
await expect(page.getByText(ensNames[1]).first()).toBeVisible({ timeout: 20000 })
33+
await expect(page.getByText(ensNames[2]).first()).toBeVisible({ timeout: 20000 })
34+
await expect(page.getByText(ensNames[3]).first()).toBeVisible({ timeout: 20000 })
35+
await expect(page.getByText(ensNames[4]).first()).toBeVisible({ timeout: 20000 })
36+
37+
await expect(page.getByTestId(`network-row-${ensNames[0]}`)).toBeVisible()
38+
await expect(page.getByTestId(`network-row-${ensNames[1]}`)).toBeVisible()
39+
await expect(page.getByTestId(`network-row-${ensNames[2]}`)).toBeVisible()
40+
await expect(page.getByTestId(`network-row-${ensNames[3]}`)).toBeVisible()
41+
await expect(page.getByTestId(`network-row-${ensNames[4]}`)).toBeVisible()
42+
43+
// Check network icons are showing correctly
44+
await expect(page.getByTestId(`network-icon-${ensNames[0]}-eth`)).toBeVisible()
45+
await expect(page.getByTestId(`network-icon-${ensNames[0]}-scr`)).toBeVisible()
46+
await expect(page.getByTestId(`network-icon-${ensNames[1]}-arb1`)).toBeVisible()
47+
await expect(page.getByTestId(`network-icon-${ensNames[2]}-base`)).toBeVisible()
48+
await expect(page.getByTestId(`network-icon-${ensNames[3]}-op`)).toBeVisible()
49+
await expect(page.getByTestId(`network-icon-${ensNames[4]}-linea`)).toBeVisible()
50+
})
51+
})
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { expect } from '@playwright/test'
2+
3+
import { test } from '../../../playwright/index.js'
4+
5+
test.describe('Un-normalised Name Display', () => {
6+
const address1 = '0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb'
7+
const address2 = '0x43e47385f6b3f8bdbe02c210bf5c74b6c34ff441'
8+
9+
test(`should check correct name is showing for correct address @mainnet`, async ({ page }) => {
10+
// Enter ENS app
11+
await page.goto('/')
12+
13+
// Search address and enter page
14+
await page.goto(`/${address1}`)
15+
await expect(page.getByText('0x0c5...7AaFb')).toBeVisible()
16+
17+
// Check it says X.eth and has View Profile button
18+
await expect(page.getByTestId('profile-snippet-name')).toHaveText('metamask.eth')
19+
await expect(
20+
page.getByTestId('profile-snippet').getByRole('button', { name: 'View Profile' }),
21+
).toBeVisible()
22+
})
23+
24+
test('should check un-normalised name is showing with warning @mainnet', async ({ page }) => {
25+
// Enter ENS app
26+
await page.goto('/')
27+
28+
// Search address and enter page
29+
await page.goto(`/${address2}`)
30+
await expect(page.getByText('0x43e...ff441')).toBeVisible()
31+
32+
// Check it says X.eth and has un-normalised warning
33+
await expect(page.getByTestId('profile-snippet-name')).toHaveText('MetaMask.eth')
34+
await expect(page.getByTestId('profile-snippet').locator('text=Unnormalized name')).toHaveText(
35+
'Unnormalized name',
36+
)
37+
38+
// Check View Profile button isn't visible
39+
await expect(
40+
page.getByTestId('profile-snippet').getByRole('button', { name: 'View Profile' }),
41+
).not.toBeVisible()
42+
})
43+
})

e2e/specs/stateless/profileEditor.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { expect } from '@playwright/test'
44
import dotenv from 'dotenv'
5-
import { Address } from 'viem'
5+
import { type Address } from 'viem'
66

77
import { encodeAbi, RecordOptions } from '@ensdomains/ensjs/utils'
88
import { wrapName } from '@ensdomains/ensjs/wallet'

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
"hh": "NODE_OPTIONS='--experimental-loader ts-node/esm/transpile-only' hardhat"
5656
},
5757
"dependencies": {
58-
"@ensdomains/address-encoder": "1.1.1",
58+
"@ensdomains/address-encoder": "1.1.3",
5959
"@ensdomains/content-hash": "^3.0.0-beta.5",
60-
"@ensdomains/ens-contracts": "1.4.0-beta.2",
60+
"@ensdomains/ens-contracts": "1.5.2",
6161
"@ensdomains/ens-test-env": "1.0.1",
62-
"@ensdomains/ensjs": "4.0.3-alpha.12",
62+
"@ensdomains/ensjs": "4.1.1",
6363
"@ensdomains/thorin": "1.0.0-beta.28",
6464
"@getpara/rainbowkit": "1.3.0",
6565
"@getpara/rainbowkit-wallet": "1.3.0",

0 commit comments

Comments
 (0)