Skip to content

Commit

Permalink
Merge branch 'main' into faucets-for-mm-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Voltmod authored Oct 2, 2024
2 parents 058a84d + f349787 commit 7f3789c
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# Docusaurus configuration
docusaurus.config.js @MetaMask/activation @MetaMask/tech-writers

# GitHub workflows and templates
/.github/ @MetaMask/activation @MetaMask/tech-writers

# Vercel configuration
vercel.json @MetaMask/activation @MetaMask/tech-writers

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
build:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
case:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ on:
required: true
SENTRY_KEY:
required: true
GF_SURVEY_KEY:
required: true

env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

jobs:
lint:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

lint:
name: Lint
Expand All @@ -34,6 +35,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

case:
name: Case
Expand All @@ -42,6 +44,7 @@ jobs:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_DEV_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

all-jobs-completed:
name: All jobs completed
Expand Down
40 changes: 18 additions & 22 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,29 @@
cancel-in-progress: true

jobs:
linkCheck:
name: Run link check
linkCheckMdx:
name: Run link check on .mdx files
runs-on: ubuntu-latest
strategy:
matrix:
file-extensions: [".md", ".mdx"]
check-modified-files-only: [no]
permissions:
contents: read
steps:
- name: LinkCheck
- uses: actions/checkout@v4
- name: LinkCheck mdx files
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}
MODIFIED_FILES_ONLY: ${{ matrix.check-modified-files-only }}

slackNotification:
needs: linkCheck
if: ${{ failure() }}
FILE_EXTENSION: mdx
MODIFIED_FILES_ONLY: no
linkCheckMd:
needs: linkCheckMdx
name: Run link check on .md files
if: always()
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: doc-ci-alerts
SLACK_COLOR: danger
SLACK_USERNAME: ci
SLACK_TITLE: MetaMask docs nightly build - Failure
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: true
- uses: actions/checkout@v4
- name: LinkCheck md files
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: md
MODIFIED_FILES_ONLY: no
2 changes: 2 additions & 0 deletions docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ of the [MetaMask developer page](https://metamask.io/developer/).

## September 2024

- Documented [`linea_getTransactionExclusionStatusV1`](/services/reference/linea/json-rpc-methods/linea_gettransactionexclusionstatusv1).
([#1590](https://github.com/MetaMask/metamask-docs/pull/1590))
- Updated [credit cost](/services/get-started/pricing/credit-cost/#ethereum) for `eth_sendRawTransaction`.
([#1581](https://github.com/MetaMask/metamask-docs/pull/1581))
- Documented WebSocket support for [Base](/services/reference/base),
Expand Down
1 change: 1 addition & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const config = {
VERCEL_ENV: process.env.VERCEL_ENV,
DASHBOARD_PREVIEW_URL: process.env.DASHBOARD_PREVIEW_URL,
SENTRY_KEY: process.env.SENTRY_KEY,
GF_SURVEY_KEY: process.env.GF_SURVEY_KEY,
},

trailingSlash: true,
Expand Down
2 changes: 0 additions & 2 deletions services/get-started/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Ensure that you replace `<YOUR-API-KEY>` with an API key from your [Infura dashb
| Mainnet | JSON-RPC over HTTPS | `https://blast-mainnet.infura.io/v3/<YOUR-API-KEY>` |
| Mainnet | JSON-RPC over WebSocket | `wss://blast-mainnet.infura.io/ws/v3/<YOUR-API-KEY>` |
| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://blast-sepolia.infura.io/v3/<YOUR-API-KEY>` |
| Testnet (Sepolia) | JSON-RPC over WebSocket | `wss://blast-sepolia.infura.io/ws/v3/<YOUR-API-KEY>` |

## Binance Smart Chain

Expand Down Expand Up @@ -108,7 +107,6 @@ Include your authentication details when [making IPFS requests](/reference/ipfs/
| Mainnet | JSON-RPC over HTTPS | `https://mantle-mainnet.infura.io/v3/<YOUR-API-KEY>` |
| Mainnet | JSON-RPC over WebSocket | `wss://mantle-mainnet.infura.io/ws/v3/<YOUR-API-KEY>` |
| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://mantle-sepolia.infura.io/v3/<YOUR-API-KEY>` |
| Testnet (Sepolia) | JSON-RPC over WebSocket | `wss://mantle-sepolia.infura.io/ws/v3/<YOUR-API-KEY>` |

## opBNB

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: "linea_getTransactionExclusionStatusV1"
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Checks if a transaction was rejected for exceeding data line limits, preventing the prover from generating
a proof to be included in a block.

:::warning

You can only check for rejected transactions within seven days of the transaction attempt. Querying
transactions older than this returns a `null` response.

:::

The API call provides the rejection reason if the transaction fails.
It returns `null` if the transaction succeeds.

## Parameters

`transaction hash`: _\[Required]_ A string representing the hash (32 bytes) of a transaction.

## Returns

- `txHash`: The hash of the transaction.
- `from`: The address of the sender.
- `nonce`: Number of transactions made by the sender.
- `txRejectionStage`: The point at which the transaction was rejected. One of:
- `SEQUENCER`: Rejected by the sequencer.
- `RPC`: Rejected by an RPC node.
- `P2P`: Rejected by a P2P-connected node.
- `reasonMessage`: The reason the transaction was rejected.
- `blockNumber`: The block that the transaction was rejected from, in hexadecimal format.
Only returned for transactions rejected by the sequencer.
- `timestamp`: Time of rejection, in ISO 8601 format.

## Example

Replace `<YOUR-API-KEY>` with an API key from your [Infura dashboard](https://infura.io/dashboard).

### Request

<Tabs>
<TabItem value="cURL">

```bash
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": "1", "method": "linea_getTransactionExclusionStatusV1", "params": ["0x526e56101cf39c1e717cef9cedf6fdddb42684711abda35bae51136dbb350ad7"]}'
```
</TabItem>
<TabItem value="WSS">

```bash
wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "linea_getTransactionExclusionStatusV1", "params": ["0x526e56101cf39c1e717cef9cedf6fdddb42684711abda35bae51136dbb350ad7"], "id": 1}'
```

</TabItem>
</Tabs>

### Response

<Tabs>
<TabItem value="JSON">
```json
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"txHash": "0x526e56101cf39c1e717cef9cedf6fdddb42684711abda35bae51136dbb350ad7",
"from": "0x4d144d7b9c96b26361d6ac74dd1d8267edca4fc2",
"nonce": "0x64",
"txRejectionStage": "SEQUENCER",
"reasonMessage": "Transaction line count for module ADD=402 is above the limit 70",
"blockNumber": "0x3039",
"timestamp": "2024-08-22T09:18:51Z"
}
}
```
</TabItem>
</Tabs>

The API returns a `null` result if the transaction does not exceed line limits or is older than seven days.
In these cases, the database does not contain the transaction. For example:

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
```
4 changes: 4 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ svg {
margin-bottom: -2rem;
}

.usabilla_live_button_container {
display: none !important;
}

.getfeedback-hidden {
display: none !important;
}
Expand Down
6 changes: 6 additions & 0 deletions src/theme/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import React, {
import { Provider as AlertProvider } from "react-alert";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import BrowserOnly from "@docusaurus/BrowserOnly";
import siteConfig from "@generated/docusaurus.config";
import { AlertTemplate, options } from "@site/src/components/Alert";
import { MetaMaskSDK, SDKProvider } from "@metamask/sdk";
import {
Expand Down Expand Up @@ -137,9 +138,14 @@ export const LoginProvider = ({ children }) => {
} catch (e) {}
};

const { GF_SURVEY_KEY } = siteConfig.customFields;

useEffect(() => {
const provider = sdk?.getProvider();
setMetaMaskProvider(provider);
if ((window as any)?.usabilla && window?.innerWidth > 1720) {
(window as any)?.usabilla?.load("w.usabilla.com", GF_SURVEY_KEY);
}
}, []);

useEffect(() => {
Expand Down

0 comments on commit 7f3789c

Please sign in to comment.