Binance Smart Chain
Via Fortmatic SDK, you can interact with Binance Smart Chain. Binance Smart Chain is EVM compatible so you can directly follow the configuration guide to starting.

Configure Binance Smart Chain

Smart Chain

Mainnet Block Explorer URL: https://bscscan.com​
1
import Fortmatic from 'fortmatic';
2
import Web3 from 'web3';
3
​
4
const BSCOptions = {
5
/* Smart Chain mainnet RPC URL */
6
rpcUrl: 'https://bsc-dataseed.binance.org/',
7
chainId: 56 // Smart Chain mainnet chain id
8
}
9
​
10
// Setting network to Smart Chain
11
const fm = new Fortmatic('YOUR_LIVE_API_KEY', BSCOptions);
12
window.web3 = new Web3(fm.getProvider());
Copied!

Smart Chain - Testnet

Testnet Block Explorer URL: https://testnet.bscscan.com​
1
import Fortmatic from 'fortmatic';
2
import Web3 from 'web3';
3
​
4
const BSCOptions = {
5
/* Smart Chain - Testnet RPC URL */
6
rpcUrl: 'https://data-seed-prebsc-1-s1.binance.org:8545/',
7
chainId: 97 // Smart Chain - Testnet chain id
8
}
9
​
10
​
11
// Setting network to Smart Chain - Testnet
12
const fm = new Fortmatic('YOUR_TEST_API_KEY', BSCOptions);
13
window.web3 = new Web3(fm.getProvider());
Copied!
Last modified 8mo ago