diff --git a/services/get-started/endpoints.md b/services/get-started/endpoints.md index 812d159033..75e8f16ab3 100644 --- a/services/get-started/endpoints.md +++ b/services/get-started/endpoints.md @@ -143,7 +143,7 @@ Sepolia instead. | Mainnet | JSON-RPC over HTTPS | `https://starknet-mainnet.infura.io/v3/` | | Testnet (Sepolia) | JSON-RPC over HTTPS | `https://starknet-sepolia.infura.io/v3/` | -## ZkSync Era +## ZKsync Era | Network | Description | URL | |-------------------|---------------------|-------------------------------------------------| diff --git a/services/reference/blast/quickstart.md b/services/reference/blast/quickstart.md index a158f51e4d..3fb653abfb 100644 --- a/services/reference/blast/quickstart.md +++ b/services/reference/blast/quickstart.md @@ -36,7 +36,7 @@ In these examples, you'll use [NPM](https://docs.npmjs.com/downloading-and-insta #### Node Fetch -1. In your project folder, install the `node-fetch package using `npm`: +1. In your project folder, install the `node-fetch` package using `npm`: ```bash npm i node-fetch diff --git a/services/reference/zksync/json-rpc-methods/_eth_accounts-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_accounts-request.mdx index 026ed6ebd3..739b121d5f 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_accounts-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_accounts-request.mdx @@ -6,12 +6,11 @@ import TabItem from '@theme/TabItem'; ```bash curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' ``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_call-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_call-request.mdx index d570a270ea..333efb54d0 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_call-request.mdx @@ -4,11 +4,11 @@ import TabItem from '@theme/TabItem'; - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' ``` diff --git a/services/reference/zksync/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_chainid-request.mdx index eb7c7a2807..9be3ef3151 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_chainid-request.mdx @@ -6,9 +6,9 @@ import TabItem from '@theme/TabItem'; ```bash curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' ``` diff --git a/services/reference/zksync/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_estimategas-request.mdx index ed7c159382..0f27f84d6c 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_estimategas-request.mdx @@ -4,12 +4,12 @@ import TabItem from '@theme/TabItem'; - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' +``` diff --git a/services/reference/zksync/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getblockbyhash-request.mdx index f1bd558af6..80feb74336 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -4,12 +4,12 @@ import TabItem from '@theme/TabItem'; - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' +``` diff --git a/services/reference/zksync/json-rpc-methods/zks_estimatefee.mdx b/services/reference/zksync/json-rpc-methods/zks_estimatefee.mdx index ab82b3b29d..df96e7c084 100644 --- a/services/reference/zksync/json-rpc-methods/zks_estimatefee.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_estimatefee.mdx @@ -31,12 +31,12 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0", "id":2, "method": "zks_estimateFee", "params": [ { "from": "0x1111111111111111111111111111111111111111", "to":"0x2222222222222222222222222222222222222222", "data": "0xffffffff" } ] }' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0", "id":2, "method": "zks_estimateFee", "params": [ { "from": "0x1111111111111111111111111111111111111111", "to":"0x2222222222222222222222222222222222222222", "data": "0xffffffff" } ] }' +``` @@ -44,17 +44,19 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```json - { - "jsonrpc": "2.0", - "result": { - "gas_limit": "0x156c00", - "gas_per_pubdata_limit": "0x143b", - "max_fee_per_gas": "0xee6b280", - "max_priority_fee_per_gas": "0x0" - }, - "id": 2 - } - ``` + +```json +{ + "jsonrpc": "2.0", + "result": { + "gas_limit": "0x156c00", + "gas_per_pubdata_limit": "0x143b", + "max_fee_per_gas": "0xee6b280", + "max_priority_fee_per_gas": "0x0" + }, + "id": 2 +} +``` + \ No newline at end of file diff --git a/services/reference/zksync/json-rpc-methods/zks_getallaccountbalances.mdx b/services/reference/zksync/json-rpc-methods/zks_getallaccountbalances.mdx index 6d2201b89d..a9b77a7b0b 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getallaccountbalances.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getallaccountbalances.mdx @@ -24,12 +24,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getAllAccountBalances", "params": [ "0x98E9D288743839e96A8005a6B51C770Bbf7788C0" ]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getAllAccountBalances", "params": [ "0x98E9D288743839e96A8005a6B51C770Bbf7788C0" ]}' +``` + @@ -37,14 +38,16 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```json - { - "jsonrpc": "2.0", - "result": { - "0x0000000000000000000000000000000000000000": "0x2fbd72a1121b3100" - }, - "id": 2 - } - ``` + +```json +{ + "jsonrpc": "2.0", + "result": { + "0x0000000000000000000000000000000000000000": "0x2fbd72a1121b3100" + }, + "id": 2 +} +``` + \ No newline at end of file diff --git a/services/reference/zksync/json-rpc-methods/zks_getbridgecontracts.mdx b/services/reference/zksync/json-rpc-methods/zks_getbridgecontracts.mdx index cba07d6b05..fe4cd0411c 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getbridgecontracts.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getbridgecontracts.mdx @@ -29,12 +29,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBridgeContracts", "params": []}' \ - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBridgeContracts", "params": []}' \ +``` + diff --git a/services/reference/zksync/json-rpc-methods/zks_getbytecodebyhash.mdx b/services/reference/zksync/json-rpc-methods/zks_getbytecodebyhash.mdx index dc3ffd6c29..d8dd2c4bb4 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getbytecodebyhash.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getbytecodebyhash.mdx @@ -38,25 +38,26 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```json - { - "jsonrpc": "2.0", - "result": [ - 0, - 4, - 0, - 0, - 0, - 0, - 0, - 2, - 0, - 11, - ..., - ... - ], - "id": 1 - } - ``` + +```json +{ + "jsonrpc": "2.0", + "result": [ + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 11, + ... + ], + "id": 1 +} +``` + \ No newline at end of file diff --git a/services/reference/zksync/json-rpc-methods/zks_getrawblocktransactions.mdx b/services/reference/zksync/json-rpc-methods/zks_getrawblocktransactions.mdx index 67fa55ed33..8698f66a47 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getrawblocktransactions.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getrawblocktransactions.mdx @@ -47,12 +47,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getRawBlockTransactions", "params": [5817]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getRawBlockTransactions", "params": [5817]}' +``` + diff --git a/services/reference/zksync/quickstart.md b/services/reference/zksync/quickstart.md index 54e82bbb2e..37b989f3a7 100644 --- a/services/reference/zksync/quickstart.md +++ b/services/reference/zksync/quickstart.md @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://zksync-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) @@ -91,11 +91,11 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta Replace `YOUR-API-KEY` with your actual Infura API key. ```javascript title="index.js" - const axios = require('axios'); + const axios = require("axios"); - axios.post('https://zksync-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', + axios.post("https://zksync-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", params: [], id: 1 }) @@ -126,9 +126,9 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta Replace `YOUR-API-KEY` with your actual Infura API key. ```javascript title="index.js" - const ethers = require('ethers'); + const ethers = require("ethers"); - const provider = new ethers.providers.JsonRpcProvider('https://zksync-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider("https://zksync-mainnet.infura.io/v3/YOUR-API-KEY"); provider.getBlockNumber() .then(blockNumber => { @@ -161,16 +161,16 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta import requests import json - url = 'https://zksync-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://zksync-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'} + headers = {"content-type": "application/json"} response = requests.post(url, data=json.dumps(payload), headers=headers).json()