Skip to content

Commit 08ee8f3

Browse files
authored
Merge pull request #7061 from ethereum/dev
Deploy v4.7.0
2 parents 4c1c18a + 5225803 commit 08ee8f3

File tree

441 files changed

+6517
-1142
lines changed

Some content is hidden

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

441 files changed

+6517
-1142
lines changed

.all-contributorsrc

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,8 @@
937937
"profile": "https://github.com/EmanHerawy",
938938
"contributions": [
939939
"translation",
940-
"code"
940+
"code",
941+
"ideas"
941942
]
942943
},
943944
{
@@ -4639,7 +4640,8 @@
46394640
"avatar_url": "https://avatars.githubusercontent.com/u/55439064?v=4",
46404641
"profile": "https://github.com/raj-shekhar1",
46414642
"contributions": [
4642-
"doc"
4643+
"doc",
4644+
"ideas"
46434645
]
46444646
},
46454647
{
@@ -8058,6 +8060,79 @@
80588060
"contributions": [
80598061
"doc"
80608062
]
8063+
},
8064+
{
8065+
"login": "gingerheart86",
8066+
"name": "gingerheart86",
8067+
"avatar_url": "https://avatars.githubusercontent.com/u/100948227?v=4",
8068+
"profile": "https://github.com/gingerheart86",
8069+
"contributions": [
8070+
"doc"
8071+
]
8072+
},
8073+
{
8074+
"login": "naveen106",
8075+
"name": "Naveen Kumar",
8076+
"avatar_url": "https://avatars.githubusercontent.com/u/61573478?v=4",
8077+
"profile": "https://github.com/naveen106",
8078+
"contributions": [
8079+
"doc"
8080+
]
8081+
},
8082+
{
8083+
"login": "treethought",
8084+
"name": "Cam Sweeney",
8085+
"avatar_url": "https://avatars.githubusercontent.com/u/15894818?v=4",
8086+
"profile": "https://github.com/treethought",
8087+
"contributions": [
8088+
"doc"
8089+
]
8090+
},
8091+
{
8092+
"login": "moyedx3",
8093+
"name": "moyed",
8094+
"avatar_url": "https://avatars.githubusercontent.com/u/108647630?v=4",
8095+
"profile": "https://github.com/moyedx3",
8096+
"contributions": [
8097+
"doc"
8098+
]
8099+
},
8100+
{
8101+
"login": "shelleyolivia",
8102+
"name": "shelleyolivia",
8103+
"avatar_url": "https://avatars.githubusercontent.com/u/108895606?v=4",
8104+
"profile": "https://github.com/shelleyolivia",
8105+
"contributions": [
8106+
"doc",
8107+
"ideas"
8108+
]
8109+
},
8110+
{
8111+
"login": "zyjblockchain",
8112+
"name": "Sandy",
8113+
"avatar_url": "https://avatars.githubusercontent.com/u/40423181?v=4",
8114+
"profile": "http://[email protected]",
8115+
"contributions": [
8116+
"doc"
8117+
]
8118+
},
8119+
{
8120+
"login": "NachoRoizman",
8121+
"name": "NachoRoizman",
8122+
"avatar_url": "https://avatars.githubusercontent.com/u/107893772?v=4",
8123+
"profile": "https://github.com/NachoRoizman",
8124+
"contributions": [
8125+
"doc"
8126+
]
8127+
},
8128+
{
8129+
"login": "M-Ivan",
8130+
"name": "Iván Miragaya",
8131+
"avatar_url": "https://avatars.githubusercontent.com/u/72365253?v=4",
8132+
"profile": "https://linkedin.com/in/miragaya-ivan",
8133+
"contributions": [
8134+
"code"
8135+
]
80618136
}
80628137
],
80638138
"contributorsPerLine": 7,

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,7 @@ src/data/contributors.json
7777
# These files are generated by `yarn merge-translations` command
7878
src/intl/*.json
7979
# Auto generated code when gatsby build the site
80-
src/gatsby-types.d.ts
80+
src/gatsby-types.d.ts
81+
82+
# Exported Crowdin files
83+
.crowdin

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Discord](https://img.shields.io/discord/714888181740339261?color=1C1CE1&label=ethereum.org%20%7C%20Discord%20%F0%9F%91%8B%20&style=flat-square)](https://discord.gg/CetY6Y4)
44
[![Twitter Follow](https://img.shields.io/twitter/follow/ethdotorg.svg?style=social)](https://twitter.com/ethdotorg)
55
[![Crowdin](https://badges.crowdin.net/ethereum-org/localized.svg)](https://crowdin.com/project/ethereum-org)
6+
[![gitpoap badge](https://public-api.gitpoap.io/v1/repo/ethereum/ethereum-org-website/badge)](https://www.gitpoap.io/gh/ethereum/ethereum-org-website)
67

78
<div align="center" style="margin-top: 1em; margin-bottom: 3em;">
89
<a href="https://ethereum.org"><img alt="ethereum logo" src="./eth-transparent.png" alt="ethereum.org" width="125"></a>
@@ -310,7 +311,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
310311
</tr>
311312
<tr>
312313
<td align="center"><a href="https://github.com/DjangoM"><img src="https://avatars2.githubusercontent.com/u/35060411?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jaroslav Macej</b></sub></a><br /><a href="#translation-DjangoM" title="Translation">🌍</a></td>
313-
<td align="center"><a href="https://github.com/EmanHerawy"><img src="https://avatars3.githubusercontent.com/u/10674070?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eman Herawy</b></sub></a><br /><a href="#translation-EmanHerawy" title="Translation">🌍</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=EmanHerawy" title="Code">💻</a></td>
314+
<td align="center"><a href="https://github.com/EmanHerawy"><img src="https://avatars3.githubusercontent.com/u/10674070?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eman Herawy</b></sub></a><br /><a href="#translation-EmanHerawy" title="Translation">🌍</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=EmanHerawy" title="Code">💻</a> <a href="#ideas-EmanHerawy" title="Ideas, Planning, & Feedback">🤔</a></td>
314315
<td align="center"><a href="https://github.com/Bellinas"><img src="https://avatars0.githubusercontent.com/u/45827044?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bellinas</b></sub></a><br /><a href="#translation-Bellinas" title="Translation">🌍</a></td>
315316
<td align="center"><a href="https://github.com/amchercashin"><img src="https://avatars3.githubusercontent.com/u/8727497?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alexander Cherkashin</b></sub></a><br /><a href="#translation-amchercashin" title="Translation">🌍</a></td>
316317
<td align="center"><a href="http://www.soarontech.com.ng"><img src="https://avatars0.githubusercontent.com/u/29120867?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Enoch Mbaebie</b></sub></a><br /><a href="#translation-EnochMbaebie" title="Translation">🌍</a></td>
@@ -822,7 +823,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
822823
<td align="center"><a href="http://notmanyideasdev.github.io"><img src="https://avatars.githubusercontent.com/u/45824238?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Gianni Alessandroni</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=NotManyIdeasDev" title="Documentation">📖</a></td>
823824
</tr>
824825
<tr>
825-
<td align="center"><a href="https://github.com/raj-shekhar1"><img src="https://avatars.githubusercontent.com/u/55439064?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Raj Shekhar Bhardwaj</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=raj-shekhar1" title="Documentation">📖</a></td>
826+
<td align="center"><a href="https://github.com/raj-shekhar1"><img src="https://avatars.githubusercontent.com/u/55439064?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Raj Shekhar Bhardwaj</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=raj-shekhar1" title="Documentation">📖</a> <a href="#ideas-raj-shekhar1" title="Ideas, Planning, & Feedback">🤔</a></td>
826827
<td align="center"><a href="https://github.com/joakimengerstam"><img src="https://avatars.githubusercontent.com/u/12713452?v=4?s=100" width="100px;" alt=""/><br /><sub><b>joakimengerstam</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=joakimengerstam" title="Documentation">📖</a></td>
827828
<td align="center"><a href="https://github.com/ndrozd"><img src="https://avatars.githubusercontent.com/u/6696080?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikita Drozd</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Androzd" title="Bug reports">🐛</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=ndrozd" title="Documentation">📖</a></td>
828829
<td align="center"><a href="http://scottcameron.uk"><img src="https://avatars.githubusercontent.com/u/83584447?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Scott</b></sub></a><br /><a href="#design-Scott1UP" title="Design">🎨</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AScott1UP" title="Bug reports">🐛</a></td>
@@ -1293,6 +1294,16 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
12931294
<td align="center"><a href="http://www.koogawa.com"><img src="https://avatars.githubusercontent.com/u/893643?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kosuke Ogawa</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=koogawa" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Akoogawa" title="Bug reports">🐛</a></td>
12941295
<td align="center"><a href="https://github.com/Feerol"><img src="https://avatars.githubusercontent.com/u/47645405?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fatih Eren Erol</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Feerol" title="Documentation">📖</a></td>
12951296
<td align="center"><a href="https://syskall.com"><img src="https://avatars.githubusercontent.com/u/416585?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Oli Lalonde</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=olalonde" title="Documentation">📖</a></td>
1297+
<td align="center"><a href="https://github.com/gingerheart86"><img src="https://avatars.githubusercontent.com/u/100948227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gingerheart86</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=gingerheart86" title="Documentation">📖</a></td>
1298+
<td align="center"><a href="https://github.com/naveen106"><img src="https://avatars.githubusercontent.com/u/61573478?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Naveen Kumar</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=naveen106" title="Documentation">📖</a></td>
1299+
<td align="center"><a href="https://github.com/treethought"><img src="https://avatars.githubusercontent.com/u/15894818?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cam Sweeney</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=treethought" title="Documentation">📖</a></td>
1300+
<td align="center"><a href="https://github.com/moyedx3"><img src="https://avatars.githubusercontent.com/u/108647630?v=4?s=100" width="100px;" alt=""/><br /><sub><b>moyed</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=moyedx3" title="Documentation">📖</a></td>
1301+
</tr>
1302+
<tr>
1303+
<td align="center"><a href="https://github.com/shelleyolivia"><img src="https://avatars.githubusercontent.com/u/108895606?v=4?s=100" width="100px;" alt=""/><br /><sub><b>shelleyolivia</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=shelleyolivia" title="Documentation">📖</a> <a href="#ideas-shelleyolivia" title="Ideas, Planning, & Feedback">🤔</a></td>
1304+
<td align="center"><a href="http://[email protected]"><img src="https://avatars.githubusercontent.com/u/40423181?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sandy</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=zyjblockchain" title="Documentation">📖</a></td>
1305+
<td align="center"><a href="https://github.com/NachoRoizman"><img src="https://avatars.githubusercontent.com/u/107893772?v=4?s=100" width="100px;" alt=""/><br /><sub><b>NachoRoizman</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=NachoRoizman" title="Documentation">📖</a></td>
1306+
<td align="center"><a href="https://linkedin.com/in/miragaya-ivan"><img src="https://avatars.githubusercontent.com/u/72365253?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Iván Miragaya</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=M-Ivan" title="Code">💻</a></td>
12961307
</tr>
12971308
</table>
12981309

overrides.d.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@
33
declare module "gatsby-plugin-image"
44

55
declare module "*developer-docs-links.yaml" {
6-
import { TranslationKey } from "./src/utils/translations"
7-
8-
export interface DeveloperDocsLink {
9-
id: TranslationKey
10-
to: string
11-
path: string
12-
description: TranslationKey
13-
items: Array<DeveloperDocsLink>
14-
}
6+
import { DeveloperDocsLink } from "./src/types"
157
const content: Array<DeveloperDocsLink>
168
export default content
179
}

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "4.6.0",
3+
"version": "4.7.0",
44
"description": "Website of ethereum.org",
55
"main": "index.js",
66
"repository": "[email protected]:ethereum/ethereum-org-website.git",
@@ -81,6 +81,7 @@
8181
"github-slugger": "^1.3.0",
8282
"husky": "^4.2.5",
8383
"identity-obj-proxy": "^3.0.0",
84+
"minimist": "^1.2.6",
8485
"prettier": "^2.2.1",
8586
"pretty-quick": "^3.1.0",
8687
"react-test-renderer": "^17.0.1",
@@ -91,10 +92,10 @@
9192
"build:lambda": "netlify-lambda build src/lambda",
9293
"build:10gb": "NODE_OPTIONS=--max-old-space-size=10240 gatsby build",
9394
"clean": "gatsby clean",
94-
"copy-contributors": "node src/scripts/copy-contributors.js",
95+
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
96+
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",
9597
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
9698
"generate-heading-ids": "node src/scripts/generate-heading-ids.js",
97-
"merge-translations": "node src/scripts/merge-translations.js",
9899
"start": "gatsby develop",
99100
"start:lambda": "netlify-lambda serve src/lambda",
100101
"start:static": "gatsby build && gatsby serve",

src/components/BugBountyCards.js renamed to src/components/BugBountyCards.tsx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import React from "react"
22
import styled from "styled-components"
3+
import { TranslationKey } from "../utils/translations"
34
import ButtonLink from "./ButtonLink"
45

5-
import Translation from "../components/Translation"
6+
import Translation from "./Translation"
67

78
const CardRow = styled.div`
89
display: flex;
@@ -108,7 +109,22 @@ const Text = styled.div`
108109
margin-top: 0.5rem;
109110
`
110111

111-
const bugBountyCardsInfo = [
112+
export interface BugBountyCardInfo {
113+
lowLabelTranslationId?: TranslationKey
114+
mediumLabelTranslationId?: TranslationKey
115+
highLabelTranslationId?: TranslationKey
116+
criticalLabelTranslationId?: TranslationKey
117+
h2TranslationId: TranslationKey
118+
descriptionTranslationId: TranslationKey
119+
subDescriptionTranslationId: TranslationKey
120+
subHeader1TranslationId: TranslationKey
121+
severityList: Array<TranslationKey>
122+
subHeader2TranslationId: TranslationKey
123+
textTranslationId: TranslationKey
124+
styledButtonTranslationId: TranslationKey
125+
}
126+
127+
const bugBountyCardsInfo: Array<BugBountyCardInfo> = [
112128
{
113129
lowLabelTranslationId: "page-upgrades-bug-bounty-card-label-2",
114130
h2TranslationId: "page-upgrades-bug-bounty-card-low",
@@ -165,7 +181,9 @@ const bugBountyCardsInfo = [
165181
},
166182
]
167183

168-
const BugBountyCards = () => (
184+
export interface IProps {}
185+
186+
const BugBountyCards: React.FC<IProps> = () => (
169187
<CardRow>
170188
{bugBountyCardsInfo.map((card, idx) => (
171189
<Card key={`bug-bounty-card-${idx}`}>

src/components/BugBountyPoints.js renamed to src/components/BugBountyPoints.tsx

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,31 @@ export const TokenLogo = graphql`
8484

8585
const USD_PER_POINT = 2
8686

87-
const BugBountyPoints = () => {
88-
const [state, setState] = useState({
89-
currentETHPriceUSD: "",
90-
currentDAIPriceUSD: "",
87+
interface State {
88+
currentETHPriceUSD: number
89+
currentDAIPriceUSD: number
90+
hasError: boolean
91+
}
92+
93+
type GetPriceResponse = {
94+
ethereum: { usd: number }
95+
dai: { usd: number }
96+
}
97+
98+
export interface IProps {}
99+
100+
const BugBountyPoints: React.FC<IProps> = () => {
101+
const [state, setState] = useState<State>({
102+
currentETHPriceUSD: 1,
103+
currentDAIPriceUSD: 1,
91104
hasError: false,
92105
})
93106
const themeContext = useContext(ThemeContext)
94107
const isDarkTheme = themeContext.isDark
95108

96109
useEffect(() => {
97110
axios
98-
.get(
111+
.get<GetPriceResponse>(
99112
"https://api.coingecko.com/api/v3/simple/price?ids=ethereum%2Cdai&vs_currencies=usd"
100113
)
101114
.then((response) => {
@@ -112,15 +125,20 @@ const BugBountyPoints = () => {
112125
.catch((error) => {
113126
console.error(error)
114127
setState({
128+
...state,
115129
hasError: true,
116130
})
117131
})
118132
}, [])
119133

120134
const isLoading = !state.currentETHPriceUSD
121135

122-
const pointsInETH = (USD_PER_POINT / state.currentETHPriceUSD).toFixed(5)
123-
const pointsInDAI = (USD_PER_POINT / state.currentDAIPriceUSD).toFixed(5)
136+
const pointsInETH = !state.hasError
137+
? (USD_PER_POINT / state.currentETHPriceUSD!).toFixed(5)
138+
: 0
139+
const pointsInDAI = !state.hasError
140+
? (USD_PER_POINT / state.currentDAIPriceUSD!).toFixed(5)
141+
: 0
124142

125143
const tooltipContent = (
126144
<div>

src/components/ButtonDropdown.js renamed to src/components/ButtonDropdown.tsx

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ButtonSecondary } from "./SharedStyledComponents"
1212

1313
// Utils
1414
import { useOnClickOutside } from "../hooks/useOnClickOutside"
15-
import { translateMessageId } from "../utils/translations"
15+
import { translateMessageId, TranslationKey } from "../utils/translations"
1616
import { trackCustomEvent } from "../utils/matomo"
1717

1818
const Container = styled.div`
@@ -113,16 +113,38 @@ const NakedNavLink = styled.div`
113113
}
114114
`
115115

116-
const ButtonDropdown = ({ list, className }) => {
117-
const [isOpen, setIsOpen] = useState(false)
116+
export interface ListItem {
117+
text: TranslationKey
118+
to?: string
119+
matomo?: {
120+
eventCategory: string
121+
eventAction: string
122+
eventName: string
123+
}
124+
callback?: (idx: number) => void
125+
}
126+
127+
export interface List {
128+
text: TranslationKey
129+
ariaLabel: string
130+
items: Array<ListItem>
131+
}
132+
133+
export interface IProps {
134+
list: List
135+
className?: string
136+
}
137+
138+
const ButtonDropdown: React.FC<IProps> = ({ list, className }) => {
139+
const [isOpen, setIsOpen] = useState<boolean>(false)
118140
const intl = useIntl()
119-
const ref = createRef()
141+
const ref = createRef<HTMLInputElement>()
120142

121143
useOnClickOutside(ref, () => setIsOpen(false))
122144

123145
// Toggle on `enter` key
124-
const onKeyDownHandler = (e) => {
125-
if (e.keyCode === 13) {
146+
const onKeyDownHandler = (e: React.KeyboardEvent<HTMLElement>): void => {
147+
if (e.key === "13") {
126148
setIsOpen(!isOpen)
127149
}
128150
}
@@ -136,7 +158,7 @@ const ButtonDropdown = ({ list, className }) => {
136158
<Button
137159
onClick={() => setIsOpen(!isOpen)}
138160
onKeyDown={onKeyDownHandler}
139-
tabIndex="0"
161+
tabIndex={0}
140162
>
141163
<StyledIcon name="menu" />
142164
<Translation id={list.text} />
@@ -155,13 +177,12 @@ const ButtonDropdown = ({ list, className }) => {
155177
trackCustomEvent(matomo)
156178
}}
157179
to={to}
158-
tabIndex="-1"
159180
>
160181
<Translation id={text} />
161182
</NavLink>
162183
)}
163184
{!!to && !matomo && (
164-
<NavLink isPartiallyActive={false} to={to} tabIndex="-1">
185+
<NavLink isPartiallyActive={false} to={to}>
165186
<Translation id={text} />
166187
</NavLink>
167188
)}

0 commit comments

Comments
 (0)