# Binance Smart Chain

## Configure Binance Smart Chain

### Smart Chain

Mainnet Block Explorer URL: <https://bscscan.com>

```javascript
import Fortmatic from 'fortmatic';
import Web3 from 'web3';

const BSCOptions = {
  /* Smart Chain mainnet RPC URL */
  rpcUrl: 'https://bsc-dataseed.binance.org/', 
  chainId: 56 // Smart Chain mainnet chain id
}

// Setting network to Smart Chain
const fm = new Fortmatic('YOUR_LIVE_API_KEY', BSCOptions);
window.web3 = new Web3(fm.getProvider());
```

### Smart Chain - Testnet

Testnet Block Explorer URL: <https://testnet.bscscan.com>

```javascript
import Fortmatic from 'fortmatic';
import Web3 from 'web3';

const BSCOptions = {
/* Smart Chain - Testnet RPC URL */
  rpcUrl: 'https://data-seed-prebsc-1-s1.binance.org:8545/', 
  chainId: 97 // Smart Chain - Testnet chain id
}


// Setting network to Smart Chain - Testnet
const fm = new Fortmatic('YOUR_TEST_API_KEY', BSCOptions);
window.web3 = new Web3(fm.getProvider());
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fortmatic.com/web3-integration/binance-smart-chain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
