Skip to content

Commit

Permalink
Merge branch 'dev' into scaffold-eth
Browse files Browse the repository at this point in the history
  • Loading branch information
corwintines committed Jan 24, 2024
2 parents 251fa8c + ab4bb31 commit 965f6ff
Show file tree
Hide file tree
Showing 58 changed files with 948 additions and 475 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -10956,6 +10956,15 @@
"contributions": [
"content"
]
},
{
"login": "duckdegen",
"name": "duckdegen",
"avatar_url": "https://avatars.githubusercontent.com/u/98649644?v=4",
"profile": "https://github.com/duckdegen",
"contributions": [
"content"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ robots.txt

# .crowdin folder used as temp forlder for crowdin-import script
.crowdin

# vscode workplace configuration
.vscode
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="http://benedikt-wagner.dev"><img src="https://avatars.githubusercontent.com/u/113296072?v=4?s=100" width="100px;" alt="Benedikt Wagner"/><br /><sub><b>Benedikt Wagner</b></sub></a><br /><a href="#content-b-wagn" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tdahar"><img src="https://avatars.githubusercontent.com/u/18716811?v=4?s=100" width="100px;" alt="Tarun Mohandas Daryanani"/><br /><sub><b>Tarun Mohandas Daryanani</b></sub></a><br /><a href="#content-tdahar" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Crosstons"><img src="https://avatars.githubusercontent.com/u/110349596?v=4?s=100" width="100px;" alt="Shubh"/><br /><sub><b>Shubh</b></sub></a><br /><a href="#content-Crosstons" title="Content">🖋</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/duckdegen"><img src="https://avatars.githubusercontent.com/u/98649644?v=4?s=100" width="100px;" alt="duckdegen"/><br /><sub><b>duckdegen</b></sub></a><br /><a href="#content-duckdegen" title="Content">🖋</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion public/content/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ We're open source, with a community of contributors, so you can propose changes
### 3. ethereum.org is not a typical product website 🦄 {#core-principles-3}

Ethereum is a big thing: it includes a community, a technology, a set of ideas and ideologies, and more.
This means the website needs to handle many different user journeys, from “a developer who wants a specific tool” and “a newcomer who just bought some ETH and doesn’t know what a wallet is"
This means the website needs to handle many different user journeys, from “a developer who wants a specific tool” and “a newcomer who just bought some ETH and doesn’t know what a wallet is".
"What is the best website for a blockchain platform?" remains an open question - we are pioneers. Building this requires experimentation.

## Product roadmap {#roadmap}
Expand Down
5 changes: 3 additions & 2 deletions public/content/community/get-involved/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Start by reading about the ethereum.org mission and values in our [code of condu
- Watch or participate in the [Core Dev calls](https://www.youtube.com/playlist?list=PLaM7G4Llrb7zfMXCZVEXEABT8OSnd4-7w)
- [Ecosystem Support Program's wishlist](https://esp.ethereum.foundation/wishlist/) - tooling, documentation, and infrastructure areas where the Ethereum Ecosystem Support Program is actively seeking grant applications
- [Web3Bridge](https://www.web3bridge.com/) - join the aspiring web3 community in their initiative to identify, train, and support hundreds of developers and community members throughout Africa
- Join the [Ethereum Cat Herders Discord](https://discord.io/EthCatHerders)
- Join the [Ethereum Cat Herders Discord](https://discord.com/invite/Nz6rtfJ8Cu)

## Researchers & Academics <Emoji text=":mag:" size={1} />‍ {#researchers-and-academics}

Expand All @@ -33,7 +33,7 @@ Do you have a background in mathematics, cryptography, or economics? You might b
- Learn how to become an [EIP Editor](https://eips.ethereum.org/EIPS/eip-5069)
- You can peer-review EIPs right now! See [open PRs with the `e-review` tag](https://github.com/ethereum/EIPs/pulls?q=is%3Apr+is%3Aopen+label%3Ae-review). Provide technical feedback on the `discussion-to` link.
- Participate in [EIP Governance](https://github.com/ethereum-cat-herders/EIPIP)
- Join the [Ethereum Cat Herders Discord](https://discord.io/EthCatHerders)
- Join the [Ethereum Cat Herders Discord](https://discord.com/invite/Nz6rtfJ8Cu)
- [More on EIPs](/eips/)
- [Challenges.ethereum.org](https://challenges.ethereum.org/) - a series of high-value research bounties, where you can earn >$100,000 USD
- [Ethresear.ch](https://ethresear.ch) - Ethereum’s primary forum for research, and the world’s most influential forum for cryptoeconomics
Expand Down Expand Up @@ -103,6 +103,7 @@ The Ethereum ecosystem is on a mission to fund public goods and impactful projec
- [ethereum.org jobs](/about/#open-jobs)
- [Ethereum Foundation job board (Lever)](https://jobs.lever.co/ethereumfoundation)
- [Ethereum Foundation job board (BambooHR)](https://ethereum.bamboohr.com/jobs/)
- [JobStash](https://jobstash.xyz)
- [Cryptocurrency Jobs](https://cryptocurrencyjobs.co/ethereum/)
- [Crypto.jobs](https://crypto.jobs/)
- [Careers at ConsenSys](https://consensys.net/careers/)
Expand Down
2 changes: 1 addition & 1 deletion public/content/developers/docs/apis/json-rpc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Returns Keccak-256 (_not_ the standardized SHA3-256) of the given data.

**Parameters**

1. `DATA` - the data to convert into a SHA3 hash
1. `DATA` - The data to convert into a SHA3 hash

```js
params: ["0x68656c6c6f20776f726c64"]
Expand Down
2 changes: 1 addition & 1 deletion public/content/glossary/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ lang: en

<GlossaryDefinition term="immutable-deployed-code-problem" />

<GlossaryDefinition term="internal-transactions" />
<GlossaryDefinition term="internal-transaction" />

<GlossaryDefinition term="issuance" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lang: de
template: upgrade
image: /upgrades/core.png
alt:
summaryPoint1: Mit der Bacon Chain wurde Proof-of-Stake in das Ethereum Ökosystem eingeführt.
summaryPoint1: Mit der Beacon Chain wurde Proof-of-Stake in das Ethereum Ökosystem eingeführt.
summaryPoint2: Sie wurde 2022 mit der ursprünglichen Ethereum Proof-of-Work Blockchain vereinigt.
summaryPoint3: Die Beacon Chain führte die Konsenslogik und das Block-Gossip-Protokoll ein, das nun Ethereum sichert.
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ lang: ja

一部のサーチャーは、利益を伴う MEV 機会を検出するために複雑なアルゴリズムを開発する代わりに、汎用的なフロントランナーを実行します。 汎用フロントランナーとは、利益を伴うトランザクションを検出するためにメモリプールを監視するボットです。 汎用フロントランナーは、潜在的に利益を伴うトランザクションのコードをコピーし、フロントランナーのアドレスで置き換えた上でトランザクションをローカルで実行することで、修正後のトランザクションがフロントランナーのアドレスに収益をもたらすことをダブルチェックします。 このトランザクションが実際に利益をもたらすことが確認できれば、フロントランナーはアドレスを置き換えた修正後のトランザクションをより高いガス代と共に送信し、本来のトランザクションよりも「優位に立つ」ことで、本来のサーチャーが得ようとした MEV を獲得することができるのです。

### ブラッシュボット {#mev-extraction-flashbots}
### フラッシュボット {#mev-extraction-flashbots}

フラッシュボットは、実行クライアントを拡張する独立したプロジェクトであり、サーチャーに対して、パブリックのメモリプールに公開することなく、MEV トランザクションをバリデータに送信できるサービスを提供します。 このサービスを使用すれば、汎用フロントランナーを用いたトランザクションに実行を先回りされることを防ぐことができます。

Expand Down
7 changes: 6 additions & 1 deletion src/components/Breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ import {
type BreadcrumbProps as ChakraBreadcrumbProps,
} from "@chakra-ui/react"

import type { Lang } from "@/lib/types"

import { BaseLink } from "@/components/Link"

import { isLangRightToLeft } from "@/lib/utils/translations"

export type BreadcrumbsProps = ChakraBreadcrumbProps & {
slug: string
startDepth?: number
Expand Down Expand Up @@ -39,6 +43,7 @@ const Breadcrumbs = ({
}: BreadcrumbsProps) => {
const { t } = useTranslation("common")
const { locale, asPath } = useRouter()
const dir = isLangRightToLeft(locale! as Lang) ? "rtl" : "ltr"

const hasHome = asPath !== "/"
const slug = originalSlug.replace(`/${locale}/`, "/")
Expand All @@ -65,7 +70,7 @@ const Breadcrumbs = ({
.slice(startDepth)

return (
<Breadcrumb {...props}>
<Breadcrumb {...props} dir={dir}>
{crumbs.map(({ fullPath, text }) => {
const isCurrentPage = slug === fullPath
return (
Expand Down
5 changes: 1 addition & 4 deletions src/components/CalloutBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export type CalloutBannerProps = FlexProps & {
children?: React.ReactNode
image: ImageProps["src"]
imageWidth?: number
maxImageWidth?: ImageProps["width"]
titleKey: TranslationKey
descriptionKey: TranslationKey
alt: string
Expand All @@ -20,7 +19,6 @@ export type CalloutBannerProps = FlexProps & {
const CalloutBanner = ({
image,
imageWidth,
maxImageWidth,
titleKey,
descriptionKey,
alt,
Expand All @@ -44,11 +42,10 @@ const CalloutBanner = ({
src={image}
alt={alt}
width={imageWidth}
maxW={{ base: "auto", md: maxImageWidth }}
style={{
objectFit: "contain",
}}
alignSelf="center"
mx="auto"
mt={-24}
mb={{ base: 0, lg: -24 }}
/>
Expand Down
7 changes: 1 addition & 6 deletions src/components/CodeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@ const CodeModal = ({ children, isOpen, setIsOpen, title }: CodeModalProps) => (
<ModalOverlay />
<ModalContent>
<ModalHeader>{title}</ModalHeader>
<ModalCloseButton
style={{
right: "unset",
insetInlineEnd: "var(--eth-sizes-4)",
}}
/>
<ModalCloseButton />
<ModalBody>{children}</ModalBody>
</ModalContent>
</Modal>
Expand Down
61 changes: 40 additions & 21 deletions src/components/DocsNav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: Implement with RTL locale responsiveness
import React from "react"
import { useRouter } from "next/router"
import { useTranslation } from "next-i18next"
import {
Box,
Flex,
Expand All @@ -15,12 +15,13 @@ import type { DeveloperDocsLink } from "@/lib/interfaces"
import Emoji from "@/components/Emoji"
import { BaseLink } from "@/components/Link"
import Text from "@/components/OldText"
import Translation from "@/components/Translation"

import { trackCustomEvent } from "@/lib/utils/matomo"

import docLinks from "@/data/developer-docs-links.yaml"

import { useRtlFlip } from "@/hooks/useRtlFlip"

const TextDiv: React.FC<FlexProps> = ({ children, ...props }) => (
<Flex
direction="column"
Expand All @@ -36,22 +37,23 @@ const TextDiv: React.FC<FlexProps> = ({ children, ...props }) => (
</Flex>
)

export interface DocsArrayProps {
type DocsArrayProps = {
to: string
id: TranslationKey
}

const CardLink = (props: {
type CardLinkProps = {
docData: DocsArrayProps
contentNotTranslated: boolean
isPrev?: boolean
isNext?: boolean
}) => {
const { docData, isPrev, isNext } = props
}

const CardLink = ({ docData, isPrev, contentNotTranslated }: CardLinkProps) => {
const { t } = useTranslation("page-developers-docs")
const { flipForRtl } = useRtlFlip()

const xPadding = isPrev ? { ps: "0" } : { pe: 0 }

const xPadding = {
...(isPrev && { ps: "0" }),
...(isNext && { pe: "0" }),
}
return (
<LinkBox
as={Flex}
Expand All @@ -69,11 +71,12 @@ const CardLink = (props: {
<Emoji
text={isPrev ? ":point_left:" : ":point_right:"}
fontSize="5xl"
transform={contentNotTranslated ? undefined : flipForRtl}
/>
</Box>
<TextDiv {...xPadding} {...(isNext && { textAlign: "end" })}>
<TextDiv {...xPadding} {...(!isPrev && { textAlign: "end" })}>
<Text textTransform="uppercase" m="0">
<Translation id={isPrev ? "previous" : "next"} />
{t(isPrev ? "previous" : "next")}
</Text>
<LinkOverlay
as={BaseLink}
Expand All @@ -88,18 +91,19 @@ const CardLink = (props: {
})
}}
>
<Translation id={`page-developers-docs:${docData.id}`} />
{t(docData.id)}
</LinkOverlay>
</TextDiv>
</LinkBox>
)
}

export interface IProps {
relativePath: string
type DocsNavProps = {
contentNotTranslated: boolean
}

const DocsNav: React.FC<IProps> = ({ relativePath }) => {
const DocsNav = ({ contentNotTranslated }: DocsNavProps) => {
const { asPath } = useRouter()
// Construct array of all linkable documents in order recursively
const docsArray: DocsArrayProps[] = []
const getDocs = (links: Array<DeveloperDocsLink>): void => {
Expand All @@ -124,7 +128,7 @@ const DocsNav: React.FC<IProps> = ({ relativePath }) => {
// Find index that matches current page
let currentIndex = 0
for (let i = 0; i < docsArray.length; i++) {
if (relativePath.indexOf(docsArray[i].to) > -1) {
if (asPath.indexOf(docsArray[i].to) > -1) {
currentIndex = i
}
}
Expand All @@ -142,8 +146,23 @@ const DocsNav: React.FC<IProps> = ({ relativePath }) => {
justify="space-between"
alignItems={{ base: "center", md: "flex-start" }}
>
{previousDoc ? <CardLink docData={previousDoc} isPrev /> : <Spacer />}
{nextDoc ? <CardLink docData={nextDoc} isNext /> : <Spacer />}
{previousDoc ? (
<CardLink
docData={previousDoc}
contentNotTranslated={contentNotTranslated}
isPrev
/>
) : (
<Spacer />
)}
{nextDoc ? (
<CardLink
docData={nextDoc}
contentNotTranslated={contentNotTranslated}
/>
) : (
<Spacer />
)}
</Flex>
)
}
Expand Down
7 changes: 6 additions & 1 deletion src/components/FeedbackCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import { useRouter } from "next/router"
import { useTranslation } from "next-i18next"
import { Flex, type FlexProps, Heading } from "@chakra-ui/react"

import type { Lang } from "@/lib/types"

import { Button } from "@/components/Buttons"
import { FeedbackThumbsUpIcon } from "@/components/icons"

import { trackCustomEvent } from "@/lib/utils/matomo"
import { isLangRightToLeft } from "@/lib/utils/translations"

import Translation from "./Translation"

Expand All @@ -21,7 +24,8 @@ const FeedbackCard = ({ prompt, isArticle, ...props }: FeedbackCardProps) => {
const { t } = useTranslation("common")
const [feedbackSubmitted, setFeedbackSubmitted] = useState(false)
const surveyUrl = useSurvey(feedbackSubmitted)
const { asPath } = useRouter()
const { locale, asPath } = useRouter()
const dir = isLangRightToLeft(locale! as Lang) ? "rtl" : "ltr"

const isTutorial = asPath?.includes("tutorials")

Expand Down Expand Up @@ -67,6 +71,7 @@ const FeedbackCard = ({ prompt, isArticle, ...props }: FeedbackCardProps) => {
mt="8"
w="full"
{...props}
dir={dir}
>
<Flex direction="column" gap="4">
<Heading as="h3" m="0" mb="2" fontSize="1.375rem" fontWeight="bold">
Expand Down
12 changes: 8 additions & 4 deletions src/components/Hero/HubHero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ import type { CommonHeroProps } from "@/lib/types"
import { CallToAction } from "@/components/Hero/CallToAction"
import { Image } from "@/components/Image"

const HubHero = (props: CommonHeroProps) => {
const { heroImg, title, header, description, buttons } = props

const HubHero = ({
heroImg,
title,
header,
description,
buttons,
}: CommonHeroProps) => {
if (buttons && buttons.length > 2) {
throw Error(
"Can not have more than two call-to-action buttons in this hero component."
Expand Down Expand Up @@ -37,7 +41,7 @@ const HubHero = (props: CommonHeroProps) => {
borderRadius={{ xl: "base" }}
bg={{ xl: "hubHeroContentBg" }}
position={{ xl: "absolute" }}
insetStart={{ xl: "8" }}
insetInlineStart={{ xl: "8" }}
maxW={{ xl: "sm" }}
top={{ xl: "50%" }}
transform={{ xl: "translateY(-50%)" }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Quiz/QuizWidget/QuizRadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const QuizRadioGroup = () => {
<Box as="fieldset" w="full" {...getRootProps()}>
<Text
as="legend"
textAlign={{ base: "center", md: "left" }}
textAlign={{ base: "center", md: "start" }}
fontWeight="700"
size="2xl"
w="full"
Expand Down
Loading

0 comments on commit 965f6ff

Please sign in to comment.