-
-
Notifications
You must be signed in to change notification settings - Fork 958
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add BNB Smart Chain support. (#1458)
* Add Binance Smart Chain support. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Add what's new. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Add logo. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * Add logo. Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> * update spacing * fix broken link * minor copy edit --------- Signed-off-by: bgravenorst <byron.gravenorst@consensys.net> Co-authored-by: Joan E <153745173+joaniefromtheblock@users.noreply.github.com>
- Loading branch information
1 parent
cd2c05e
commit b7aed8c
Showing
102 changed files
with
2,989 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
description: BNB Smart Chain network documentation | ||
--- | ||
|
||
import CardList from "@site/src/components/CardList" | ||
|
||
# BNB Smart Chain | ||
|
||
:::note Decentralized Infrastructure Network (DIN) | ||
|
||
BNB Smart Chain (BSC) is supported through the [DIN](https://www.infura.io/solutions/decentralized-infrastructure-service) service, | ||
meaning calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies). | ||
|
||
Infura provides Open Beta access to BSC. During this period, there might be feature limitations. | ||
Performance issues are not expected, but they are possible as we optimize and stabilize the service. | ||
|
||
Currently, only near head requests (the last 128 blocks) are supported in the | ||
BSC service. Archive requests are not currently supported. Be aware of this limitation when making calls | ||
to API calls to methods such as [`eth_getStorageAt`](./json-rpc-methods/eth_getstorageat.mdx), | ||
[`eth_getTransactionReceipt`](./json-rpc-methods/eth_gettransactionreceipt.mdx), and | ||
[`eth_getTransactionByHash`](./json-rpc-methods/eth_gettransactionbyhash.mdx). | ||
|
||
::: | ||
|
||
BNB Smart Chain is a self-sovereign blockchain with elected validators running a Proof of Staked | ||
Authority (PoSA) consensus protocol. It is EVM-compatible and supports existing Ethereum tooling. | ||
|
||
:::info See also | ||
|
||
For more information, refer to the official [BSC documentation](https://docs.bnbchain.org/bnb-smart-chain/). | ||
|
||
::: | ||
|
||
Select an option below to get started with the BSC network. | ||
|
||
<CardList | ||
items={[ | ||
{ | ||
href: "quickstart", | ||
title: "Quickstart", | ||
description: "Learn how to quickly connect and make calls to the BNB Smart Chain network." | ||
}, | ||
{ | ||
href: "json-rpc-methods", | ||
title: "JSON-RPC APIs", | ||
description: "View the APIs available for communicating with the BNB Smart Chain network." | ||
}, | ||
{ | ||
href: "../../../developer-tools/dashboard/get-started/create-api/", | ||
title: "Create an API key", | ||
description: "Learn how to create an API key and secure and share it with your team." | ||
} | ||
]} | ||
/> | ||
|
||
## Partners and privacy policies | ||
|
||
The following partners provide access to the BSC network: | ||
<!-- markdown-link-check-disable --> | ||
- Chainstack ([Terms of Service](https://chainstack.com/tos/), [Privacy Policy](https://chainstack.com/privacy/)) | ||
- Infstones ([Privacy Policy](https://infstones.com/terms/privacy-notice)) | ||
- Liquify ([Privacy Policy](https://www.liquify.com/Liquify_RPC_PP.pdf)) | ||
<!-- markdown-link-check-enable --> |
22 changes: 22 additions & 0 deletions
22
services/reference/bnb-smart-chain/json-rpc-methods/_eth_accounts-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id":1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id":1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
services/reference/bnb-smart-chain/json-rpc-methods/_eth_blocknumber-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
services/reference/bnb-smart-chain/json-rpc-methods/_eth_call-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-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}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-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}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
services/reference/bnb-smart-chain/json-rpc-methods/_eth_chainid-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id":1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id":1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
services/reference/bnb-smart-chain/json-rpc-methods/_eth_estimategas-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-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}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id":1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
services/reference/bnb-smart-chain/json-rpc-methods/_eth_gasprice-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method":"eth_gasPrice", "params": [], "id":1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
services/reference/bnb-smart-chain/json-rpc-methods/_eth_getbalance-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
...ices/reference/bnb-smart-chain/json-rpc-methods/_eth_getblockbyhash-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-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}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method":"eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id":1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
...es/reference/bnb-smart-chain/json-rpc-methods/_eth_getblockbynumber-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params":["0x5BAD55", false], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params":["0x5BAD55", false], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
...es/reference/bnb-smart-chain/json-rpc-methods/_eth_getblockreceipts-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["latest"], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["latest"], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
...nb-smart-chain/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
22 changes: 22 additions & 0 deletions
22
...-smart-chain/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
<Tabs> | ||
<TabItem value="cURL"> | ||
|
||
```bash | ||
curl https://bsc-mainnet.infura.io/v3/YOUR-API-KEY \ | ||
-X POST \ | ||
-H "Content-Type: application/json" \ | ||
-d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="WSS"> | ||
|
||
```bash | ||
wscat -c wss://bsc-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> |
Oops, something went wrong.