⚡

# Binance Smart Chain Integration

Complete guide for integrating BSC networks into your Bicrypto Ecosystem

## 📖 Overview

This guide shows you how to integrate Binance Smart Chain (BSC) networks into your Bicrypto Ecosystem. You'll add BSC credentials in `.env`, acquire API and RPC endpoints, then set up wallets and tokens in the admin panel—much like you would for Ethereum.

Supported Networks

BSC Mainnet and Testnet are supported. BNB is used for transaction fees on BSC networks.

## 1️⃣ Configure Environment Variables

### BSC Environment Variables

Add the following BSC-specific variables to your `.env` file:

    # Binance Smart Chain Networks (mainnet, testnet)
    BSC_EXPLORER_API_KEY="YOUR_BSCSCAN_API_KEY"  # e.g., AI9Z3MDWUB8K...
    BSC_NETWORK="mainnet"
    BSC_MAINNET_RPC="https://bscrpc.com"
    BSC_MAINNET_RPC_WSS="wss://YOUR_MAINNET_WSS_PLACEHOLDER"
    BSC_TESTNET_RPC="https://YOUR_TESTNET_RPC_PLACEHOLDER"
    BSC_TESTNET_RPC_WSS="wss://YOUR_TESTNET_WSS_PLACEHOLDER"

• BSC_EXPLORER_API_KEY: Your BscScan API key for blockchain data

• BSC_NETWORK: Active network (mainnet or testnet)

• RPC/WSS URLs: HTTP and WebSocket endpoints for each network

## 2️⃣ Acquire API Keys and RPC Endpoints

BS

### BscScan API

Create an account at bscscan.com and generate an API key for blockchain data access.

`BSC_EXPLORER_API_KEY="your_key_here"`
RPC

### RPC Providers

Sign up for RPC services like GetBlock, BlastAPI, or others offering BSC endpoints with reliable uptime and generous limits.

`BSC_MAINNET_RPC="https://your-endpoint"`

## 3️⃣ Apply Environment Updates

## 4️⃣ Configure Master Wallet

## 5️⃣ Enable Tokens and Configure Fees

## 6️⃣ Custodial Wallets (For Non-Permit Tokens)

When Custodial Wallets Are Needed

Some tokens don't support the PERMIT feature for fee delegation. For these tokens, you'll need to deploy custodial wallets.

1

### Fund Master Wallet

Ensure your master wallet has sufficient BNB to cover gas fees for custodial wallet deployments and transactions.

2

### Deploy Custodial Wallet

Go to Admin → Extensions → Ecosystem → Custodial Wallets and deploy a new custodial wallet for BSC.

The platform will handle user deposits/withdrawals through this wallet, with the master wallet paying BNB gas fees.

## 🔍 BSC-Specific Considerations

### Lower Gas Fees

BSC typically has much lower gas fees than Ethereum, making it cost-effective for frequent transactions. Monitor BNB prices for optimal fee settings.

### Testnet Development

Use BSC Testnet for development. Set `BSC_NETWORK="testnet"` and acquire test BNB from faucets.

## 🔒 Security Best Practices