DEVELOPER DOCUMENTATION
Build on bStocksChain.
bStocksChain is a BSC sidechain designed for familiar EVM tooling, account-first experiences, and an ecosystem focused on bringing US equities onchain.
bStocksChain Mainnet is not live yet. Network identifiers and planned bStocksChain.com endpoints are listed below; protocol contract addresses and service activation remain TBD. Do not enable production writes before an activation notice and a successful chain ID check.
Network configuration
Keep every network value in environment variables. Do not ship deployer credentials, and do not enable production writes before Mainnet activation.
| Parameter | Mainnet | Testnet |
|---|---|---|
| Network name | bStocksChain Mainnet | bStocksChain Testnet |
| Chain ID | 643712891 | 46630 |
| Native currency | bSto | bSto |
| RPC URL | https://rpc.bStocksChain.com | https://bStocksChain.com/bstockschain-rpc |
| Block explorer | https://scan.bStocksChain.com | TBD |
| WebSocket RPC | wss://rpc.bStocksChain.com/ws | TBD |
# .env.local
BSTOCKSCHAIN_CHAIN_ID=643712891
BSTOCKSCHAIN_RPC_URL=https://rpc.bStocksChain.com
BSTOCKSCHAIN_EXPLORER_URL=https://scan.bStocksChain.com
BSTOCKSCHAIN_CONFIRMATIONS=1
BSTOCKSCHAIN_NETWORK_ACTIVE=falseConnect with the wallet widget
Use the bStocksChain wallet widget to connect mainstream wallets through Web3-Onboard with local injected-wallet fallback. It connects the wallet and switches to the configured bStocksChain network for the current environment.
<script src="/wallet-connect.js?v=20260801-chain-v1"></script>
const session = await window.bStocksChainWalletKit.connect();
console.log(session.address, session.label);Show the active account, keep switching explicit, and keep the application usable when a wallet request is rejected.
Read and write transactions
Verify the activation flag and active chain before every critical action. A broadcast hash is pending, not successful.
if (process.env.BSTOCKSCHAIN_NETWORK_ACTIVE !== 'true') {
throw new Error('bStocksChain Mainnet is not active');
}
const network = await provider.getNetwork();
if (network.chainId !== BigInt(643712891)) {
throw new Error('Connected RPC is not bStocksChain');
}
const hash = await walletClient.writeContract(request);
const confirmations = Number(process.env.BSTOCKSCHAIN_CONFIRMATIONS ?? 1);
const receipt = await publicClient.waitForTransactionReceipt({ hash, confirmations });
if (receipt.status !== 'success') throw new Error(`Transaction reverted: ${hash}`);- Simulate when your client supports it.
- Show contract, method, and parameters before signing.
- Store the hash after broadcast.
- Require a successful receipt before showing completion.
Deploy a contract
bStocksChain is BSC-aligned and uses standard EVM bytecode. Test against the official Testnet before any Mainnet deployment.
forge script script/Deploy.s.sol:Deploy \
--rpc-url "$BSTOCKSCHAIN_RPC_URL" \
--private-key "$DEPLOYER_PRIVATE_KEY" \
--broadcastRun explorer verification only after the official verifier integration is live. Keep deployer keys out of shell history and CI logs, then record the compiler version, optimizer settings, constructor parameters, bytecode hash, and admin authority for every production deployment.
Token requirements
Publish token identity, supply policy, control addresses, distribution, vesting, and risk information before requesting ecosystem integration.
Do not use hidden transfer taxes, unrestricted mint functions, or ambiguous owner permissions.
Integrate ecosystem protocols
bStocksChainLaunch
Prepare a structured launch configuration. Present allocations, vesting, minting, and metadata policy in plain language before a creator submits.
bStocksChainX
Read market configuration from contracts, quote margin and liquidation risk before signing, and use fixed-point integers for all settlement logic.
bStocksChainForecast
Show the market question, outcome set, resolution source, deadline, and settlement state before a participant takes a position.
Mainnet launch checklist
- bStocksChain has announced activation and RPC returns Chain ID
643712891 - Public RPC, WebSocket, explorer, and verifier services have passed availability checks
- Wallet network switching tested with supported providers
- Contracts deployed and verified from approved authority
- Read and write RPC failures tested
- Transaction receipts required before success is shown
- Token authority and distribution visible to users
- Production monitoring and incident contacts ready
For the full reference, implementation notes, and release guidance, read the Markdown integration guide.
