Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACT-1296: Infura Faucet Integration in MetaMask Docs #1396

Open
wants to merge 104 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
b15b3bd
ACT-1390: Faucet page routing
Jul 9, 2024
cd7d7a5
ACT-1387, ACT-1387: Tabs, Button
Voltmod Jul 10, 2024
e7f9be1
Merge branch 'refs/heads/main' into faucets-for-mm-docs
Jul 12, 2024
22ec37b
ACT-1393 Component: Typography (#1410)
Voltmod Jul 17, 2024
2d23908
Merge branch 'refs/heads/main' into faucets-for-mm-docs
Jul 17, 2024
d5e4b5d
Faucet alerts + prettier (#1423)
Voltmod Jul 18, 2024
5ed2df2
Merge branch 'refs/heads/main' into faucets-for-mm-docs
Jul 18, 2024
1e9b628
feat(faucet): act-1391 - added badge component (#1425)
TrofimovAnton85 Jul 18, 2024
8871cf8
feat(docs): act-1392 - added table component (#1439)
TrofimovAnton85 Jul 23, 2024
a8d81d5
eslint + prettier fix for src (#1440)
Voltmod Jul 23, 2024
50e5158
ACT-1473 Assemble faucet page (#1448)
Voltmod Jul 24, 2024
52ab084
ACT-1473 Assemble faucet page
Jul 25, 2024
d892cf7
Merge branch 'refs/heads/main' into faucets-for-mm-docs
Jul 26, 2024
fdfc42d
ESlint + Prettier
Jul 26, 2024
597b1ec
Improve types and aliases resolving
Jul 26, 2024
a3fd801
feat(m-login): adding full login flow
cedricmagne Jul 31, 2024
e635c7e
feat(m-login): fix merge
cedricmagne Jul 31, 2024
c0aac44
feat(m-login): fix build
cedricmagne Jul 31, 2024
c4728a7
feat(m-login): fixing link unfurling
cedricmagne Jul 31, 2024
dcc4174
feat(m-login): implementing multiple wallet pairing
cedricmagne Aug 1, 2024
b2cddbf
feat(mm-login): updating dashboard preview url
cedricmagne Aug 1, 2024
450cfba
feat(mm-login): updating dashboard preview url
cedricmagne Aug 1, 2024
b81e5f1
feat(mm-login): fix merge
cedricmagne Aug 1, 2024
45f9716
feat(mm-login): hardcode dashboard preview url
cedricmagne Aug 1, 2024
7fe56b5
Faucet maintenance mode (#1475)
Voltmod Aug 2, 2024
667c043
Merge branch 'refs/heads/ACT-1382-siwsrp-full-flow' into faucets-for-…
Aug 5, 2024
af804ae
Faucet supports MM login flow
Aug 7, 2024
69485fa
Handle MetaMask sdk using common sdk
Aug 8, 2024
6e5c17d
Handle auth Infura connection
Aug 8, 2024
e7c5a19
Merge branch 'refs/heads/main' into faucets-for-mm-docs
Aug 8, 2024
2699e61
Faucet Hero img
Aug 8, 2024
251c500
Fix SSR
Aug 8, 2024
8d7f4b7
Fix BrowserOnly
Aug 8, 2024
7e9bf23
Handle stale data
Aug 9, 2024
f386d29
Get transactions
Aug 9, 2024
65fb211
Merge branch 'refs/heads/main' into ACT-1382-siwsrp-full-flow
Aug 12, 2024
d6fbd38
Merge branch 'refs/heads/ACT-1382-siwsrp-full-flow' into faucets-for-…
Aug 12, 2024
d8f4e23
Unified login interface for MM Docs via MM Wallet
Aug 12, 2024
e7537d3
Unified login interface for MM Docs via MM Wallet
Aug 12, 2024
ffbd55e
Unified login interface for MM Docs via MM Wallet
Aug 12, 2024
a1e3b18
Unified login interface for MM Docs via MM Wallet
Aug 12, 2024
ac21e1c
Faucet in MetaMask implementation
Aug 12, 2024
86905aa
Merge branch 'main' into unified-login
cedricmagne Aug 13, 2024
def0d14
feat(unified-login): update unified login
cedricmagne Aug 13, 2024
30ff810
feat(unified-login): update unified login flow
cedricmagne Aug 13, 2024
65fe335
feat(unified-login): update unified login flow
cedricmagne Aug 14, 2024
df0ddd2
feat(unified-login): update unified login flow
cedricmagne Aug 14, 2024
bf1e849
feat(unified-login): update unified login flow
cedricmagne Aug 14, 2024
ff74d96
Merge branch 'main' into unified-login
cedricmagne Aug 14, 2024
b54a153
feat(unified-login): add feature flag to manage login button
cedricmagne Aug 14, 2024
c7ac6a7
feat(unified-login): fix bug on refreshing page
cedricmagne Aug 14, 2024
15ea458
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
df80924
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
901ec77
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
516f979
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
e2edca5
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
cbf37ba
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
449a33a
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
07c7ea3
feat(unified-login): update dahboard_url function call
cedricmagne Aug 15, 2024
0efab37
feat(reference): imp for reference pages (#1471)
TrofimovAnton85 Aug 12, 2024
597fe26
feat(docs):ACT-1500 - Add Wallet ID to Default Values (#1477)
aednikanov Aug 12, 2024
2b50830
Fix typo in Snaps JSX documentation (#1482)
FrederikBolding Aug 12, 2024
ed9c865
Sync Starknet Infura content changes (#1483)
joaniefromtheblock Aug 12, 2024
4d22706
feat(unified-login): update unified login
cedricmagne Aug 13, 2024
91d66fb
feat(unified-login): update unified login flow
cedricmagne Aug 13, 2024
7c91cba
feat(unified-login): update unified login flow
cedricmagne Aug 14, 2024
21497ba
feat(unified-login): update unified login flow
cedricmagne Aug 14, 2024
51f21b7
feat(unified-login): update unified login flow
cedricmagne Aug 14, 2024
97ba338
minor update (#1484)
joaniefromtheblock Aug 13, 2024
2cc4a81
fixes links: assume that Infura --> MM docs does not map exactly (#1488)
m4sterbunny Aug 13, 2024
08fa944
feat(unified-login): add feature flag to manage login button
cedricmagne Aug 14, 2024
47de6ee
feat(unified-login): fix bug on refreshing page
cedricmagne Aug 14, 2024
06cf5b9
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
1101679
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
5999ae5
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
a182274
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
9cd095b
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
c5188e7
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
a43d146
feat(unified-login): fix dahboard url
cedricmagne Aug 15, 2024
1d1ce86
feat(unified-login): update dahboard_url function call
cedricmagne Aug 15, 2024
c92e14f
Faucet in MetaMask implementation
Aug 23, 2024
9ee4877
Faucet in MetaMask implementation
Aug 27, 2024
edd3c0d
Improve faucet UI/UX
Aug 29, 2024
41d24af
Merge branch 'main' into unified-login
Aug 29, 2024
16f66fe
Improve ui and ux
Aug 30, 2024
c82791c
Merge branch 'unified-login' into faucets-for-mm-docs
Aug 30, 2024
e7c9308
Improve ui and ux
Aug 30, 2024
aa9273b
clear data on disconnect
Aug 30, 2024
0deda79
# Conflicts:
Aug 30, 2024
8858103
Small bugfixes
Aug 30, 2024
1c43fe4
Merge branch 'unified-login' into faucets-for-mm-docs
Aug 30, 2024
48ac4de
Implement segment events tracking
Sep 5, 2024
e84c18c
Fix low balance alert
Sep 26, 2024
21b07a3
Fix conflicts
Sep 30, 2024
277a72e
fix linting
Sep 30, 2024
cf857f5
fix linting
Sep 30, 2024
058a84d
fix linting
Sep 30, 2024
7f3789c
Merge branch 'main' into faucets-for-mm-docs
Voltmod Oct 2, 2024
29cd2e7
revert structure back
Oct 2, 2024
12b5607
Improve linking Infura account(s)
Oct 4, 2024
834810d
Fix yarn mention
Oct 4, 2024
10ce7fa
Merge branch 'main' into faucets-for-mm-docs
Voltmod Oct 4, 2024
da7c056
Apply suggestions from code review
alexandratran Oct 4, 2024
949a12f
Update src/components/Faucet/Faq.tsx
alexandratran Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const config = {
],
],
plugins: [
'docusaurus-plugin-sass',
[
"@docusaurus/plugin-content-docs",
{
Expand Down Expand Up @@ -168,7 +169,7 @@ const config = {
replaysOnErrorSampleRate: isProd ? 1.0 : 0,
replaysSessionSampleRate: isProd ? 1.0 : 0,
sampleRate: isProd ? 0.25 : 0,
tracesSampleRate: 0,
tracesSampleRate: 0,
},
},
},
Expand Down Expand Up @@ -208,6 +209,10 @@ const config = {
label: "Infura dashboard",
to: "developer-tools/dashboard",
},
{
label: "Faucet",
to: "developer-tools/faucet",
},
],
},
{
Expand All @@ -220,6 +225,11 @@ const config = {
label: "User support",
position: "right",
},
{
type: 'custom-navbarWallet',
position: "right",
includeUrl: ['/developer-tools/faucet/'],
},
/* Language drop down
{
type: "localeDropdown",
Expand Down
28 changes: 20 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "(MIT OR Apache-2.0)",
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"start": "docusaurus start -p 3003",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand All @@ -19,7 +19,7 @@
"lint:js": "eslint . --ext js,jsx,ts,tsx --max-warnings=5",
"lint:style": "stylelint \"**/*.css\" --fix",
"lint:fix": "npm run lint:js -- --fix",
"format": "prettier --write '{blog,docs,src,static}/**/*.{md,mdx,ts,js,tsx,jsx,json}'"
"format": "prettier --write '{blog,docs,src}/**/*.{md,mdx,ts,js,tsx,jsx,json}'"
},
"lint-staged": {
"src/**/*.{ts,js,jsx,tsx}": "npm run lint:fix",
Expand All @@ -31,34 +31,42 @@
"@apidevtools/json-schema-ref-parser": "^11.6.4",
"@docusaurus/core": "^3.0.0",
"@docusaurus/plugin-content-docs": "^3.0.0",
"@docusaurus/plugin-content-pages": "^3.4.0",
"@docusaurus/theme-common": "^3.0.0",
"@docusaurus/theme-mermaid": "^3.0.0",
"@intercom/messenger-js-sdk": "^0.0.11",
"@mdx-js/react": "^3.0.0",
"@metamask-previews/profile-sync-controller": "0.1.4-preview-16e6df4",
"@metamask/design-tokens": "^1.11.1",
"@metamask/docusaurus-openrpc": "^0.4.1",
"@metamask/sdk": "^0.26.5",
"@metamask/sdk-react": "^0.26.5",
"@metamask/sdk": "^0.27.0",
"@metamask/sdk-react": "^0.27.0",
"@rjsf/core": "^5.18.4",
"@rjsf/utils": "^5.18.4",
"@rjsf/validator-ajv8": "^5.18.4",
"@types/react": "^18.3.3",
"clsx": "^1.2.1",
"docusaurus-plugin-sass": "^0.2.5",
"docusaurus-plugin-segment": "^1.0.4",
"docusaurus-plugin-sentry": "^2.0.0",
"dotenv": "^16.4.5",
"ethers": "^6.13.2",
"js-cookie": "^3.0.5",
"launchdarkly-js-client-sdk": "^3.3.0",
"lodash.debounce": "^4.0.8",
"node-polyfill-webpack-plugin": "^2.0.1",
"prettier": "^3.0.0",
"prettier": "^3.3.3",
"prism-react-renderer": "^2.1.0",
"react": "^18.0.0",
"react-alert": "^7.0.3",
"react-dom": "^18.0.0",
"react-dropdown-select": "^4.11.2",
"react-modal": "^3.16.1",
"react-player": "^2.13.0",
"react-tippy": "^1.4.0",
"remark-codesandbox": "^0.10.1",
"remark-docusaurus-tabs": "^0.2.0"
"remark-docusaurus-tabs": "^0.2.0",
"sass": "^1.77.6"
},
"devDependencies": {
"@docusaurus/eslint-plugin": "^3.0.0",
Expand All @@ -68,12 +76,14 @@
"@docusaurus/types": "^3.4.0",
"@lavamoat/allow-scripts": "^3.0.4",
"@tsconfig/docusaurus": "^1.0.5",
"@types/react-alert": "^7.0.6",
"@types/react-modal": "^3.16.3",
"@typescript-eslint/parser": "^7.12.0",
"eslint-plugin-react": "^7.34.2",
"stylelint": "^15.0.0 ",
"stylelint-config-standard": "^34.0.0",
"tsc-files": "^1.1.4",
"typescript": "^5.4.5"
"typescript": "^5.5.4"
},
"browserslist": {
"production": [
Expand Down Expand Up @@ -111,7 +121,9 @@
"@metamask/sdk-react>@metamask/sdk>eciesjs>secp256k1": false,
"@metamask/sdk>@metamask/sdk-communication-layer>bufferutil": false,
"@metamask/sdk>@metamask/sdk-communication-layer>utf-8-validate": false,
"@metamask/sdk>eciesjs>secp256k1": false
"@metamask/sdk>eciesjs>secp256k1": false,
"ethers>ws>bufferutil": false,
"ethers>ws>utf-8-validate": false
}
}
}
40 changes: 5 additions & 35 deletions services/reference/linea/json-rpc-methods/eth_blocknumber.mdx
Original file line number Diff line number Diff line change
@@ -1,40 +1,10 @@
---
title: "eth_blockNumber"
hide_title: true
hide_table_of_contents: true
---

import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"
import ParserOpenRPC from "@site/src/components/ParserOpenRPC"
import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"

import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"

<Description />

## Parameters

import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"

<Params />

## Returns

import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"

<Returns />

## Example

import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"

<Example />

### Request

import Request from "./_eth_blocknumber-request.mdx"

<Request />

### Response

import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"

<Response />
<ParserOpenRPC network={NETWORK_NAMES.linea} method="eth_blockNumber" />
63 changes: 63 additions & 0 deletions src/components/Accordion/accordion.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
:root[data-theme="dark"] {
--accordion-background: #24272a;
--accordion-border: rgba(132, 140, 150, 0.16);
}

:root[data-theme="light"] {
--accordion-background: #ffffff;
--accordion-border: rgba(187, 192, 197, 0.4);
}

.accordion {
background: var(--accordion-background);
border: 1px solid var(--accordion-border);
border-radius: 8px;
padding: 24px;
margin-bottom: 24px;

.header {
display: flex;
justify-content: space-between;
align-items: center;

.closeButton {
cursor: pointer;
margin-left: 24px;
display: block;
height: 16px;
line-height: 1;

.image {
min-width: 16px;
width: 16px;
min-height: 16px;
height: 16px;
transition: all 0.5s;
transform: rotate(45deg);

&.opened {
transform: rotate(0);
}
}
}
}

.content {
margin-top: 20px;
visibility: hidden;
display: none;

&.opened {
visibility: visible;
display: block;
}
}
}

.accordionHeader {
margin: 0;
}

.accordionContainer {
margin: 0;
}
4 changes: 4 additions & 0 deletions src/components/Accordion/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions src/components/Accordion/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React, { useState } from "react";
import clsx from "clsx";
import styles from "./accordion.module.scss";
import CloseImg from "./close.svg";
import Text from "@site/src/components/Text";

interface IAccordion {
children: string | React.ReactElement;
opened?: boolean;
}

export default function Accordion({ children, opened = false }: IAccordion) {
const [isOpened, setIsOpened] = useState(opened);

const handleClose = () => {
setIsOpened((value) => !value);
};

const [title, ...body] = Array.isArray(children) ? children : [children];

return (
<div className={styles.accordion}>
<div className={styles.header}>
{title}
<span
role="button"
onClick={handleClose}
className={styles.closeButton}
>
<CloseImg className={clsx(styles.image, isOpened && styles.opened)} />
</span>
</div>
<div className={clsx(styles.content, isOpened && styles.opened)}>
{body}
</div>
</div>
);
}

export function AccordionHeader({
children,
}: {
children: React.ReactElement;
}) {
return (
<Text as="h3" className={styles.accordionHeader}>
{children}
</Text>
);
}

export function AccordionBody({ children }: { children: React.ReactElement }) {
return (
<Text as="p" className={styles.accordionContainer}>
{children}
</Text>
);
}
85 changes: 85 additions & 0 deletions src/components/Alert/alert.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
:root[data-theme="dark"] {
--alert-error-background: rgb(53, 40, 41);
--alert-error-border: #e06470;
--alert-success-background: rgb(34, 48, 36);
--alert-success-border: #28a745;
--alert-info-background: rgb(61, 57, 43);
--alert-info-border: #ffdf70;
}

:root[data-theme="light"] {
--alert-error-background: rgb(248, 235, 237);
--alert-error-border: #d73847;
--alert-success-background: rgb(234, 242, 235);
--alert-success-border: #1c8234;
--alert-info-background: rgb(247, 238, 231);
--alert-info-border: #bf5208;
}

.alert {
padding: 8px 36px;
border-radius: 4px;
border-left: 4px solid;
position: relative;
width: 80vw;
box-shadow: var(--ifm-alert-shadow);

&.info {
border-color: var(--alert-info-border);
background-color: var(--alert-info-background);

.icon {
color: var(--alert-info-border);
}
}

&.success {
border-color: var(--alert-success-border);
background-color: var(--alert-success-background);

.icon {
color: var(--alert-success-border);
}
}

&.error {
border-color: var(--alert-error-border);
background-color: var(--alert-error-background);

.icon {
color: var(--alert-error-border);
}
}

.icon {
position: absolute;
left: 5px;
top: 8px;
}

.closeButton {
cursor: pointer;
display: block;
height: 16px;
line-height: 1;
position: absolute;
top: 10px;
right: 10px;

.closeIcon {
min-width: 16px;
width: 16px;
min-height: 16px;
height: 16px;
}
}
}

.alertTitle {
font-weight: 500 !important;
margin: 0;
}

.alertText {
margin: 0;
}
6 changes: 6 additions & 0 deletions src/components/Alert/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading