Skip to content

Commit edec152

Browse files
Merge branch 'dev' of github.com:bhargavkakadiya/ethereum-org-website into multi-select-user-persona
2 parents a2742d2 + 0606560 commit edec152

File tree

115 files changed

+3935
-1942
lines changed

Some content is hidden

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

115 files changed

+3935
-1942
lines changed

.all-contributorsrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11829,7 +11829,8 @@
1182911829
"avatar_url": "https://avatars.githubusercontent.com/u/8257719?v=4",
1183011830
"profile": "http://rashidma.com",
1183111831
"contributions": [
11832-
"bug"
11832+
"bug",
11833+
"doc"
1183311834
]
1183411835
},
1183511836
{

.github/workflows/build-crowdin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
trigger_crowdin_project_build:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/get-crowdin-contributors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
get_data_and_create_pr:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/get-leaderboard-reports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
get_data_and_create_pr:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/get-translation-progress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
get_data_and_create_pr:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/get-translations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
import_crowdin_and_create_prs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/import-community-events.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
create_pr:
9+
get_data_and_create_pr:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check out code

.github/workflows/lighthouse-ci.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Lighthouse CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- staging
8+
- performance/**
9+
10+
jobs:
11+
lighthouse:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
pull-requests: write
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Sleep for 60 minutes
20+
run: sleep 3600
21+
- name: Wait for Netlify Deploy
22+
id: netlify_deploy
23+
uses: probablyup/[email protected]
24+
with:
25+
site_id: "e8f2e766-888b-4954-8500-1b647d84db99"
26+
max_timeout: 900
27+
env:
28+
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
29+
- name: Audit URLs using Lighthouse
30+
id: lighthouse_audit
31+
uses: treosh/lighthouse-ci-action@v11
32+
with:
33+
urls: |
34+
${{ steps.netlify_deploy.outputs.url }}/en/
35+
${{ steps.netlify_deploy.outputs.url }}/en/wallets/find-wallet/
36+
${{ steps.netlify_deploy.outputs.url }}/en/staking/
37+
${{ steps.netlify_deploy.outputs.url }}/en/whitepaper/
38+
${{ steps.netlify_deploy.outputs.url }}/en/nft/
39+
${{ steps.netlify_deploy.outputs.url }}/en/developers/docs/intro-to-ethereum/
40+
${{ steps.netlify_deploy.outputs.url }}/en/developers/tutorials/creating-a-wagmi-ui-for-your-contract/
41+
runs: 3 # run three times
42+
uploadArtifacts: true # save results as an action artifacts
43+
temporaryPublicStorage: true # upload lighthouse report to the temporary storage
44+
- name: Format lighthouse score
45+
id: format_lighthouse_score
46+
uses: actions/github-script@v3
47+
with:
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
script: |
50+
const manifests = ${{ steps.lighthouse_audit.outputs.manifest }};
51+
const links = ${{ steps.lighthouse_audit.outputs.links }};
52+
const formatResult = (res) => Math.round((res * 100));
53+
54+
console.log('Total manifests:', manifests.length);
55+
console.log('Manifests:', JSON.stringify(manifests, null, 2));
56+
console.log('Links:', JSON.stringify(links, null, 2));
57+
58+
let comment = [
59+
'| Page | Performance | Accessibility | Best practices | SEO | PWA |',
60+
'| --- | --- | --- | --- | --- | --- |',
61+
];
62+
63+
Object.entries(links).forEach(([pageUrl, reportUrl]) => {
64+
const relevantManifests = manifests.filter(manifest => manifest.url === pageUrl);
65+
const results = relevantManifests.map(manifest => manifest.summary);
66+
const averagedResults = {};
67+
68+
if (results.length > 0) {
69+
Object.keys(results[0]).forEach(key => {
70+
averagedResults[key] = formatResult(
71+
results.reduce((acc, cur) => acc + cur[key], 0) / results.length
72+
);
73+
});
74+
75+
const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴';
76+
const urlForTable = pageUrl.includes('/en/') ? pageUrl.substring(pageUrl.indexOf('/en/')) : pageUrl;
77+
78+
comment.push(
79+
`| [${urlForTable}](${reportUrl}) | ${score(averagedResults.performance)} ${averagedResults.performance} | ${score(averagedResults.accessibility)} ${averagedResults.accessibility} | ${score(averagedResults['best-practices'])} ${averagedResults['best-practices']} | ${score(averagedResults.seo)} ${averagedResults.seo} | ${score(averagedResults.pwa)} ${averagedResults.pwa} |`
80+
);
81+
} else {
82+
console.error('No results found for URL:', pageUrl);
83+
}
84+
});
85+
86+
comment.push(
87+
' ',
88+
'*Lighthouse scores are calculated based on the latest audit results*'
89+
);
90+
91+
comment = comment.join('\n');
92+
core.setOutput("comment", comment);
93+
- name: Find current PR # Find the PR associated with this push, if there is one.
94+
uses: jwalton/[email protected]
95+
id: findPr
96+
with:
97+
state: open
98+
- name: Add Lighthouse stats as comment
99+
id: comment_to_pr
100+
uses: marocchino/[email protected]
101+
with:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
number: ${{ steps.findPr.outputs.number }}
104+
header: lighthouse
105+
message: ${{ steps.format_lighthouse_score.outputs.comment }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
18141814
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/shravan-andoria/"><img src="https://avatars.githubusercontent.com/u/36509067?v=4?s=100" width="100px;" alt="shravanandoria"/><br /><sub><b>shravanandoria</b></sub></a><br /><a href="#maintenance-shravanandoria" title="Maintenance">🚧</a></td>
18151815
</tr>
18161816
<tr>
1817-
<td align="center" valign="top" width="14.28%"><a href="http://rashidma.com"><img src="https://avatars.githubusercontent.com/u/8257719?v=4?s=100" width="100px;" alt="Rashid Ma"/><br /><sub><b>Rashid Ma</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Amcmoodoo" title="Bug reports">🐛</a></td>
1817+
<td align="center" valign="top" width="14.28%"><a href="http://rashidma.com"><img src="https://avatars.githubusercontent.com/u/8257719?v=4?s=100" width="100px;" alt="Rashid Ma"/><br /><sub><b>Rashid Ma</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Amcmoodoo" title="Bug reports">🐛</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=mcmoodoo" title="Documentation">📖</a></td>
18181818
<td align="center" valign="top" width="14.28%"><a href="https://prestwi.ch"><img src="https://avatars.githubusercontent.com/u/10149425?v=4?s=100" width="100px;" alt="James Prestwich"/><br /><sub><b>James Prestwich</b></sub></a><br /><a href="#content-prestwich" title="Content">🖋</a></td>
18191819
<td align="center" valign="top" width="14.28%"><a href="https://github.com/daiwt"><img src="https://avatars.githubusercontent.com/u/26290219?v=4?s=100" width="100px;" alt="Dai Wentao"/><br /><sub><b>Dai Wentao</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Adaiwt" title="Bug reports">🐛</a></td>
18201820
<td align="center" valign="top" width="14.28%"><a href="https://github.com/beetrootkid"><img src="https://avatars.githubusercontent.com/u/34025634?v=4?s=100" width="100px;" alt="kuhant"/><br /><sub><b>kuhant</b></sub></a><br /><a href="#tool-beetrootkid" title="Tools">🔧</a></td>

public/content/developers/docs/apis/json-rpc/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ When encoding unformatted data (byte arrays, account addresses, hashes, bytecode
5353
Here are some examples:
5454

5555
- 0x41 (size 1, "A")
56-
- 0x004200 (size 3, "\0B\0")
56+
- 0x004200 (size 3, "0B0")
5757
- 0x (size 0, "")
5858
- WRONG: 0xf0f0f (must be even number of digits)
5959
- WRONG: 004200 (must be prefixed 0x)

0 commit comments

Comments
 (0)