Binance Smart Chain

Binance Smart Chain

Binance implementation guide

How to Build a Decentralized App on Binance Smart Chain with Magic

View guide

#Installation

Via Magic SDK, you can interact with Binance Smart Chain. Binance Smart Chain is EVM compatible so you can directly follow the Ethereum installation.

#Configure Binance Smart Chain

#Smart Chain

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

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

// Setting network to Smart Chain
const magic = new Magic('YOUR_PUBLISHABLE_API_KEY', { network: BSCOptions });

#Smart Chain - Testnet

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

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

// Setting network to Smart Chain - Testnet
const magic = new Magic('YOUR_PUBLISHABLE_API_KEY', { network: BSCOptions });

Did you find what you were looking for?

Did you find what you were looking for?