Skip to content

feat: add ethereum rpc table component and example - #115

Merged
dghelm merged 2 commits into
developfrom
feat/add-rpc-table-component
Feb 13, 2024
Merged

feat: add ethereum rpc table component and example#115
dghelm merged 2 commits into
developfrom
feat/add-rpc-table-component

Conversation

@yqrashawn

@yqrashawnyqrashawn commented Nov 1, 2023

Copy link
Copy Markdown
Contributor

Description

  • add rpc table component through ethereum-rpc-table package
  • add example usage in docs/en/user-guide/setup.mdx, this is just an example, the table is not supposed to be there, do not merge
  • package code at https://github.com/scroll-tech/ethereum-rpc-table

@netlify

netlifyBot commented Nov 1, 2023

Copy link
Copy Markdown

Deploy Preview for scroll-documentation ready!

NameLink
🔨 Latest commit7e0a09b
🔍 Latest deploy loghttps://app.netlify.com/sites/scroll-documentation/deploys/65cabd446883be0008669f68
😎 Deploy Previewhttps://deploy-preview-115.docs.scroll.xyz
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@yqrashawnyqrashawn self-assigned this Nov 1, 2023
Comment on lines +10 to +72
chainData = chainData || {
name: "Scroll",
chain: "ETH",
status: "active",
rpc: [
{
url: "https://rpc.scroll.io",
},
{
url: "https://rpc-scroll.icecreamswap.com",
},
{
url: "https://scroll.blockpi.network/v1/rpc/public",
tracking: "limited",
trackingDetails:
"We do not collect request data or request origin. We only temporarily record the request method names and IP addresses for 7 days to ensure our service functionality such as load balancing and DDoS protection. All the data is automatically deleted after 7 days and we do not store any user information for longer periods of time. https://blockpi.io/privacy-policy",
},
{
url: "https://1rpc.io/scroll",
tracking: "none",
trackingDetails:
"With the exception of data that will be public on chain, all the other metadata / data should remain private to users and other parties should not be able to access or collect it. 1RPC uses many different techniques to prevent the unnecessary collection of user privacy, which prevents tracking from RPC providers. https://docs.1rpc.io/technology/zero-tracking",
},
{
url: "https://rpc.ankr.com/scroll",
},
{
url: "https://scroll-mainnet.chainstacklabs.com",
},
],
faucets: [],
nativeCurrency: {
name: "Ether",
symbol: "ETH",
decimals: 18,
},
infoURL: "https://scroll.io",
shortName: "scr",
chainId: 534352,
networkId: 534352,
explorers: [
{
name: "Scrollscan",
url: "https://scrollscan.com",
standard: "EIP3091",
},
{
name: "Blockscout",
url: "https://blockscout.scroll.io",
standard: "EIP3091",
},
],
parent: {
type: "L2",
chain: "eip155-1",
bridges: [
{
url: "https://scroll.io/bridge",
},
],
},
}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good for now!

Comment threadsrc/components/RPCTable/RPCTable.astro
@yqrashawn
yqrashawnforce-pushed the feat/add-rpc-table-component branch from bc17b2a to 22e81c2CompareNovember 1, 2023 08:52
Comment threadsrc/content/docs/en/user-guide/setup.mdx Outdated
@yqrashawn
yqrashawn marked this pull request as ready for review November 1, 2023 09:02
@dghelm

Copy link
Copy Markdown
Contributor

Question for @zzq0826 and @Turupawn -- Do we want i18n strings to live close to components, or would we prefer everything for a single language to sit in its translation.json file?

@zzq0826

Copy link
Copy Markdown
Member

Question for @zzq0826 and @Turupawn -- Do we want i18n strings to live close to components, or would we prefer everything for a single language to sit in its translation.json file?

If possible, I prefer to configure it in the translation.json file.

@yqrashawn
yqrashawnforce-pushed the feat/add-rpc-table-component branch from 22e81c2 to 6d0db31CompareNovember 6, 2023 02:18
@yqrashawn

Copy link
Copy Markdown
ContributorAuthor

It's still possible to have i18n strings in [lang]/translation.json with this component.
I've updated the code to relfect that. I also added en and zh translation to json file.

@dghelm@zzq0826

@yqrashawn

Copy link
Copy Markdown
ContributorAuthor

To add custom style, you can remove
import "ethereum-rpc-table/lib/default.css" and import "./RPCTable.css" at

import"ethereum-rpc-table/lib/default.css"
importi18next, { t } from"i18next"
import"./RPCTable.css"

The package adds zero style if these two imports are removed

@yqrashawn
yqrashawnforce-pushed the feat/add-rpc-table-component branch 3 times, most recently from a696da4 to d4f24e0CompareNovember 22, 2023 02:21
@yqrashawn
yqrashawnforce-pushed the feat/add-rpc-table-component branch 3 times, most recently from cf95f67 to c7c308cCompareDecember 11, 2023 03:17
- add rpc table component through `ethereum-rpc-table` package
- add example usage in `docs/en/user-guide/setup.mdx`
- package code at https://github.com/scroll-tech/ethereum-rpc-table
Signed-off-by: yqrashawn <namy.19@gmail.com>
@yqrashawn
yqrashawnforce-pushed the feat/add-rpc-table-component branch from c7c308c to 64ab016CompareFebruary 6, 2024 01:35

@dghelmdghelm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- adjusted css and moved to components preview page.

Might assess followup for mobile, but we'll likely just want to hide it and make a component that alternates display after different breakpoints.

@dghelm
dghelm merged commit 55d4de6 into developFeb 13, 2024
@yqrashawn
yqrashawn deleted the feat/add-rpc-table-component branch February 18, 2024 01:46
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@yqrashawn@dghelm@zzq0826