Skip to content

Commit

Permalink
apply additional suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
joaniefromtheblock committed Jul 16, 2024
1 parent a8f179b commit f364143
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 111 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Build

on:
workflow_call:
secrets:
SEGMENT_ANALYTICS_KEY:
required: true
LD_CLIENT_ID:
required: true

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


jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Build
uses: ConsenSys/docs-gha/build@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 19 additions & 17 deletions .github/workflows/build-lint.yml → .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Build and lint
---
name: Check for lint, spelling and link errors

on:
workflow_call:
Expand All @@ -12,29 +13,30 @@ env:
SEGMENT_ANALYTICS_KEY: ${{ secrets.SEGMENT_ANALYTICS_KEY }}
LD_CLIENT_ID: ${{ secrets.LD_CLIENT_ID }}


jobs:
build:
name: Build
lint:
name: Lint Code Base, Spelling, Link Check
runs-on: ubuntu-latest
needs:
- prepare
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build
uses: ConsenSys/docs-gha/build@main
- name: Lint
uses: ConsenSys/docs-gha/lint@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Lint
linkCheck:
name: Link Checking
runs-on: ubuntu-latest
needs:
- prepare
strategy:
matrix:
file-extensions: [".md", ".mdx"]
steps:
- uses: actions/checkout@v3

- name: Lint
uses: ConsenSys/docs-gha/lint@main
- uses: actions/checkout@v4
- name: LinkCheck
uses: ConsenSys/docs-gha/linkcheck@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILE_EXTENSION: ${{ matrix.file-extensions }}
37 changes: 10 additions & 27 deletions .github/workflows/security-code-scanner.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: "MetaMask Security Code Scanner"
name: 'MetaMask Security Code Scanner'

on:
push:
branches: ["main"]
branches:
- 'main'
pull_request:
branches: ["main"]
branches:
- 'main'

jobs:
run-security-scan:
Expand All @@ -14,30 +16,11 @@ jobs:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- name: MetaMask Security Code Scanner
uses: MetaMask/Security-Code-Scanner@main
uses: ConsenSys/docs-gha/mm-security-scanner@main
with:
repo: ${{ github.repository }}
paths_ignored: |
.storybook/
'**/__snapshots__/'
'**/*.snap'
'**/*.stories.js'
'**/*.stories.tsx'
'**/*.test.browser.ts*'
'**/*.test.js*'
'**/*.test.ts*'
'**/fixtures/'
'**/jest.config.js'
'**/jest.environment.js'
'**/mocks/'
'**/test*/'
docs/
e2e/
merged-packages/
node_modules
storybook/
test*/
rules_excluded: example
project_metrics_token: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }}
slack_webhook: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SECURITY_SCAN_METRICS_TOKEN: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }}
APPSEC_BOT_SLACK_WEBHOOK: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}
6 changes: 3 additions & 3 deletions services/reference/blast/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a

```bash
curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
```

### Node (JavaScript)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,56 +52,55 @@ wscat -c wss://linea-goerli.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0"

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"result": {
"calls": [
{
"from": "0xa0013f511c70f01c077a8f809e36b905a0d16c95",
"gas": "0x1feac",
"gasUsed": "0x9d5",
"input": "0x0902f1ac",
"output": "0x0000000000000000000000000000000000000000000000025aa314728293841e00000000000000000000000000000000000000000000000000000007a5cc7a260000000000000000000000000000000000000000000000000000000064b8c380",
"to": "0x75a97d88ff19e07da99023ef0e35e35f51869de0",
"type": "STATICCALL"
},
{
"calls": [
{
"from": "0xf56dc6695cf1f5c364edebc7dc7077ac9b586068",
"gas": "0x1bc78",
"gasUsed": "0x6c8f",
"input": "0x23b872dd000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f00000000000000000000000075a97d88ff19e07da99023ef0e35e35f51869de00000000000000000000000000000000000000000000000000000000002faf080",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"to": "0x1c92ff898f7c34fc6ed884aec3859fd6c655c1f0",
"type": "DELEGATECALL",
"value": "0x0"
}
],
"from": "0xa0013f511c70f01c077a8f809e36b905a0d16c95",
"gas": "0x1dfd5",
"gasUsed": "0x8907",
"input": "0x23b872dd000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f00000000000000000000000075a97d88ff19e07da99023ef0e35e35f51869de00000000000000000000000000000000000000000000000000000000002faf080",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"to": "0xf56dc6695cf1f5c364edebc7dc7077ac9b586068",
"type": "CALL",
"value": "0x0"
},
...
],
"from": "0xc2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f",
"gas": "0x273bd",
"gasUsed": "0x22499",
"input": "0x38ed17390000000000000000000000000000000000000000000000000000000002faf08000000000000000000000000000000000000000000000000000e8291f2bdfeff000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f0000000000000000000000000000000000000000000000000000000064b8cdb80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f56dc6695cf1f5c364edebc7dc7077ac9b586068000000000000000000000000ed4ccdd10b8b97ba9555a6767613bfb98aaf72c4",
"output": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000002faf08000000000000000000000000000000000000000000000000000e9c8a628b94ade",
"to": "0xa0013f511c70f01c077a8f809e36b905a0d16c95",
"type": "CALL",
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"result": {
"calls": [
{
"from": "0xa0013f511c70f01c077a8f809e36b905a0d16c95",
"gas": "0x1feac",
"gasUsed": "0x9d5",
"input": "0x0902f1ac",
"output": "0x0000000000000000000000000000000000000000000000025aa314728293841e00000000000000000000000000000000000000000000000000000007a5cc7a260000000000000000000000000000000000000000000000000000000064b8c380",
"to": "0x75a97d88ff19e07da99023ef0e35e35f51869de0",
"type": "STATICCALL"
},
{
"calls": [
{
"from": "0xf56dc6695cf1f5c364edebc7dc7077ac9b586068",
"gas": "0x1bc78",
"gasUsed": "0x6c8f",
"input": "0x23b872dd000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f00000000000000000000000075a97d88ff19e07da99023ef0e35e35f51869de00000000000000000000000000000000000000000000000000000000002faf080",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"to": "0x1c92ff898f7c34fc6ed884aec3859fd6c655c1f0",
"type": "DELEGATECALL",
"value": "0x0"
}
},
...
]
}
],
"from": "0xa0013f511c70f01c077a8f809e36b905a0d16c95",
"gas": "0x1dfd5",
"gasUsed": "0x8907",
"input": "0x23b872dd000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f00000000000000000000000075a97d88ff19e07da99023ef0e35e35f51869de00000000000000000000000000000000000000000000000000000000002faf080",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"to": "0xf56dc6695cf1f5c364edebc7dc7077ac9b586068",
"type": "CALL",
"value": "0x0"
}
],
"from": "0xc2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f",
"gas": "0x273bd",
"gasUsed": "0x22499",
"input": "0x38ed17390000000000000000000000000000000000000000000000000000000002faf08000000000000000000000000000000000000000000000000000e8291f2bdfeff000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f0000000000000000000000000000000000000000000000000000000064b8cdb80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f56dc6695cf1f5c364edebc7dc7077ac9b586068000000000000000000000000ed4ccdd10b8b97ba9555a6767613bfb98aaf72c4",
"output": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000002faf08000000000000000000000000000000000000000000000000000e9c8a628b94ade",
"to": "0xa0013f511c70f01c077a8f809e36b905a0d16c95",
"type": "CALL",
"value": "0x0"
}
}
...
]
}
```
8 changes: 4 additions & 4 deletions services/reference/linea/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta
url = "https://linea-mainnet.infura.io/v3/YOUR-API-KEY"
payload = {
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
headers = {"content-type": "application/json"}
Expand Down
8 changes: 4 additions & 4 deletions services/reference/mantle/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ In these examples, you'll use [NPM](https://docs.npmjs.com/downloading-and-insta
url = "https://mantle-mainnet.infura.io/v3/YOUR-API-KEY"
payload = {
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
headers = {"content-type": "application/json"}
Expand Down
4 changes: 2 additions & 2 deletions services/reference/optimism/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta
pip install requests
```
1. Create your JavaScript file and copy the following code:
1. Create your Python file and copy the following code:
Replace `YOUR-API-KEY` with your actual Infura API key.
```javascript title="index.py"
```python title="index.py"
import requests
import json
Expand Down
4 changes: 2 additions & 2 deletions services/reference/palm/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta
pip install requests
```
1. Create your JavaScript file and copy the following code:
1. Create your Python file and copy the following code:
Replace `YOUR-API-KEY` with your actual Infura API key.
```javascript title="index.py"
```python title="index.py"
import requests
import json
Expand Down
4 changes: 2 additions & 2 deletions services/reference/polygon-pos/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta
pip install requests
```
1. Create your JavaScript file and copy the following code:
1. Create your Python file and copy the following code:
Replace `YOUR-API-KEY` with your actual Infura API key.
```javascript title="index.py"
```python title="index.py"
import requests
import json
Expand Down

0 comments on commit f364143

Please sign in to comment.