Skip to content

Commit b1b4766

Browse files
Sync latest changes from Infura (#1581)
* Sync latest changes from Infura * Apply suggestions from code review Co-authored-by: Byron Gravenorst <[email protected]> --------- Co-authored-by: Byron Gravenorst <[email protected]>
1 parent a1f32ea commit b1b4766

File tree

100 files changed

+691
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+691
-343
lines changed

developer-tools/dashboard/how-to/credit-usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: View your Infura credit usage stats.
66

77
:::info
88

9-
The [credit pricing model](../api/learn/pricing/) replaces request-based billing for free-tier (Core)
9+
The [credit pricing model](/services/get-started/pricing) replaces request-based billing for free-tier (Core)
1010
customers. Customers on Developer and Team plans will be transitioned to the credit model on
1111
September 30, 2024.
1212

docs/whats-new.md

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ of the [MetaMask developer page](https://metamask.io/developer/).
1111

1212
## September 2024
1313

14+
- Updated [credit cost](/services/get-started/pricing/credit-cost/#ethereum) for `eth_sendRawTransaction`.
15+
([#1581](https://github.com/MetaMask/metamask-docs/pull/1581))
16+
- Documented WebSocket support for [Base](/services/reference/base),
17+
[Blast](/services/reference/blast), [Celo](/services/reference/celo),
18+
[Ethereum Holesky](/services/reference/ethereum), and [Mantle](/services/reference/mantle).
19+
([#1552](https://github.com/MetaMask/metamask-docs/pull/1552))
1420
- Documented new [Snaps custom UI JSX components](/snaps/features/custom-ui) for Flask
1521
version 12.4, and removed documentation for deprecated function-based library.
1622
([#1540](https://github.com/MetaMask/metamask-docs/pull/1540))

services/get-started/endpoints.md

+64-75
Large diffs are not rendered by default.

services/get-started/pricing/credit-cost.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ a specific network, then use the default Ethereum method's credit cost.
8080
| `eth_maxPriorityFeePerGas` | 80 |
8181
| `eth_mining` | 5 |
8282
| `eth_protocolVersion` | 5 |
83-
| `eth_sendRawTransaction` | 720 |
83+
| `eth_sendRawTransaction` | 80 |
8484
| `eth_sign` | 80 |
8585
| `eth_submitWork` | 80 |
8686
| `eth_subscribe` | 5 |

services/how-to/javascript-dotenv.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ You can create a `package.json` file by running a CLI questionnaire, or by creat
3737
At the root of your project directory, create a file named `.env` containing environment variables for sensitive information that shouldn't be shared, such as an Infura API key, Ethereum private key, or MetaMask secret recovery phrase:
3838

3939
```bash
40-
INFURA_API_KEY = "https://goerli.infura.io/v3/<Your-API-Key>"
41-
PRIVATE_KEY = "<Your-private-key>"
40+
INFURA_API_KEY = "<YOUR-API-KEY>"
41+
PRIVATE_KEY = "<YOUR-PRIVATE-KEY>"
4242
```
4343

4444
:::danger
@@ -55,7 +55,7 @@ Give your project access to the `.env` information by including the following li
5555
require("dotenv").config()
5656
```
5757

58-
Access the environment variables using `process.env.<Your-Environment-Variable-Name>`. For example, the following is a `hardhat.config.js` file for a Hardhat project:
58+
Access the environment variables using `process.env.<YOUR-ENV-VAR-NAME>`. For example, the following is a `hardhat.config.js` file for a Hardhat project:
5959

6060
```javascript
6161
require("@nomiclabs/hardhat-waffle")

services/how-to/json-web-token-jwt.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ If JWTs are required for all requests, the following fails with an `invalid JWT`
126126
curl -X POST \
127127
-H "Content-Type: application/json" \
128128
--data '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' \
129-
"https://optimism-sepolia.infura.io/v3/<API-KEY>"
129+
"https://optimism-sepolia.infura.io/v3/<YOUR-API-KEY>"
130130
```
131131

132132
To get the request to pass, generate a JWT, and add it to the request.
@@ -160,7 +160,7 @@ curl -X POST \
160160
-H "Content-Type: application/json" \
161161
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjQyZjUxODRlMzE1ZTQwZDRiNzkzMjU3Nzg2OTEwOTNhIn0.eyJleHAiOjE4OTM0NTI0MDAsImF1ZCI6ImluZnVyYS5pbyJ9.rIBKHmxDsSEiiqEcbWPWkN6F28R95a0beGdnVgVQnnD7ESOKGosr2t9iQ7QyGvNO8-74gaPy_DqVn4sy1FvnullrWQc8Tmf5PrrX2ULiGfSUATvr-JPOga-KAgS6ftcStoACNmcN7QI-n7Gv7NqZC3zWMGzK_1SvYcSodXzoWwtkWmrMW9uPiu4MvROQH0sK7MJ4WHBIHii-x4wogH4PHEdGi_vFZohq2bRaaDKXBeJK7Tkke2whcydTHGuiAPQvRiHu5_wVptgDbTbKIQ28ZFQ4LpYStXE9Bck4JoVDeRQezWJN8Dx9ThU7j1xhWQqxQFWw3SPHry-cIejAWEfDTQ" \
162162
--data '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' \
163-
"https://mainnet.infura.io/v3/<API-KEY>"
163+
"https://mainnet.infura.io/v3/<YOUR-API-KEY>"
164164
```
165165

166166
```bash
@@ -214,7 +214,7 @@ curl -X POST \
214214
-H "Content-Type: application/json" \
215215
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjQyZjUxODRlMzE1ZTQwZDRiNzkzMjU3Nzg2OTEwOTNhIn0.eyJleHAiOjE4OTM0NTI0MDAsImF1ZCI6ImluZnVyYS5pbyIsImFkZHJlc3NlcyI6WyIweDE5MzdjNWM1MTUwNTc1NTNjY2JkNDZkNTg2NjQ1NWNlNjYyOTAyODQiXSwibWV0aG9kcyI6WyJldGhfZ2V0QmFsYW5jZSJdfQ.SwonSCVgybdT_GPQXe5SfhujmyzG-qpgH6zzVEzLZbZpZKsVQzOzFu3X1zHydvITzl3WhKXq5q8acHdMEO8y2TpUeyeLB25A-bnSZj8YlxacQvsnSNzm4ySJrTglmjD9rsr6JzKfgub03RuHuz0AWWO4omD6UrPcfcpxUF9YXEcT98SIsodPP_41WPrRvBuo8kLhmByr2Qs-XQRCDzxHxHb5jXI5RzoxLeEjTU_3GfWqgqgh4XHogcK43_VFGz9gv8QEoUiPnySafV6H80WXo12XwTeF-lr2cy_q79ZOvSp0WC4_j8dQMhNwj2dhZv1VPsViZMeHjBAJwK5mzIxBlQ" \
216216
--data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBalance", "params": [ "0x1937c5c515057553ccbd46d5866455ce66290284", "latest"]}' \
217-
"https://mainnet.infura.io/v3/<API-KEY>"
217+
"https://mainnet.infura.io/v3/<YOUR-API-KEY>"
218218
```
219219

220220
```bash

services/how-to/make-batch-requests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Example batch request (containing 30 requests plus the batch request itself):
2626

2727
```json
2828
curl --request POST \
29-
--url https://mainnet.infura.io/v3/<API-KEY> \
29+
--url https://mainnet.infura.io/v3/<YOUR-API-KEY> \
3030
--header "Content-Type: application/json" \
3131
--data '[
3232
{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []},

services/how-to/trace-transactions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This example represents a call to the `transfer` function of an ERC-20 token con
6767
<TabItem value="cURL" label="cURL" default>
6868

6969
```bash
70-
curl https://mainnet.infura.io/v3/<API-KEY> \
70+
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
7171
-X POST \
7272
-H "Content-Type: application/json" \
7373
-d '{"jsonrpc": "2.0", "method": "trace_transaction", "params": ["0x1e404c4bf580688c5527df2ce5aceb3db5de49479ab7dd321dd4615e4f5a7a5c"], "id": 1}'

services/reference/_partials/_eth_sendrawtransaction-response.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import TabItem from "@theme/TabItem"
1717

1818
## Error response
1919

20-
On Mainnet and Goerli, if this call causes the EVM to execute a `REVERT` operation, an error response of the following form is returned, with the revert reason pre-decoded as a string:
20+
If this call causes the EVM to execute a `REVERT` operation, an error response of the following form is returned, with the revert reason pre-decoded as a string:
2121

2222
```json
2323
{
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
Specify one of the following subscription events:
22

33
- `newHeads`: Subscribing to this returns a notification each time a new header is appended to the chain, including chain reorganizations. In a chain reorganization, the subscription emits all new headers for the new chain. Therefore the subscription can emit multiple headers at the same height.
4-
54
- `logs`: Returns logs that are included in new imported blocks and match the given filter criteria. In case of a chain reorganization, previously sent logs that are on the old chain are resent with the removed property set to `true`. Logs from transactions that ended up in the new chain are emitted. Therefore a subscription can emit logs for the same transaction multiple times. This parameter has the following fields:
6-
75
- `address`: (_optional_) Either an address or an array of addresses. Only logs that are created from these addresses are returned.
8-
96
- `topics`: (_optional_) Only logs that match these specified topics are returned.
10-
117
:::tip Infura Recommendation
12-
138
We strongly recommend specifying a filter (`address` or `topics` or both) when subscribing to the `logs` event.
14-
159
:::
16-
1710
- `newPendingTransactions`: Returns the hash for all transactions that are added to the pending state and are signed with a key that's available in the node. When a transaction that was previously part of the canonical chain isn't part of the new canonical chain after a reorganization, it's emitted again.

services/reference/base/index.md

-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ import CardList from '@site/src/components/CardList'
88

99
Base is an optimistic layer 2 rollup chain built by Coinbase on the MIT-licensed [OP Stack](https://docs.optimism.io/stack/getting-started#the-op-stack-today), in collaboration with [Optimism](../optimism/index.md).
1010

11-
:::caution Limited access
12-
Base is currently only available to a limited number of customers. Production
13-
support is also limited. If you would like access, please submit a request to `[email protected]` and
14-
we will assess if your request can be accommodated at this time.
15-
:::
16-
1711
The Base network provides seamless Coinbase integrations, easy fiat onramps, and access to more than
1812
100 million users and $100 billion in assets in the Coinbase ecosystem.
1913

services/reference/base/json-rpc-methods/_eth_accounts-request.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,13 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>
23+

services/reference/base/json-rpc-methods/_eth_blocknumber-request.mdx

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Tabs from "@theme/Tabs"
2-
import TabItem from "@theme/TabItem"
1+
import Tabs from "@theme/Tabs";
2+
import TabItem from "@theme/TabItem";
33

44
<Tabs>
55
<TabItem value="cURL">
@@ -12,4 +12,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1212
```
1313

1414
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
19+
```
20+
21+
</TabItem>
22+
1523
</Tabs>

services/reference/base/json-rpc-methods/_eth_call-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_chainid-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_estimategas-request.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ import TabItem from "@theme/TabItem"
88
curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
99
-X POST \
1010
-H "Content-Type: application/json" \
11-
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id":1}'
11+
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}'
1219
```
1320

1421
</TabItem>

services/reference/base/json-rpc-methods/_eth_feehistory-request.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ import TabItem from "@theme/TabItem"
88
curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
99
-X POST \
1010
-H "Content-Type: application/json" \
11-
-d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20, 30]], "id": 1}'
11+
-d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }'
12+
```
13+
14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", []], "id": 1}'
1219
```
1320

1421
</TabItem>

services/reference/base/json-rpc-methods/_eth_gasprice-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_getbalance-request.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ import TabItem from "@theme/TabItem"
88
curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
99
-X POST \
1010
-H "Content-Type: application/json" \
11-
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}'
11+
-d '{"jsonrpc": "2.0","method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}'
1219
```
1320

1421
</TabItem>

services/reference/base/json-rpc-methods/_eth_getblockbyhash-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_getblockbynumber-request.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ import TabItem from "@theme/TabItem"
88
curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
99
-X POST \
1010
-H "Content-Type: application/json" \
11-
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params":["0x5BAD55", false], "id": 1}'
11+
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55",false], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}'
1219
```
1320

1421
</TabItem>

services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_getcode-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_getlogs-request.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ import TabItem from "@theme/TabItem"
88
curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
99
-X POST \
1010
-H "Content-Type: application/json" \
11-
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}'
11+
-d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}'
12+
```
13+
14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id":1}'
1219
```
1320

1421
</TabItem>

services/reference/base/json-rpc-methods/_eth_getproof-request.mdx

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ import TabItem from "@theme/TabItem"
88
curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
99
-X POST \
1010
-H "Content-Type: application/json" \
11-
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
11+
-d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}'
12+
```
13+
14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}'
1219
```
1320

1421
</TabItem>

services/reference/base/json-rpc-methods/_eth_getstorageat-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/base/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://base-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS">
16+
17+
```bash
18+
wscat -c wss://base-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

0 commit comments

Comments
 (0)