├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── CNAME ├── LICENSE ├── README.md ├── SUPPORT.md ├── docs ├── build-on-opbnb │ ├── bep20-crosschain.md │ ├── deposit-to-opbnb.md │ ├── developer-cheat-sheet.md │ ├── developer-tools.md │ ├── geth-sync.md │ ├── getting-started.md │ ├── multisig-wallet.md │ ├── network-faucet.md │ ├── opbnb-network-info.md │ ├── set-gas-price.md │ ├── wallet-configuration.md │ └── withdraw-from-opbnb.md ├── contact.md ├── contribute.md ├── core-concepts │ ├── account-abstraction-on-opbnb.md │ ├── architecture.md │ ├── challenger.md │ ├── cross-chain.md │ ├── difference-BSC-Eth.md │ ├── difference-L2.md │ ├── gas-and-fees.md │ ├── need-for-opbnb.md │ ├── opbnb-contracts.md │ ├── optimisations-on-opstack.md │ ├── raas.md │ └── why-opstack.md ├── faq │ ├── build-on-opbnb-faqs.md │ ├── cross-chain-faqs.md │ ├── gas-and-fees-faqs.md │ ├── opbnb-bridge-faqs.md │ ├── opbnb-faq.md │ └── protocol-faqs.md ├── intro.md ├── intro │ └── why-opbnb.md ├── monitor │ └── rpc_nodes.json ├── tech-specs │ ├── censorship-resistence.md │ ├── parameters.md │ ├── plans.md │ └── solidity-difference.md └── tutorials │ ├── chain-configuration.md │ ├── creating-your-own-l2-rollup-testnet.md │ ├── full-stack-dapp.md │ ├── opbnbscan-verify-hardhat-truffle.md │ ├── pbss-pebble.md │ ├── run-nodes-best-practices.md │ ├── running-a-local-development-environment.md │ └── running-a-local-node.md ├── docusaurus.config.js ├── package-lock.json ├── package.json ├── sidebars.js ├── src ├── components │ └── HomepageFeatures │ │ ├── index.js │ │ └── styles.module.css ├── css │ └── custom.css └── pages │ ├── index.js │ ├── index.module.css │ └── markdown-page.md ├── static ├── .nojekyll ├── image-20231103144553832.png └── img │ ├── 74pMzvad03dbTmcQx6wGiGfqlfrtWzhxUBRUYooy5vcwtfbjVbKlK71mknIozAWagJz6NFsoBqjIiClFbd_0KrpSsuIY5qs6h81XLGsqvAV-Gsh4CPOLCqmfIOCYUxe1kPri8US7jPEfy_aJFmGwIJQ.png │ ├── D63yQpYlnLUseqSJWf403Go4mrRaSQWM6LJ6EMsX6lJJH2BXlBEmy342JJp3hTW08mcjyClg4X6UmAOCTiTt1Hoq8APLdbyx8Z7UKtf0IYYYrwy5ZPtfcLv5LHgvEY7BXoLD6jUUlOnfe27gP0QhmEs.png │ ├── L1-L2.png │ ├── LlvtsQFvpzHkXr6s3aWyOLW6agzcChIOW3xx1sakQJRRSP448OS2Q7jdDGTLS77Ve6gbAZuHrMu16CqVavhpduOerSJCXvR70RZ6HLe03UhYyHtfHd9HqChc55XLdrG9Ogq922OCUt2Wk64wbmYawG0.png │ ├── add-bsc-metamask.png │ ├── add-bsc-trustwallet.png │ ├── advanced-setting.png │ ├── banner.png │ ├── bridge-supported-tokens.png │ ├── bsc-testnet-config.png │ ├── docusaurus.png │ ├── evm-state-data-access-optimization.png │ ├── faqs │ ├── Withdraw-confirmation.png │ ├── bridge-estimate.png │ ├── mm-balance-mismatch.png │ ├── wallet-estimate.png │ └── zkBridge_issue.png │ ├── faucet-tbnb.png │ ├── favicon.ico │ ├── gas-price-setting.png │ ├── image-20231027125614827.png │ ├── logo.svg │ ├── online-faucet-bnb.png │ ├── opBNB-arch.png │ ├── opBNB-bridge.png │ ├── opBNB-deploy-contract.PNG │ ├── opBNB-intro.png │ ├── opBNB-testnet-config.png │ ├── opbnb-connect-wallet.PNG │ ├── opbnb-helloworld-ui-2.PNG │ ├── opbnb-helloworld-ui.PNG │ ├── opbnb-metamask-tx.PNG │ ├── pool-sharing.png │ ├── prefetch.png │ ├── tutorial │ ├── docsVersionDropdown.png │ └── localeDropdown.png │ ├── undraw_docusaurus_mountain.svg │ ├── undraw_docusaurus_react.svg │ ├── undraw_docusaurus_tree.svg │ ├── why-opbnb-tx-stats.png │ ├── withdraw-confirm-details.png │ ├── withdraw-confirm.png │ ├── withdraw-status.png │ └── withdraw.png └── yarn.lock /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | # Review gh actions docs if you want to further define triggers, paths, etc 8 | # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on 9 | 10 | jobs: 11 | deploy: 12 | name: Deploy to GitHub Pages 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | - name: Cache dependencies and build artifacts 17 | uses: actions/cache@v3 18 | with: 19 | path: | 20 | build/ 21 | node_modules/ 22 | key: cache 23 | - uses: actions/setup-node@v3 24 | with: 25 | node-version: 18 26 | - name: Install dependencies 27 | run: yarn install 28 | - name: Build website 29 | run: yarn build 30 | 31 | # Popular action to deploy to GitHub Pages: 32 | # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus 33 | - name: Deploy to GitHub Pages 34 | uses: peaceiris/actions-gh-pages@v3 35 | with: 36 | github_token: ${{ secrets.GITHUB_TOKEN }} 37 | # Build output to publish to the `gh-pages` branch: 38 | publish_dir: ./build 39 | # The following lines assign commit authorship to the official 40 | # GH-Actions bot for deploys to `gh-pages` branch: 41 | # https://github.com/actions/checkout/issues/13#issuecomment-724415212 42 | # The GH actions bot is used by default if you didn't specify the two fields. 43 | # You can swap them out with your own user credentials. 44 | user_name: github-actions[bot] 45 | user_email: 41898282+github-actions[bot]@users.noreply.github.com 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | .vscode 22 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | opbnb.bnbchain.org 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Palo Alto Networks 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # opBNB Official Documentation 2 | 3 | ## Overview 4 | 5 | The opBNB network is the Layer 2 scaling solution for the BNB Smart Chain powered by [bedrock version](https://community.optimism.io/docs/developers/bedrock/) of Optimism opStack. 6 | 7 | This is the GitHub repo of the official documentation for opBNB. This app is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. 8 | 9 | ### Prerequisites 10 | 11 | - **Node** _version >= 16 or above_ 12 | 13 | - _node -v_ 14 | - v16.14.0 15 | 16 | - **Yarn** _version >= 1.5 _ 17 | - _yarn --version_ 18 | - 1.22.19 19 | 20 | ### How to Run Locally 21 | 22 | Clone the repository and run the following commands. 23 | 24 | ### Installing Dependencies 25 | 26 | - Install the packages. 27 | 28 | ```bash 29 | $ yarn install 30 | ``` 31 | 32 | - Start local development server 33 | 34 | ```bash 35 | $ yarn start 36 | ``` 37 | 38 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 39 | 40 | ### Build 41 | 42 | We recommend to use the yarn package for building and deploying this website. 43 | 44 | ```bash 45 | $ yarn build 46 | ``` 47 | 48 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 49 | 50 | ### Build and Serve locally 51 | 52 | ```bash 53 | $ yarn start 54 | ``` 55 | 56 | ### Serve Locally after build is created 57 | 58 | ```bash 59 | $ yarn serve 60 | ``` 61 | 62 | The website is run locally on your default browser on http://localhost:3000. 63 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | Community Supported 2 | 3 | The software and templates in the repo are released under an as-is, best effort, 4 | support policy. This software should be seen as community supported and Palo 5 | Alto Networks will contribute our expertise as and when possible. We do not 6 | provide technical support or help in using or troubleshooting the components of 7 | the project through our normal support options such as Palo Alto Networks 8 | support teams, or ASC (Authorized Support Centers) partners and backline support 9 | options. The underlying product used (the VM-Series firewall) by the scripts or 10 | templates are still supported, but the support is only for the product 11 | functionality and not for help in deploying or using the template or script 12 | itself. Unless explicitly tagged, all projects or work posted in our GitHub 13 | repository (at https://github.com/PaloAltoNetworks) or sites other than our 14 | official Downloads page on https://support.paloaltonetworks.com are provided 15 | under the best effort policy. 16 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/bep20-crosschain.md: -------------------------------------------------------------------------------- 1 | # Arbitrary BEP20 Cross-chain 2 | 3 | You can use the [opBNB bridge](https://opbnb-bridge.bnbchain.org/deposit) or third-party bridges like [zkBridge](https://zkbridge.com/opbnb) and [rhino.fi](https://app.rhino.fi/bridge?token=BNB&chainOut=OPBNB&chain=BINANCE) to easily deposit and withdraw most mainstream BEP20 tokens on BSC. 4 | 5 | If a token is not supported by these bridges, you have the option to deploy your own L2 mirror token contract on opBNB. 6 | This allows for permissionless cross-chain transfer of these tokens. 7 | 8 | This guide will help you deploy your L2 mirror token contract on opBNB and demonstrate how to use it for transferring tokens between BSC and opBNB. 9 | 10 | ## Deploying a L2 Mirror Token Contract 11 | 12 | There is a pre-deployed [OptimismMintableERC20Factory contract](https://github.com/bnb-chain/opbnb/blob/develop/packages/contracts-bedrock/contracts/universal/OptimismMintableERC20Factory.sol) on opBNB that allows you to deploy a L2 token by calling a function of the factory contract. 13 | The address of the contract is `0x4200000000000000000000000000000000000012`. 14 | 15 | The function signature and the emitted event are as follows: 16 | 17 | ``` 18 | /** 19 | * @notice Emitted whenever a new OptimismMintableERC20 is created. 20 | * 21 | * @param localToken Address of the created token on the local chain. 22 | * @param remoteToken Address of the corresponding token on the remote chain. 23 | * @param deployer Address of the account that deployed the token. 24 | */ 25 | event OptimismMintableERC20Created( 26 | address indexed localToken, 27 | address indexed remoteToken, 28 | address deployer 29 | ); 30 | 31 | /** 32 | * @notice Creates an instance of the OptimismMintableERC20 contract. 33 | * 34 | * @param _remoteToken Address of the token on the remote chain. 35 | * @param _name ERC20 name. 36 | * @param _symbol ERC20 symbol. 37 | * 38 | * @return Address of the newly created token. 39 | */ 40 | function createOptimismMintableERC20( 41 | address _remoteToken, 42 | string memory _name, 43 | string memory _symbol 44 | ) public returns (address) {} 45 | ``` 46 | 47 | `_remoteToken` is the address of the token on the remote chain, which is BSC in this case. 48 | `_name` and `_symbol` should be the same with the name and symbol of the token on BSC. 49 | The decimal of the token on opBNB is always 18. 50 | 51 | Here is the [transaction](https://opbnbscan.com/tx/0x4e3da7329cdf0ad67fb82a2a02978518f988125221229747afe90886f7e6512b) that generates the [FDUSD token](https://opbnbscan.com/address/0x50c5725949a6f0c72e6c4a641f24049a917db0cb) on opBNB. 52 | 53 | **Warning**: It does not support certain BEP20 configurations: 54 | - [Fee on transfer tokens](https://github.com/d-xo/weird-erc20#fee-on-transfer) 55 | - [Tokens that modify balances without emitting a Transfer event](https://github.com/d-xo/weird-erc20#balance-modifications-outside-of-transfers-rebasingairdrops) 56 | 57 | ## Cross-chain Transfer with JS SDK 58 | 59 | Once you have deployed your own L2 mirror token contract, you can use the JS SDK to transfer tokens between BSC and opBNB. 60 | 61 | The following script is a TypeScript demo script. 62 | It uses `ethers.js` and `@eth-optimism/sdk` to transfer tokens between BSC and opBNB. 63 | 64 | You can save the script as `erc20CrosschainTransfer.ts` and run it with the following command(ensure that you have installed [deno](https://docs.deno.com/runtime/manual#install-deno)): 65 | 66 | ```bash 67 | deno run -A erc20CrosschainTransfer.ts 68 | ``` 69 | 70 | Feel free to modify the script to suit your needs. 71 | 72 | ```typescript 73 | import { Contract, ethers, Signer, Wallet } from "npm:ethers@^5"; 74 | import "https://deno.land/x/dotenv/load.ts"; 75 | import { CrossChainMessenger, ETHBridgeAdapter } from "npm:@eth-optimism/sdk"; 76 | import * as optimismSDK from "npm:@eth-optimism/sdk"; 77 | 78 | const gwei = BigInt(1e9); 79 | const BridgeConfigTestnet = { 80 | l1URL: "https://bsc-testnet.bnbchain.org", 81 | l2URL: "https://opbnb-testnet-rpc.bnbchain.org", 82 | l1ChainID: 97, 83 | l2ChainID: 5611, 84 | contracts: { 85 | AddressManager: "0x0000000000000000000000000000000000000000", 86 | StateCommitmentChain: "0x0000000000000000000000000000000000000000", 87 | CanonicalTransactionChain: "0x0000000000000000000000000000000000000000", 88 | BondManager: "0x0000000000000000000000000000000000000000", 89 | L1CrossDomainMessenger: "0xD506952e78eeCd5d4424B1990a0c99B1568E7c2C", 90 | L1StandardBridge: "0x677311Fd2cCc511Bbc0f581E8d9a07B033D5E840", 91 | OptimismPortal: "0x4386C8ABf2009aC0c263462Da568DD9d46e52a31", 92 | L2OutputOracle: "0xFf2394Bb843012562f4349C6632a0EcB92fC8810", 93 | }, 94 | l1GasPrice: 5n * gwei, 95 | l1Explorer: "https://testnet.bscscan.com", 96 | l2Explorer: "https://testnet.opbnbscan.com", 97 | }; 98 | 99 | const BridgeConfigMainnet = { 100 | l1URL: "https://bsc-dataseed.bnbchain.org", 101 | l2URL: "https://opbnb-mainnet-rpc.bnbchain.org", 102 | l1ChainID: 56, 103 | l2ChainID: 204, 104 | contracts: { 105 | AddressManager: "0x0000000000000000000000000000000000000000", 106 | StateCommitmentChain: "0x0000000000000000000000000000000000000000", 107 | CanonicalTransactionChain: "0x0000000000000000000000000000000000000000", 108 | BondManager: "0x0000000000000000000000000000000000000000", 109 | L1CrossDomainMessenger: "0xd95D508f13f7029CCF0fb61984d5dfD11b879c4f", 110 | L1StandardBridge: "0xF05F0e4362859c3331Cb9395CBC201E3Fa6757Ea", 111 | OptimismPortal: "0x7e2419F79c9546B9A0E292Fd36aC5005ffed5495", 112 | L2OutputOracle: "0x0d61A015BAeF63f6740afF8294dAc278A494f6fA", 113 | }, 114 | l1GasPrice: 3n * gwei, 115 | l1Explorer: "https://bscscan.com", 116 | l2Explorer: "https://opbnbscan.com", 117 | }; 118 | 119 | const BridgeConfig = BridgeConfigTestnet; 120 | 121 | const privateKey = Deno.env.get("PRIVATE_KEY")!; 122 | const l1RpcProvider = new ethers.providers.JsonRpcProvider(BridgeConfig.l1URL); 123 | const l2RpcProvider = new ethers.providers.JsonRpcProvider(BridgeConfig.l2URL); 124 | const wallet = new Wallet(privateKey); 125 | const l1Signer = wallet.connect(l1RpcProvider); 126 | const l2Signer = wallet.connect(l2RpcProvider); 127 | let crossChainMessenger: CrossChainMessenger; 128 | 129 | const l1BUSDAddr = "0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee"; 130 | const l2BUSDAddr = "0xa9aD1484D9Bfb27adbc2bf50A6E495777CC8cFf2"; 131 | 132 | function setup() { 133 | crossChainMessenger = new CrossChainMessenger({ 134 | l1ChainId: BridgeConfig.l1ChainID, 135 | l2ChainId: BridgeConfig.l2ChainID, 136 | l1SignerOrProvider: l1Signer, 137 | l2SignerOrProvider: l2Signer, 138 | bedrock: true, 139 | contracts: { 140 | l1: BridgeConfig.contracts, 141 | l2: optimismSDK.DEFAULT_L2_CONTRACT_ADDRESSES, 142 | }, 143 | }); 144 | const ethBridgeAdapter = new ETHBridgeAdapter( 145 | { 146 | messenger: crossChainMessenger, 147 | l1Bridge: BridgeConfig.contracts.L1StandardBridge, 148 | l2Bridge: "0x4200000000000000000000000000000000000010", 149 | }, 150 | ); 151 | crossChainMessenger.bridges.ETH = ethBridgeAdapter; 152 | } 153 | 154 | async function depositERC20() { 155 | const tx = await crossChainMessenger.depositERC20(l1BUSDAddr, l2BUSDAddr, 1, { 156 | overrides: { 157 | gasPrice: BridgeConfig.l1GasPrice, 158 | }, 159 | }); 160 | await tx.wait(); 161 | console.log( 162 | `depositBNB Transaction hash (on L1): ${BridgeConfig.l1Explorer}/tx/${tx.hash}`, 163 | ); 164 | console.log( 165 | `please check ${BridgeConfig.l2Explorer}/address/${l1Signer.address}?tab=deposit&p=1 for the deposit txn on L2`, 166 | ); 167 | } 168 | 169 | async function withdrawERC20(): Promise { 170 | const tx = await crossChainMessenger.withdrawERC20( 171 | l1BUSDAddr, 172 | l2BUSDAddr, 173 | 1, 174 | { 175 | overrides: { 176 | maxPriorityFeePerGas: 1, 177 | maxFeePerGas: 10000, 178 | }, 179 | }, 180 | ); 181 | await tx.wait(); 182 | console.log( 183 | `withdrawBNB Transaction hash (on L2): ${BridgeConfig.l2Explorer}/tx/${tx.hash}`, 184 | ); 185 | return tx.hash; 186 | } 187 | 188 | async function proveWithdrawal(hash: string, wait: boolean = true) { 189 | while (true) { 190 | try { 191 | const tx = await crossChainMessenger.proveMessage(hash, { 192 | overrides: { 193 | gasPrice: BridgeConfig.l1GasPrice, 194 | }, 195 | }); 196 | await tx.wait(); 197 | console.log( 198 | `proveWithdrawal Transaction hash (on L1): ${BridgeConfig.l1Explorer}/tx/${tx.hash}`, 199 | ); 200 | break; 201 | } catch (error) { 202 | console.log(error.message); 203 | if (error.message.includes("state root for message not yet published")) { 204 | if (wait) { 205 | console.log( 206 | `Waiting for status to be READY_TO_PROVE, current time: ${new Date()}`, 207 | ); 208 | } else { 209 | throw error; 210 | } 211 | } else { 212 | throw error; 213 | } 214 | } 215 | } 216 | } 217 | 218 | async function finalizeWithdrawal(hash: string, wait: boolean = true) { 219 | while (true) { 220 | try { 221 | const tx = await crossChainMessenger.finalizeMessage(hash, { 222 | overrides: { 223 | gasPrice: BridgeConfig.l1GasPrice, 224 | }, 225 | }); 226 | await tx.wait(); 227 | console.log( 228 | `finalizeWithdrawal Transaction hash (on L1): ${BridgeConfig.l1Explorer}/tx/${tx.hash}`, 229 | ); 230 | break; 231 | } catch (error) { 232 | if ( 233 | error.message.includes( 234 | "proven withdrawal finalization period has not elapsed", 235 | ) 236 | ) { 237 | if (wait) { 238 | console.log( 239 | `Waiting for status to be READY_TO_FINALIZE, current time: ${new Date()}`, 240 | ); 241 | } else { 242 | throw error; 243 | } 244 | } else { 245 | throw error; 246 | } 247 | } 248 | } 249 | } 250 | 251 | async function main() { 252 | console.log("opbnbBridge demo"); 253 | 254 | setup(); 255 | // deposit ERC20 256 | await depositERC20() 257 | 258 | // withdraw ERC20 259 | const hash = await withdrawERC20(); 260 | await proveWithdrawal(hash); 261 | await finalizeWithdrawal(hash); 262 | } 263 | 264 | await main(); 265 | ``` 266 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/deposit-to-opbnb.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deposit Tokens to opBNB 3 | icon: code 4 | index: yes 5 | dir: 6 | order: 2 7 | --- 8 | 9 | :::caution 10 | This is a living document and is susceptible to changes. 11 | ::: 12 | 13 | # Deposit BNB(tBNB) to opBNB 14 | 15 | Before building or deploying any applications on the opBNB network, you must first deposit BNB(tBNB) as your gas token from BNB Smart Chain to opBNB. You can do this using the [opBNB bridge dApp(Testnet)](https://opbnb-testnet-bridge.bnbchain.org/) or [opBNB bridge dApp(Mainnet)](https://opbnb-bridge.bnbchain.org). 16 | 17 | Follow these steps to deposit tokens from BNB Smart Chain to opBNB: 18 | 19 | 1. Make sure you have BNB(tBNB) tokens in your wallet on the BNB Smart Chain. 20 | 2. In your wallet, switch your network to BNB Smart Chain. This is the Layer 1 network where your tokens currently are. 21 | 3. Enter the amount of BNB(tBNB) you want to deposit to the opBNB network. 22 | 4. Click "Deposit" to begin the transfer. 23 | 5. Your wallet will prompt you to confirm the transaction. Click "Confirm" to sign it and pay the required gas fee. 24 | 6. Once the transaction is processed, switch your network in your wallet to opBNB. The BNB amount you have deposited will appear in your wallet. 25 | 7. You can now build, deploy, and interact with dApps on the opBNB network using the BNB(tBNB) you deposited. To withdraw tokens from opBNB back to BNB Smart Chain, simply go to the bridge, enter the amount to withdraw, and confirm the transaction. The bridge will transfer your tokens from the opBNB network back to the BNB Smart Chain testnet. 26 | 27 | opBNB-bridge 32 | 33 | 36 | 37 | ## opBNB Bridge Supported Tokens 38 | 39 | The opBNB bridge supports you to transfer your assets from BSC to opBNB. The bridge supports most of the popular tokens, including BEP-20 tokens and wrapped bitcoin. If you want to test your applications that require these tokens, you can use the opBNB bridge to deposit and withdraw them in a simple and convenient way. 40 | 41 | opBNB-bridge-supported-tokens 46 | 47 | :::info 48 | 49 | The bridge page also provides a faucet link that allows you to claim these tokens from the faucet directly. To begin, simply click on the faucet link on the bridge page. 50 | ::: 51 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/developer-cheat-sheet.md: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | title: Developer Cheat Sheet 4 | index: yes 5 | 6 | --- 7 | 8 | # Hardware Requirements 9 | 10 | Setting up a node in the BNB Chain ecosystem requires understanding hardware requirements. The Minimum Hardware Requirement ensures efficient management of average transaction volumes, while the Recommended Hardware Requirement caters to high performance, capable of processing up to 100 million gas per second and handling 1k QPS (Query Per Second), ideal for heavy transaction loads or peak efficiency. 11 | 12 | ## Processor 13 | 14 | CPU Type: Intel Xeon Scalable processors (Ice Lake) or newer 15 | 16 | **op-node:** 17 | - Minimum: 4 cores 18 | - Recommended: 8 cores or more 19 | 20 | **op-geth:** 21 | - Minimum: 12 cores 22 | - Recommended: 16 cores or more 23 | 24 | ## Memory 25 | 26 | **op-node:** 27 | - Minimum: 4 GB 28 | - Recommended: 16 GB 29 | 30 | **op-geth:** 31 | - Minimum: 10 GB 32 | - Recommended: 32 GB 33 | 34 | ## Storage 35 | 36 | **op-node:** 37 | - No additional permanent storage required 38 | 39 | **op-geth:** 40 | - Requires 3000 IOPS or above 41 | - 1TB or more for extended transaction history 42 | 43 | ## Network 44 | 45 | - Stable network with 125MB/s or higher bandwidth 46 | 47 | # Running Your Own opBNB Node 48 | 49 | - Local development node setup: [Running a Local Development Environment](https://docs.bnbchain.org/opbnb-docs/docs/tutorials/running-a-local-development-environment) 50 | - Mainnet/testnet node setup: [Running a Local Node](https://docs.bnbchain.org/opbnb-docs/docs/tutorials/running-a-local-node) 51 | - Smart Contract Verification: [opBNBScan Verify with Hardhat & Truffle](https://docs.bnbchain.org/opbnb-docs/docs/tutorials/opbnbscan-verify-hardhat-truffle) 52 | 53 | # Performance Stability Optimization 54 | 55 | **L1 RPC Configuration:** 56 | 57 | Configure multiple L1 RPC endpoints for op-node setups on L2 solutions like opBNB to ensure synchronization with the L1 chain, security, data integrity, and reduced risk of single point of failure. 58 | 59 | For example: 60 | ```bash 61 | export L1_RPC1=https://bsc-dataseed.bnbchain.org 62 | export L1_RPC2=https://bsc.nodereal.io 63 | --l1=rpc1,rpc2… 64 | ``` 65 | Optimize L1 receipt retrieval performance 66 | - **op-node:** `--l1.rpckind=bsc_fullnode` 67 | 68 | 69 | **L2 Sync Mode Settings:** 70 | 71 | - **op-geth:** `--gcmode=archive` 72 | - **op-node:** `--l2.engine-sync=true` 73 | 74 | # Node Health Monitoring 75 | 76 | ## Import JSON Model 77 | 78 | Monitor your node's health by importing the [rpc_nodes.json](../monitor/rpc_nodes.json) model. 79 | 80 | ## Important Metrics 81 | 82 | - **chain_head_header:** Indicates the current unsafe block number of the node. A non-increasing number suggests syncing issues; a decreasing number indicates reorgs. 83 | - **rpc_duration_all:** Histogram of RPC server request durations. 84 | - **rpc_requests:** Total requests to the RPC server. 85 | - **p2p_peers:** Number of peers connected to op-geth. Essential for syncing through the engine. If zero, the op-geth cannot sync. 86 | - **op_node_default_peer_count:** Number of peers connected to op-node. Without peers, the op-node cannot sync unsafe blocks, leading to lag behind the sequencer due to reliance on L1 syncing. 87 | 88 | --- -------------------------------------------------------------------------------- /docs/build-on-opbnb/developer-tools.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Infra and Tooling Readiness 3 | index: yes 4 | --- 5 | 6 | One of our main objectives is to expand the adoption and utility of opBNB as a high performance and low cost Layer 2 chain on the BNB Smart Chain. To achieve this goal, we have to ensure that our underlying technology is robust, scalable and user-friendly. That is why we are committed to developing and improving the core infrastructure and tools that support opBNB and its community of users, hosts and developers. Below are the ecosystem we are building for the opBNB. 7 | 8 | # For All dApps 9 | 10 | **Binance Exchange Support** 11 | 12 | Binance has supported deposit and withdrawal on **7th Nov**. The initial list is BNB, FDUSD, and USDT as a start. 13 | 14 | **Node Providers** 15 | 16 | Needless to mention that the stability of RPC nodes is crucial to any blockchain, in this instance BNB Chain has **NodeReal** who is one of opBNB early and core contributors to anchor this task. 17 | 18 | NodeReal RPC can be accessed through their [API marketplace](https://nodereal.io/api-marketplace/explore?chains=opbnb). For common/public nodes, communities can access[ BNB ChainList](https://www.bnbchainlist.org/). 19 | 20 | **Wallet** 21 | 22 | Crypto/Digital wallet serves as an entry point for users to access blockchain. opBNB have known wallets providing access to opBNB such as [Metamask and Trustwallet](https://docs.bnbchain.org/opbnb-docs/docs/build-on-opbnb/wallet-configuration), leading the front. 23 | 24 | On **Account Abstraction(AA)**, [CyberConnect](https://cyberconnect.me/), [Particle Network](https://wallet.particle.network/), [Biconomy](https://docs.biconomy.io/supportedchains/) has already integrated with opBNB. 25 | 26 | **MultiSig** wallet BNB Chain has provided its own [Safe Multi-Sig Wallet](https://docs.bnbchain.org/opbnb-docs/docs/build-on-opbnb/multisig-wallet). 27 | 28 | Wallet as a Service[WaaS] 29 | 30 | Wallet-as-a-Service (WaaS) streamlines the integration of digital wallets into applications, allowing businesses to manage cryptocurrencies and tokens effortlessly. By handling the complexities of wallet infrastructure, WaaS enables a secure and user-friendly experience for managing digital assets, fostering wider blockchain adoption and enhancing operational efficiency. 31 | 32 | Below wallet have supported Wallet-as-a-Service (WaaS) platforms on the BNB Smart Chain and opBNB, facilitating seamless integration of digital wallet functionalities into applications for managing opBNB and other assets. 33 | 34 | | **Project Name** | **Main Website** | **WaaS Document** | 35 | | ---------------- | ------------------------- | ------------------------------------------------- | 36 | | Particle Network | https://particle.network/ | https://particle.network/wallet-introduction.html | 37 | | Sequence.build | https://sequence.xyz/ | https://sequence.build/landing | 38 | | Avatar Wallet | https://avatarwallet.io/ | https://docs.avatarwallet.io/docs/introduction | 39 | 40 | **Bridges** 41 | 42 | For bridges opBNB has its own default [bridge](https://opbnb-bridge.bnbchain.org/deposit), which is built mirroring OP Stack. This also means that it has the 7 days challenge period, similar to OP bridge, BASE bridge. But opBNB does have 3rd party bridge providers, such as [Polyhedra](https://zkbridge.com/opbnb) and [Rhino.Fi](https://app.rhino.fi/bridge?token=BNB&chainOut=OPBNB&chain=BINANCE) that provide shorter withdrawal periods. 43 | 44 | **Data Analytics** 45 | 46 | Several known industry platform already started supporting opBNB, i.e. [DefiLlama](https://defillama.com/chain/opBNB) , [CoinGecko](https://www.coingecko.com/en/chains/opbnb), [DappBay](https://dappbay.bnbchain.org/ranking/chain/opbnb). For listing on DappBay, projects can fill up this [form](https://dappbay.bnbchain.org/submit-dapp). 47 | 48 | **Indexing** 49 | 50 | opBNB currently has NodeReal’s opBNB Graph QL as the initial support[**Beta Version**] as current players such as TheGraph have their pipeline full for the rest of the year. For projects needing such services, projects can liaise with NodeReal on specs, requirements. [[Process Link](https://docs.google.com/document/d/1R0RcHKU27lBPMaSmwhwijlXLTQhs0Haa9LtKsxJbeAc/edit)] 51 | 52 | **DAO** 53 | 54 | Essential component as the BNB Chain moves towards decentralization. [XDao](https://www.xdao.app/204) and [Snapshot](https://snapshot.org/#/?filter=networks&q=opbnb) are now supporting opBNB. 55 | 56 | # For DeFi Specific 57 | 58 | **Oracle** 59 | 60 | [Binance Oracle](https://oracle.binance.com/docs/) has started supporting opBNB since Day1. Feel free to reach Binance Oracle for product support and demo. 61 | 62 | # For Game/Social Media 63 | 64 | **VRF** 65 | 66 | [Binance Oracle](https://oracle.binance.com/docs/vrf/overview) has support for opBNB VRF. Feel free to reach Binance Oracle for product support and demo. 67 | 68 | **NFT Marketplace & Minting** 69 | 70 | [Element’s NFT Marketplace](https://element.market/opbnb) is already live on opBNB. Minting feature will be ready soon in Nov. 71 | 72 | 73 | 74 | | Categories | Sub Categories | Infrastructure and Toolings | 75 | | ------------------- | --------------------- | ------------------------------------------------------------ | 76 | | DAO Governance | DAO Governance | [XDao](https://www.xdao.app/204),[Snapshot](https://snapshot.org/#/?filter=networks&q=opbnb) | 77 | | Node Providers | Node Provider | [NodeReal](https://nodereal.io/meganode) | 78 | | Explorer | Explorer | [NodeReal opBNB Scan](https://mainnet.opbnbscan.com), [BSCScan](https://opbnb.bscscan.com/) | 79 | | | Developer Platforms | [Truffle](https://trufflesuite.com/), [Foundry](https://book.getfoundry.sh/), [Hardhat](https://hardhat.org/), [Remix](https://remix.ethereum.org/) | 80 | | Use Access Tooling | Wallet | [Binance Web3 Wallet](https://www.binance.com/en/web3wallet), [Metamask](https://metamask.io/), [TrustWallet](https://trustwallet.com/), [Particle Network](https://wallet.particle.network/), [Gem Wallet](https://gemwallet.com/), [OKX Wallet](https://www.okx.com/nl/web3), [MathWallet](https://mathwallet.org/en-us/), [Sequence.build](https://sequence.build/landing), [Avatar](https://avatarwallet.io/) | 81 | | | Bridges | [opBNB Bridge](https://opbnb-bridge.bnbchain.org/deposit),[PolyHedra](https://zkbridge.com/), [rhino.fi](https://app.rhino.fi/bridge?token=BNB&chainOut=OPBNB&chain=BINANCE) | 82 | | | dApp Store | [dApp Bay](https://dappbay.bnbchain.org/ranking/chain/opbnb) | 83 | | Oracles | Price Feeds, VRF | [Binance Oracle](https://oracle.binance.com/), [Supra](https://supraoracles.com/) | 84 | | Storage | Decentralized Storage | [BNB Greenfield](https://greenfield.bnbchain.org/en) | 85 | | Security | | [AvengerDAO](https://www.avengerdao.org/) | 86 | | Account Abstraction | | [Particle Network](https://wallet.particle.network/),[Biconomy](https://docs.biconomy.io/supportedchains/),[CyberConnect](https://cyberconnect.me/) | 87 | | MultiSig | | [BNBChain Multi-Sig Wallet](https://docs.bnbchain.org/opbnb-docs/docs/build-on-opbnb/multisig-wallet) | 88 | | Data Analytics | | [DefiLlama](https://defillama.com/chain/opBNB), [CoinGecko](https://www.coingecko.com/en/chains/opbnb), [DappBay](https://dappbay.bnbchain.org/ranking/chain/opbnb) | 89 | | Indexing | | NodeReal’s opBNB Graph QL | 90 | | NFT | NFT Marketplace | [Element’s NFT Marketplace](https://element.market/opbnb) | 91 | 92 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/geth-sync.md: -------------------------------------------------------------------------------- 1 | # Fast Geth Sync 2 | 3 | # Geth P2P Sync Feature 4 | 5 | We're excited to introduce a new feature in this release: The Geth P2P Sync Feature. This feature significantly enhances the speed of block data synchronization by leveraging peer-to-peer syncing among geth nodes, as opposed to the previous method of deriving transactions from L1 for each synchronization. 6 | 7 | ## Benefits of Geth P2P Sync Feature 8 | 9 | The Geth P2P Sync Feature greatly accelerates block data synchronization. Our tests on the testnet have shown impressive results: 10 | 11 | * In `full` mode, the sync time has been reduced from the previous 7 days to approximately 15 hours. 12 | * In `snap` mode, syncing can be accomplished in about 1 hour. 13 | 14 | These improvements can save considerable time and resources, thus improving the overall performance of your operations. 15 | 16 | ## Configurations for Geth P2P Sync Feature 17 | 18 | ### New Configurations (op-node) 19 | 20 | * `l2.engine-sync=true` 21 | * `l2.skip-sync-start-check = true` 22 | 23 | The above settings are essential for enabling the Geth P2P Sync Feature. Please ensure that these settings are correctly configured in your op-node. 24 | 25 | ### Existing Configurations (op-geth) 26 | 27 | * `syncmode=snap/full` 28 | * `bootnodes=${bootnode_addr}` 29 | 30 | You can select either of the two options for the `syncmode`: 31 | 32 | 1. `full` (Recommended): This mode performs a full sync and executes each block. The sync time has been significantly reduced with the new Geth P2P Sync Feature, taking about 15 hours on the testnet (latest height: 10 million). 33 | 2. `snap`: This mode performs a snapshot sync, which does not execute transactions but still maintains data completeness. This mode is recommended when your P2P peer nodes are trustworthy. The sync time is about 1 hour on the testnet. 34 | 35 | For the `bootnodes` configuration, you can use the following geth bootnode nodes: 36 | 37 | * Testnet 38 | * `enr:-KO4QKFOBDW--pF4pFwv3Al_jiLOITj_Y5mr1Ajyy2yxHpFtNcBfkZEkvWUxAKXQjWALZEFxYHooU88JClyzA00e8YeGAYtBOOZig2V0aMfGhE0ZYGqAgmlkgnY0gmlwhDREiqaJc2VjcDI1NmsxoQM8pC_6wwTr5N2Q-yXQ1KGKsgz9i9EPLk8Ata65pUyYG4RzbmFwwIN0Y3CCdl-DdWRwgnZf` 39 | * `enr:-KO4QFJc0KR09ye818GT2kyN9y6BAGjhz77sYimxn85jJf2hOrNqg4X0b0EsS-_ssdkzVpavqh6oMX7W5Y81xMRuEayGAYtBSiK9g2V0aMfGhE0ZYGqAgmlkgnY0gmlwhANzx96Jc2VjcDI1NmsxoQPwA1XHfWGd4umIt7j3Fc7hKq_35izIWT_9yiN_tX8lR4RzbmFwwIN0Y3CCdl-DdWRwgnZf` 40 | * Mainnet 41 | * `enr:-KO4QHs5qh_kPFcjMgqkuN9dbxXT4C5Cjad4SAheaUxveCbJQ3XdeMMDHeHilHyqisyYQAByfdhzyKAdUp2SvyzWeBqGAYvRDf80g2V0aMfGhHFtSjqAgmlkgnY0gmlwhDaykUmJc2VjcDI1NmsxoQJUevTL3hJwj21IT2GC6VaNqVQEsJFPtNtO-ld5QTNCfIRzbmFwwIN0Y3CCdl-DdWRwgnZf` 42 | * `enr:-KO4QKIByq-YMjs6IL2YCNZEmlo3dKWNOy4B6sdqE3gjOrXeKdNbwZZGK_JzT1epqCFs3mujjg2vO1lrZLzLy4Rl7PyGAYvRA8bEg2V0aMfGhHFtSjqAgmlkgnY0gmlwhDbjSM6Jc2VjcDI1NmsxoQNQhJ5pqCPnTbK92gEc2F98y-u1OgZVAI1Msx-UiHezY4RzbmFwwIN0Y3CCdl-DdWRwgnZf` 43 | 44 | Ensure the above configurations are correctly set up to fully benefit from the new Geth P2P Sync Feature in this release. We hope you find this feature advantageous. Your feedback is always welcome. 45 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/getting-started.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Overview 3 | description: Overview of getting started on opBNB 4 | --- 5 | 6 | # Overview 7 | 8 | Developing on opBNB is nearly the same as building directly on BNB Smart Chain. Migration from Ethereum, BNB Smart Chain, Polygon, and other EVM-compatible chains to opBNB will be nearly seamless for projects. Some key points to highlight: 9 | 10 | 1. Optimistic rollup - opBNB provides the scalability and low costs of a rollup, while still leveraging the security of BNB Smart Chain. dApps get the best of both Layer 1 and Layer 2. 11 | 2. EVM Compatible - Developers on any EVM campatible chains can simply deploy the same application on opBNB to get the benefits of Layer 2 scaling. 12 | 13 | ## Guide 14 | 15 | ### Basic (Starter) 16 | 17 | 1. [Network Infomation](./opbnb-network-info.md) 18 | 2. [Configure Wallet](./wallet-configuration.md) 19 | 3. [Set Gasprice](./set-gas-price.md) 20 | 4. [Claim Faucet](./network-faucet.md) 21 | 5. [Deposit Asset](./deposit-to-opbnb.md) 22 | 6. [Withdraw Asset](./withdraw-from-opbnb.md) 23 | 7. [FAQ](../faq/build-on-opbnb-faqs.md) 24 | 25 | ### Advance (Developer) 26 | 27 | 1. [Best Practice](./developer-cheat-sheet.md) 28 | 2. Run Node: 29 | 30 | - [Run Local Dev Environment](../tutorials/running-a-local-development-environment.md) 31 | - [Run Local Mainnet/Testnet Node](../tutorials/running-a-local-node.md) 32 | - [Fast Geth Sync](./geth-sync.md) 33 | 34 | 3. [Contract Verification](../tutorials/opbnbscan-verify-hardhat-truffle.md) 35 | 4. [Create a Full Stack Dapp](../tutorials/full-stack-dapp.md) 36 | 5. [Multi-Sig Wallet Service](./multisig-wallet.md) 37 | 6. [Arbitrary BEP20 Cross-chain Transfer](./bep20-crosschain.md) 38 | 7. [Infra and Tooling](./developer-tools.md) 39 | 40 | ### Tutorial & SDK Resources (In depth) 41 | 42 | 1. [Tutorials](../tutorials/full-stack-dapp.md) 43 | 2. [OP Stack Client SDK](https://sdk.optimism.io/) 44 | The SDK provides a set of tools for interacting with opBNB and also for Interlayer communication. (_[OP Stack Client SDK](https://stack.optimism.io/docs/build/sdk/) is maintained by OP Stack_) 45 | 46 | ### [Contribute](../contribute.md) 47 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/multisig-wallet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: BNB Chain Safe Multi-Sig Wallet Service 3 | index: yes 4 | --- 5 | # BNB Chain Safe Multi-Sig Wallet Service 6 | 7 | BNB Chain deployed a multi-sig wallet service based on the Gnosis Safe protocol on opBNB mainnet, opBNB testnet and BSC testnet. It provides users with a secure and convenient way to manage their digital assets and transactions. 8 | 9 | 13 | 14 | # How to Use the BNB Chain Multi-Sig Wallet Service 15 | 16 | To use the BNB Chain multi-sig wallet service, connect with your own EOA wallet to start. Visit [https://multisig.bnbchain.org/welcome](https://multisig.bnbchain.org/welcome) 17 | 18 | Read the [Safe Doc](https://docs.safe.global/getting-started/readme) for details. 19 | 20 | # Safe Transaction Service API 21 | To create or list safe transactions programmatically, use the Safe Transaction Service API. Here are the endpoints for the opBNB testnet and opBNB mainnet: 22 | 23 | Testnet: [https://safe-transaction-opbnb-testnet.bnbchain.org/](https://safe-transaction-opbnb-testnet.bnbchain.org/) 24 | 25 | Mainnet: [https://safe-transaction-opbnb-mainnet.bnbchain.org/](https://safe-transaction-opbnb-mainnet.bnbchain.org/) 26 | 27 | Read the [api-kit Doc](https://docs.safe.global/safe-core-aa-sdk/api-kit/reference) for details. 28 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/network-faucet.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Network Faucets 3 | icon: code 4 | index: yes 5 | dir: 6 | order: 2 7 | --- 8 | 9 | 10 | :::caution 11 | This is a living document and is susceptible to changes. 12 | ::: 13 | 14 | ## Testnet Faucet 15 | 16 | If you want to test the functionality of the BNB Smart Chain, you will need some testing tokens, such as tBNB and other major tokens like USDC, BUSD, DAI, and wrapped Bitcoin. There are two ways to claim these testing tokens. 17 | Please refer to the BSC [faucet doc](https://docs.bnbchain.org/docs/bsc-faucet) for details. After you claim your tokens, you can transfer your testing assets to opBNB to start testing through [testnet bridge](https://opbnb-testnet-bridge.bnbchain.org). 18 | 19 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/opbnb-network-info.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Network Information 3 | icon: code 4 | index: yes 5 | dir: 6 | order: 3 7 | --- 8 | 9 | :::caution 10 | This is a living document and is susceptible to changes. 11 | ::: 12 | 13 | 14 | ## opBNB Network Information 15 | 16 | | Name | Value | 17 | | --------------- | ------------------------------------------------------------ | 18 | | Network Name | opBNB | 19 | | Description | The Layer 2 network of BNB Smart Chain. | 20 | | RPC Endpoint | [See here](#opbnb-rpc-endpoints) | 21 | | Chain ID | 5611(Testnet), 204(Mainnet) | 22 | | Currency Symbol | tBNB(Testnet) BNB(Mainnet) | 23 | | Block Explorer | https://testnet.opbnbscan.com, https://opbnbscan.com, https://opbnb.bscscan.com/| 24 | | Bridge | https://opbnb-testnet-bridge.bnbchain.org, https://opbnb-bridge.bnbchain.org | 25 | 26 | 27 | ## opBNB RPC Endpoints 28 | 29 | You can use either public and private RPC endpoints to access opBNB. 30 | 31 | ### Public opBNB Testnet RPC Endpoints(WSS is supported) 32 | 33 | - https://opbnb-testnet-rpc.bnbchain.org/ 34 | - https://opbnb-testnet.nodereal.io/v1/64a9df0874fb4a93b9d0a3849de012d3 35 | - https://opbnb-testnet.nodereal.io/v1/e9a36765eb8a40b9bd12e680a1fd2bc5 36 | - https://opbnb-testnet.publicnode.com 37 | 38 | ### Public opBNB Mainnet RPC Endpoints(WSS is supported) 39 | 40 | - https://opbnb-mainnet-rpc.bnbchain.org 41 | - https://opbnb-mainnet.nodereal.io/v1/64a9df0874fb4a93b9d0a3849de012d3 42 | - https://opbnb-mainnet.nodereal.io/v1/e9a36765eb8a40b9bd12e680a1fd2bc5 43 | - https://opbnb.publicnode.com 44 | 45 | ### Private opBNB RPC Endpoints 46 | 47 | NodeReal supports the opBNB network, you can create your free opBNB RPC endpoints with your github or discord. 48 | 49 | - https://nodereal.io/api-marketplace/opbnb-rpc 50 | 51 | :::note 52 | To use the above private RPC endpoint, make sure to login to [MegaNode service](https://nodereal.io/meganode) and create your private endpoints. 53 | ::: 54 | 55 | 56 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/set-gas-price.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Set Gas Price 3 | description: How to set the base price and priority price for opBNB transactions 4 | icon: code 5 | index: yes 6 | dir: 7 | order: 2 8 | --- 9 | 10 | :::caution 11 | This is a living document and is susceptible to changes. 12 | ::: 13 | 14 | This document shows you how to set the priority price and base price for opBNB transactions in wallet. These prices determine how much you are willing to pay for your transaction to be included in the next block (Priority Gas Price) and how much you are willing to pay for the gas used by your transaction. Setting these prices correctly can help you save money and avoid delays. 15 | 16 | To set the priority price and base price, follow these steps: 17 | 18 | Metamask: 19 | 20 | 1. Open your metamask wallet and click on the opBNB network at the top right corner. 21 | 22 | 2. Click on the send button and enter the recipient address and the amount of opBNB you want to send. 23 | 24 | 3. Before you confirm your transaction, click on the **advanced->edit** button next to the gas fee section. 25 | 26 | opBNB-bridge 31 | 32 | 4. You will see two sliders: one for the **Max base fee(Gwei)** price and one for the **Priority Fee(Gwei)**. The priority price is the amount of opBNB you are willing to pay per unit of gas for your transaction to be included in the next block. The base price is the amount of opBNB you are willing to pay per unit of gas for the gas used by your transaction. The total gas fee is the sum of these two prices multiplied by the gas consumed. The base fee for opBNB transactions is dynamic and depends on the demand for block space. The minimum possible base fee is 0.000000008 gwei. The priority fee, which is paid to the sequencer who includes the transaction in a block, can also be as low as 0.000000001 gwei. However, these fees may vary depending on the network congestion and the urgency of the transaction. 33 | 34 | opBNB-bridge 39 | 40 | 5. You can adjust the sliders according to your preferences. The higher the priority price, the faster your transaction will be confirmed, but the more expensive it will be. The lower the base price, the cheaper your transaction will be, but the more likely it will fail if the gas limit is too low. 41 | 42 | 6. Once you are satisfied with your settings, click on save and then confirm your transaction. 43 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/wallet-configuration.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Wallet Configuration 3 | description: Configure your wallet to work with opBNB 4 | icon: code 5 | index: yes 6 | dir: 7 | order: 4 8 | --- 9 | 10 | :::caution 11 | This is a living document and is susceptible to changes. 12 | ::: 13 | 14 | # Wallet configuration 15 | 16 | You can use any Ethereum or BSC wallet with opBNB. For instance, I will show you how to set up Metamask and Trustwallet for opBNB. 17 | 18 | To configure your wallet to work with opBNB, you will need to add both the BNB smart chain(Layer 1) and the opBNB network(Layer 2). Follow these steps: 19 | 20 | 1. Add the BNB smart chain to your wallet. This is the Layer 1 blockchain that opBNB is built on top of. 21 | 22 | #### Testnet 23 | 24 | - Network Name: BSC Testnet 25 | - RPC URL: [https://data-seed-prebsc-1-s1.bnbchain.org:8545](https://data-seed-prebsc-1-s3.bnbchain.org:8545/) 26 | - ChainID: 97 27 | - Symbol: tBNB 28 | - Explorer: [https://testnet.bscscan.com/](https://testnet.bscscan.com/) 29 | 30 | #### Mainnet 31 | 32 | - Network Name: BSC Mainnet 33 | - RPC URL: [https://bsc.nodereal.io](https://bsc.nodereal.io) 34 | - ChainID: 56 35 | - Symbol: BNB 36 | - Explorer: [https://bscscan.com/](https://bscscan.com/) 37 | 38 | 2. Add the opBNB network to your wallet. 39 | 40 | #### Testnet 41 | 42 | - Network Name: opBNB Testnet 43 | - RPC URL: [https://opbnb-testnet-rpc.bnbchain.org](https://opbnb-testnet-rpc.bnbchain.org) 44 | - ChainID: 5611 45 | - Symbol: tBNB 46 | - Explorer: [http://testnet.opbnbscan.com/](http://testnet.opbnbscan.com/) 47 | 48 | #### Mainnet 49 | 50 | - Network Name: opBNB Mainnet 51 | - RPC URL: [https://opbnb-mainnet-rpc.bnbchain.org ](https://opbnb-mainnet-rpc.bnbchain.org) 52 | - ChainID: 204 53 | - Symbol: BNB 54 | - Explorer: [http://opbnbscan.com/](http://opbnbscan.com/) 55 | 56 | ## References - How to configure Trustwallet or Metamask 57 | 58 | [Trustwallet](https://chrome.google.com/webstore/detail/trust-wallet/egjidjbpglichdcondbcbdnbeeppgdph) 59 | 60 | After you install the Trustwallet in your browser, you can go to settings->network. 61 | 62 | opBNB-bridge 67 | 68 | Select add custom network and enter the network information I mentioned above. 69 | 70 | _[Metamask](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn)_ 71 | 72 | After you install the metamask in your browser, you can go to settings -> networks -> add network page. 73 | 74 | Select add manual network and enter the network information. 75 | 76 | opBNB-bridge 81 | 82 | :::info 83 | Depending on your location and preference, you can choose from a variety of RPC endpoints for BSC and opBNB. For more information about the endpoints and their features, please refer to the network information document that we have prepared for you. To ensure the best performance and user experience, you can test the latency of each endpoint before you configure it with your wallet. 84 | ::: 85 | -------------------------------------------------------------------------------- /docs/build-on-opbnb/withdraw-from-opbnb.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Withdraw Tokens from opBNB 3 | icon: code 4 | index: yes 5 | dir: 6 | order: 2 7 | --- 8 | 9 | To transfer your tokens from opBNB to BSC, you can use the [opBNB bridge dApp(Testnet)](https://opbnb-testnet-bridge.bnbchain.org/) or [opBNB bridge dApp(Mainnet)](https://opbnb-bridge.bnbchain.org). Users who do not want to wait 7 days to claim their tokens can use a community bridge, but please note that community bridges may not be as secure as the official opBNB bridge. 10 | 11 | 12 | :::info 13 | Note that the default option is the community bridge. To use the opBNB bridge, switch to the "official bridge" tab. 14 | 15 | ::: 16 | 17 | 18 | 22 | 23 | ## Steps of withdrawal through official bridge 24 | 25 | For users who choose the official opBNB bridge, you will need to wait for a challenge period of 7 days before you can claim your tokens on BSC. This challenge period is a security measure to prevent fraud and theft. The challenge period is necessary to ensure the security of the opBNB network and users. However, it can be inconvenient for users who need their tokens quickly. If you need your tokens immediately, you may want to consider using a community bridge instead. However, please be aware that community bridges may not be as secure as the official opBNB bridge. Do your research first. 26 | 27 | 28 | opBNB-bridge-withdraw-confirmation 33 | 34 | There are 2 steps after you submit your withdrawal request. 35 | 36 | 1. *Submit Proof:* When you withdraw your tokens, they will be transferred from the opBNB network to the BSC network. After you submit the withdrawal request, your withdrawal status will change to *Waiting for Proof*, which indicates that the transaction is pending for the proof submission. You need to submit the proof manually. 37 | 38 | 2. *Claim Token:* After you submit your proof, you need to wait until the transaction is ready to be collected after the challenge window, which is 7 days. The challenge window is a period of time during which anyone can challenge the validity of the transaction. If no one challenges the transaction, it will be finalized and you can collect your tokens on the BSC network. 39 | 40 | ![withdraw-status](../../static/img/withdraw-status.png) 41 | 42 | -------------------------------------------------------------------------------- /docs/contact.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contact Us 3 | --- 4 | # ☎️ Contact Us 5 | 6 | ## Discord 7 | To get help from other developers, discuss ideas, and stay up-to-date on what's happening, become a part of our community on Discord. Join our [official Discord Channel](https://discord.com/invite/bnbchain). 8 | 9 | ## Forum 10 | You can also join the conversation, connect with other projects, and ask questions in our [BNB Chain Forum](https://forum.bnbchain.org/). 11 | 12 | ## Bugs 13 | Your feedbacks are welcome. I will make sure to update the documentation if there is anything wrong. If you find any issues with the documentation, please feel free to open an issue on the [issues tab](https://github.com/bnb-chain/opbnb-docs/issues). -------------------------------------------------------------------------------- /docs/contribute.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Contribute 3 | hide_table_of_contents: true 4 | --- 5 | 6 | # Contribute to opBNB Open Source Community 7 | 8 | Welcome to the opBNB network, a thriving ecosystem driven by the collective power of its community. We believe that innovation knows no bounds, and we warmly welcome you to join us on our mission to shape the future of decentralized web3 economy. 9 | 10 | Contributing to opBNB is not just about code; it's about sharing your unique expertise, ideas, and passion to enhance the platform and empower global users. 11 | 12 | This page serves as a guide to showcase the various ways you can make a positive impact and play a crucial role in building a borderless, transparent, and inclusive network for all. 13 | 14 | Following are the channels you can use for providing your valued contributions 15 | 16 | - [opBNB Official GitHub Docs Repo](https://github.com/bnb-chain/opbnb-docs) 17 | - [Discord](https://discord.com/invite/bnbchain) 18 | - [Telegram](http://t.me/bnbchain) 19 | - [Official Forum](https://forum.bnbchain.org/) 20 | 21 | ## Contribute to opBNB codebase 22 | 23 | [opBNB codebase](https://github.com/bnb-chain/opbnb?ref=binance.ghost.io) is fully open source and all the optimizations in opBNB can be reused in other optimistic rollup implementations as well. We hope that this work will inspire more collaboration and innovation among EVM-compatible blockchain developers and users. 24 | 25 | ## Contribute to opBNB Documentation 26 | 27 | We welcome contributions to our documentation via GitHub. Follow the steps below to conribute successfully. 28 | 29 | ### Steps for Contributing on GitHub 30 | 31 | - Make sure you have a GitHub account. 32 | - Create a GitHub issue for your contribution, assuming one does not already exist. 33 | - Clearly describe the issue including steps to reproduce if it is a bug. 34 | - Fork the repository on GitHub. 35 | - Minor Changes 36 | - Documentation 37 | - For small changes to comments and documentation, it is not always necessary to create a new GitHub issue. In this case, it is appropriate to start the first line of a commit with 'doc' instead of an issue number. 38 | 39 | ### Finding things to work on 40 | 41 | The first place to start is always looking over the current GitHub issues for the project you are interested in contributing to. Issues marked with `help wanted` are usually pretty self-contained and a good place to get started. 42 | 43 | Of course, feel free to create a new issue if you think something needs to be added or fixed. 44 | 45 | ### Making Changes 46 | 47 | - Create a topic branch from where you want to base your work. This is usually the master branch. Please avoid working directly on the master branch. 48 | - Make sure you have added the necessary tests for your changes and make sure all tests pass. 49 | 50 | ### Submitting Changes 51 | 52 | - Submit a pull request to the docs repository in the BNB Chain organization. 53 | - Include a descriptive `commit message`. 54 | - Changes contributed via pull request should focus on a single issue at a time. 55 | - Rebase your local changes against the master branch. Resolve any conflicts that arise. 56 | -------------------------------------------------------------------------------- /docs/core-concepts/account-abstraction-on-opbnb.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Account Abstraction on opBNB - Adoption of AA on L2 of BSC with cost efficiency 3 | icon: code 4 | index: yes 5 | dir: 6 | order: 2 7 | --- 8 | 9 | ## opBNB is a cost-efficient solution for AA 10 | The primary allure of opBNB lies in its ability to significantly reduce the gas costs associated with AA (ERC4337) transactions. This efficiency is achieved through optimized transaction processing and a more streamlined approach to handling complex operations typically found in AA transactions. AA transactions, with their intricate operations and smart contract interactions, traditionally require more computational resources. opBNB, however, utilizes innovative methods to simplify these processes, ensuring that the complexity does not translate into prohibitive costs for users and developers. 11 | 12 | ## Enhanced transaction speed with lower costs 13 | Not only does opBNB address the cost issue, but it also offers higher Transaction Per Second (TPS) rates. This combination of low cost and high speed is particularly crucial for dApps that require both efficiency and scalability, making opBNB a ideal choice for High-Frequency DeFi and web3 games. By integrating opBNB, dApp developers can offer their users a seamless experience without the burden of high transaction fees. This user-friendly approach, coupled with cost-effective operations, positions opBNB as a preferred choice in the AA landscape. 14 | 15 | ## opBNB AA Infrastructure 16 | 17 | Notably, platforms like [Biconomy](https://docs.biconomy.io/supportedchains/) and [Particle Wallet](https://docs.particle.network/overview/available-networks) have already adopted opBNB's AA solutions. Their integration showcases the practical application and effectiveness of opBNB in managing the complexity and cost of AA transactions in real-world scenarios. For details, please refer to the blog of [Account Abstraction current and future development on BNB Chain](https://www.bnbchain.org/en/blog/account-abstraction-current-and-future-development-on-bnbchain-part-one). 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/core-concepts/architecture.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: opBNB Architecture 3 | description: Learn about the architecture of opBNB 4 | icon: code 5 | index: yes 6 | dir: 7 | order: 2 8 | --- 9 | :::caution 10 | This is a living document and is susceptible to changes. 11 | ::: 12 | 13 | ## Architecture of opBNB 14 | 15 | The opBNB is a layer 2 scaling solution built on top of BSC (a layer 1 blockchain). It processes transactions off-chain but posts transaction data on-chain, providing scalability as compressed layer 2 transaction data are posted on-chain. It has three main layers: an RPC service layer for interacting with the rollup, an operator interface layer for proposing layer 2 transactions off-chain, and an execution layer for executing transactions and providing an EVM execution environment. 16 | 17 | The rollup has a modular design, so the data availability interface and settlement layer can be implemented with different solutions. The data availability layer can be replaced with solutions like Greenfield, Arweave, and others, instead of relying only on BSC. Likewise, the settlement layer can be replaced with other EVM-compatible chains besides BSC, such as the Ethereum mainnet. 18 | 19 | The rollup is secured by its settlement chain as transaction data is posted on-chain, benefits from its consensus, and uses its data availability solutions. It is decentralized and permissionless. The rollup provides faster and cheaper transactions than BSC while still being secured. 20 | 21 | 22 | 23 | ![image-20230605092452839](../../static/img/opBNB-arch.png) 24 | 25 | -------------------------------------------------------------------------------- /docs/core-concepts/challenger.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Challenger 3 | --- 4 | 5 | # Challenger 6 | 7 | To be updated soon. 8 | -------------------------------------------------------------------------------- /docs/core-concepts/difference-BSC-Eth.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: opBNB vs other Layer1 Networks 3 | description: Differences between opBNB and other Layer1 Networks 4 | icon: code 5 | index: yes 6 | dir: 7 | order: 2 8 | --- 9 | 10 | :::caution 11 | This is a living document and is susceptible to changes. 12 | ::: 13 | 14 | Our goal is to provide a scaling solution for network congestion problems for highly active applications on the BSC, such as DeFi, NFTs and gaming. opBNB is based on OP Stack and with optimizations of the mining process and the cache data access to achieve a capacity of 100M gas per second, which is much higher than BSC. 15 | 16 | | | **opBNB** | **BSC** | **Ethereum** | 17 | | -------------------- | --------- | --------------------------------------------------- | ------------ | 18 | | **Gas Token** | BNB | BNB | ETH | 19 | | **VM** | EVM | EVM | EVM | 20 | | **Gas Price Model** | EIP-1559 | [Gas Price Auction](https://bscscan.com/gastracker) | EIP-1559 | 21 | | **Block Gas Limit** | 100M | [140M](https://www.bscscan.com/chart/gaslimit) | 30M | 22 | | **Block time** | 1s | 3s | 12s | 23 | | **Transaction Cost** | $0.001 | $0.03 | $1 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/core-concepts/difference-L2.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: opBNB vs other Layer2 Networks 3 | description: Differences between opBNB and other Layer2 Networks 4 | icon: code 5 | index: yes 6 | dir: 7 | order: 2 8 | --- 9 | 10 | # opBNB vs other Layer2 Networks 11 | 12 | :::caution 13 | This is a living document and is susceptible to changes. 14 | ::: 15 | 16 | Compared with other L2 solutions on the Ethereum, like **OP Mainnet** and **Arbitrum**, **opBNB** has lower gas fee, and higher block gas limit, which means the gas fee will be more stable when traffic of Layer 2 increases. I listed the Ethereum EIP-1559 parameters as a reference. Arbitrum gas mechanism is based on the ArbOS, it is not applicable here. 17 | 18 | **Gas Parameter Differences** 19 | 20 | | **Parameter** | **opBNB value** | **Optimism value** | 21 | | ------------------------------------- | --------------- | ------------------ | 22 | | Block gas limit | 100,000,000 gas | 30,000,000 gas | 23 | | Block gas target | 50,000,000 gas | 5,000,000 gas | 24 | | EIP-1559 elasticity multiplier | 2 | 6 | 25 | | EIP-1559 denominator | 8 | 50 | 26 | | Maximum base fee increase (per block) | 12.5% | 10% | 27 | | Maximum base fee decrease (per block) | 12.5% | 2% | 28 | 29 | **Metrics Differences** 30 | 31 | | | **opBNB** | **Optimism** | **Arbitrum** | 32 | | ---------------------- | ----------------- | ------------ | ------------ | 33 | | **Gas Token** | BNB | ETH | ETH | 34 | | **VM** | EVM | EVM | EVM | 35 | | **Gas Fee** | $0.001 | $0.05 | $0.1 | 36 | | **Block Gas Limit** | 100M(150M 2024Q1) | 30M | 32M | 37 | | **Block time** | 1s | 2s | 0.25s(Min) | 38 | | **Withdraw/ Finality** | 7 days | 7 days | 7 days | 39 | | **TPS (Transfer)** | 4500+ | 700+ | 4000+ | 40 | 41 | OP Stack has some minor differences, so does opBNB. I just listed the differences here for your reference, for details you can refer to the [OP Stack documents](https://stack.optimism.io/docs/releases/bedrock/differences/#opcode-differences). 42 | 43 | :::info 44 | Unlike opBNB and OP Mainnet, which have fixed blocktimes, Arbitrum has a variable blocktime that depends on the number and gas of transactions in a block. The more transactions and gas a block contains, the longer it takes to mine. The minimum blocktime on Arbitrum is 0.25 seconds, which means that the fastest block can be mined in a quarter of a second. 45 | ::: 46 | -------------------------------------------------------------------------------- /docs/core-concepts/gas-and-fees.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Gas and Fees 3 | description: Learn about the Gas and Fees structure of opBNB 4 | icon: code 5 | index: yes 6 | dir: 7 | order: 2 8 | --- 9 | 10 | :::caution 11 | This is a living document and is susceptible to changes. 12 | ::: 13 | 14 | ## Overview 15 | 16 | OpBNB is a Layer 2 scaling solution that aims to achieve higher throughput and lower cost for transactions on the BNB Smart Chain. The cost of opBNB transactions consists of two components: the Layer 2 gas fee and the Layer 1 gas fee. The Layer 2 gas fee reflects the computational complexity of the transaction. The Layer 1 gas fee covers the expense of submitting batches of transactions to the BSC for verification and finality. 17 | 18 | **Gas price = base price + priority price** 19 | 20 | **Layer 2 transaction cost = Layer 2 gas price x Layer 2 gas consumed + Layer 1 gas price x Layer 1 gas consumed.** 21 | 22 | ## Current configuration 23 | 24 | | Name | Floor Base Price | Minimum Priority Price | 25 | | ------------- | ---------------- | ---------------------------- | 26 | | opBNB Testnet | 8 wei (dynamic) | 1001 wei | 27 | | opBNB Mainnet | 8 wei (dynamic) | 1001 wei | 28 | | BSC Testnet | 0 | 3 | 29 | | BSC Mainnet | 0 | 3 | 30 | 31 | ## What does this means 32 | 33 | Please note the floor base price is the minimum base price opBNB can set, and according to the usage, the base price can fluctuate. For example, according to the current configuration, if the usage of a block reaches 50% of 100M gas, the base price will increase by 12.5%. 34 | 35 | The minimum priority price is preconfigured, and users can give any priority price that is higher than this number. Usually users will get the estimate gas price by calling the API of “estimate gas price”. It is a recommended gas price according to the current average gas price of history blocks. 36 | 37 | BNB Chain aims to reduce the transaction cost to the level that enable the mass adoption, for opBNB, the target of the transfer transaction is lower than $0.001. 38 | 39 | ## How opBNB keep reducing the cost of L2 transactions 40 | 41 | 1. **Enhanced Data Compression**: Implementing more advanced data compression algorithms to reduce the size of L2 transaction data before submitting it to L1. 42 | 43 | 2. **Efficient Transaction Batching**: Optimizing how transactions are batched together to maximize space efficiency and reduce costs per transaction. 44 | 45 | 3. **Data Availability Solutions**: Utilizing solutions like those in BNB Greenfield for offloading some data storage from the main chain, thereby reducing data costs. 46 | 47 | 4. **Zero-Knowledge Proofs**: Employing zero-knowledge proofs to validate transactions without disclosing full transaction data, thus minimizing L1 data load. 48 | 49 | 5. **Protocol-Level Optimizations**: Making improvements at the protocol level to reduce overhead in transaction processing on L2. 50 | 51 | -------------------------------------------------------------------------------- /docs/core-concepts/need-for-opbnb.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Why opBNB as a New Layer2 Solution 3 | description: Learn why does BSC need opBNB as it's new L2 4 | index: yes 5 | --- 6 | 7 | # Why BSC Requires opBNB 8 | 9 | Layer 1 networks are the base networks that provide the infrastructure for data transmission and validation, such as BSC and Ethereum. These networks face the challenge of network congestion during peak periods, which usually happens when any popular application runs a promotion campaign or experiences a spike in traffic. Network congestion can lead to high transaction fees, slow transactions, and poor user experience. 10 | 11 | To overcome these challenges, layer 1 networks need to improve their scalability, which is the ability to handle more transactions per second without compromising security. For example, BSC had a web3 game on BNB Smart Chain (BSC) in 2021 which generated over [8 million transactions per day](https://bscscan.com/address/0x39bea96e13453ed52a734b6aceed4c41f57b2271?ref=binance.ghost.io#analytics). 12 | 13 | ![tx-stats](../../static/img/why-opbnb-tx-stats.png) 14 | 15 | 1. BSC's throughput capacity would presumably be vastly exceeded, resulting in slowed transaction speeds, delayed transaction finality, and a poor user experience both for game players and users of other dApps. 16 | 17 | 2. Daily gas fees could potentially rise to over [6,800 BNB](https://bscscan.com/address/0x39bea96e13453ed52a734b6aceed4c41f57b2271?ref=binance.ghost.io#analytics) ($3M USD) at that level of usage, posing a substantial barrier to usability and sustainability of this game. 18 | 19 | The immense transaction loads from a dApp on such a large scale seem infeasible for BSC to handle efficiently in its current form. Significant optimizations and scaling solutions would likely be required for BSC to support such a dApp without network-wide performance degradation and unreasonably high costs. -------------------------------------------------------------------------------- /docs/core-concepts/opbnb-contracts.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: opBNB Contracts 3 | --- 4 | 5 | # opBNB Contracts 6 | 7 | To be updated soon. -------------------------------------------------------------------------------- /docs/core-concepts/optimisations-on-opstack.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Optimizations on OP Stack 3 | title: Optimizations on OP Stack 4 | description: Optimizations to OP Stack for enhanced performance & low gas fees 5 | --- 6 | 7 | This document discusses the various optimizations made to OP Stack that enhances its performance and helps in offering super cheap gas fees. 8 | 9 | ## opBNB offers enhanced performance and cheap gas fees 10 | 11 | opBNB enhances the performance of the "Execution Layer" and the "Derivation Layer" of the OP Stack as highlighted in [OP Stack landscape](https://stack.optimism.io/docs/understand/landscape/?ref=binance.ghost.io#existing-landscape). 12 | 13 | ## Optimization of Execution Layer 14 | 15 | One of the main challenges in developing the opBNB protocol was to ensure a high throughput of transactions. To achieve this, opBNB leveraged execution optimization techniques that had [previously been implemented for BSC](https://nodereal.io/blog/en/bnb-smart-chain-performance-anatomy-series-chapter-ii-99-cache-hit-rate/?ref=binance.ghost.io). 16 | 17 | ## EVM State Data Access Optimization 18 | Before we dive into the details of the optimisations, let's see how EVM handles the state data. The diagram below illustrates how the EVM accesses state data. The EVM first checks the cache in memory for the data. If the data is not there, the EVM uses the LevelDB, which involves disk IO. 19 | 20 | By improving cache efficiency and accelerating database reads and writes, opBNB realizes substantial performance and scalability gains that benefit both node operators and end users. 21 | 22 | ![evm-state-data-access-optimization](../../static/img/evm-state-data-access-optimization.png) 23 | 24 | (Compared with standard Ethereum world state data storage model, BNB introduced the “SharedPool” as L1.5 cache to improve the hit rate of cache) 25 | 26 | ## Increased accuracy of [Bloom Filter](https://en.wikipedia.org/wiki/Bloom_filter?ref=binance.ghost.io) in L2: Diff Layer 27 | 28 | Avoiding unnecessary recursive accesses to cache by increasing the accuracy of [Bloom Filter](https://en.wikipedia.org/wiki/Bloom_filter?ref=binance.ghost.io) in L2: Diff Layer 29 | Bloom filters are a probabilistic data structure that can rapidly verify if an element exists within a data set. To access the state data, EVM uses the bloom filter to verify if the key-value pair is in the Diff Layer and then searches the cache recursively until it finds them, otherwise, EVM directly reads the data from the levelDB. 30 | 31 | However, bloom filters may yield false positives. Moreover, the rate of false positives increases as the dataset bloom filters evaluate expands. Given the opBNB dataset is larger than Ethereum's, the potential for false positives could be greater as well. 32 | 33 | The false positive can result in the unnecessary recursive access. To mitigate this, opBNB reduced the diff layer level from the default of 128 to a configurable parameter set at 32. This reduction decreases the size of the dataset, in turn diminishing the possibility of false positives to avoid the unnecessary time consuming operations to increase the efficiency of state retrieval. 34 | 35 | ## Effective Prefetch in the cache model of L1.5 and its upper layers 36 | Prefetch is a technique that enhances the performance of transaction execution by loading data from disk to cache in advance. When a block needs to be processed in full sync mode or mined in mining mode, the opBNB node launches N threads to perform state prefetch. 37 | 38 | The threads execute the transactions of a block or TxPool and discard the results, but keep the data items in the cache. This way, when the node needs to access the data, it is more likely to find it in the cache rather than on disk, which improves the cache hit rate. 39 | 40 | ![](../../static/img/prefetch.png) 41 | 42 | However, the original prefetch design had a performance limitation. It used separate state databases for the prefetch and the main processes. The prefetch threads could only store the prefetched data in the L2 diff layer (See the 3 layer cache model that was explained before). To access this data, the main process had to traverse the L1, L2, and probably L3 layers, which was too slow for a high performance layer 2 chain. 43 | 44 | The new design improves performance by sharing a pool that holds the whole world state (originStorage) between the prefetch and the main EVM processes. This way, the prefetch threads can put the prefetched data right into the L1.5 (the upper layer of the cache model), which makes it faster for the main process to access. See the detailed process below. 45 | 46 | ![pool-sharing](../../static/img/pool-sharing.png) 47 | 48 | ## Mining Process Optimization 49 | The process of mining L2 blocks of OP Stack is illustrated in the [diagram](https://github.com/ethereum-optimism/optimism/blob/33741760adce92c8bdf61f693058144bb6986e30/specs/assets/engine.svg?ref=binance.ghost.io). It involves a loop where the Rollup Driver (opNode) imports the previous blocks and then invokes the Engine API (op-geth) to produce new blocks on Layer 2. 50 | 51 | The Rollup Driver (opNode) initiates the block generation process on op-geth by calling the engine_forkChoiceUpdatedv1 API of the Engine API(op-geth). This instructs Engine API(op-geth) to start producing an initial block by executing the transactions. (See “**Engine API: Initiate block production**” in the [diagram](https://github.com/ethereum-optimism/optimism/blob/33741760adce92c8bdf61f693058144bb6986e30/specs/assets/engine.svg?ref=binance.ghost.io)). The Engine API(op-geth) then returns a payload ID to the Rollup Driver (opNode). 52 | 53 | However, when Engine API(op-geth) receives the engine_newPayloadV1 call from the Rollup Driver (opNode) to commit the block, it has to execute the transactions again, which is redundant and time-consuming. It can take hundreds of milliseconds to complete. 54 | 55 | To optimize the performance, we added a cache layer to store the execution results during the initial block production step. This way, when op-geth receives the engine_newPayloadV1 call, it can retrieve the data from the cache instead of executing the transactions again. This saves time and resources for the system. 56 | 57 | ## Optimization of Derivation Layer 58 | 59 | The batcher performance bottleneck was caused by the need to wait for 15 blocks (45 seconds) on Layer 1 (BSC) to confirm each batch of transactions before submitting the next one. This was due to the possibility of reorg on Layer 1 chain. To solve this problem, we introduced the asynchronous submission feature, which allows the batcher to submit batches without waiting for confirmation. 60 | 61 | A separate monitor process keeps track of Layer 1 and notifies the batcher if a reorg happens, so that the batcher can resubmit the affected transactions. This feature improves the efficiency of the batcher. It is not yet available on testnet and is still under development, but it will be deployed on opBNB mainnet. -------------------------------------------------------------------------------- /docs/core-concepts/raas.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Rollup as a Service (RaaS) on BNB Chain 3 | title: Rollup as a Service (RaaS) on BNB Chain 4 | description: Rollup as a Service (RaaS) on BNB Chain 5 | --- 6 | 7 | # What is Rollup as a Service 8 | 9 | Rollup-as-a-Service (RaaS) represents a transformative approach in the blockchain sphere, akin to Software-as-a-Service (SaaS) in the cloud computing domain, tailored specifically for decentralized applications (dApps) and blockchain projects. This innovative service model offers a cost-effective and efficient pathway for projects to build and deploy rollup networks. 10 | 11 | ## Alignment with BNB Chain's Roadmap and Ecosystem Growth 12 | 13 | The demand for RaaS within the BNB Chain ecosystem is not just a trend; it's a strategic response to the need for higher transaction throughput and enhanced scalability. As the chain eyes substantial growth, RaaS stands out as an essential service that supports this expansion. It does so by enabling developers to deploy scalable applications with ease, leveraging rollup technology to process transactions on Layer 2 network before finalizing them on the main blockchain(BSC). 14 | 15 | # Building with RaaS Aligned with BNB Chain’s Future 16 | 17 | Building with Rollup as a Service (RaaS) on the BNB Chain involves leveraging specialized services from providers like [NodeReal](https://nodereal.io/semita), [AltLayer](https://altlayer.io/), and [Movement Labs](https://movementlabs.xyz/), each offering unique tools to enhance blockchain application development. By adopting these specialized RaaS solutions, developers can leverage the strengths of the BNB Chain ecosystem to create innovative, reliable, and user-centric blockchain applications. 18 | 19 | | Service Provider | Developer tools and tech stack | How to Start | 20 | | ---------------- | ------------------------------------------------------------ | -------------------------- | 21 | | Altlayer | AltLayer offers versatile support for various rollup technologies and a no-code setup dashboard, making it easy to deploy and manage custom rollups for enhanced blockchain scaling. | https://altlayer.io/ | 22 | | Movement Labs | Movement Labs offers a Move-based Layer 2 solution on Binance Smart Chain, prioritizing security and scalability for a better developer and user experience. | https://movementlabs.xyz/ | 23 | | NodeReal | NodeReal provides comprehensive end-to-end blockchain infrastructure solutions for enterprises, including indexing, multi-sig wallets, explorers, and additional services. | https://nodereal.io/semita | 24 | | | | | -------------------------------------------------------------------------------- /docs/core-concepts/why-opstack.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Why OP Stack for opBNB 3 | description: Learn why OP Stack is used as the Foundation of opBNB 4 | icon: code 5 | index: yes 6 | dir: 7 | order: 1 8 | --- 9 | 10 | # Why OP Stack as the Foundation of opBNB 11 | 12 | Our team had extensive discussions and research before we embarked on the mission of creating a high performance optimistic rollup for BNB Smart Chain. 13 | 14 | ### Our goals were to: 15 | 16 | - Achieve a remarkable capacity of 100M gas per second. We conducted thorough research and optimization work for the BSC client, covering various aspects such as storage, execution and security. We applied these enhancements to the opBNB project as well, aiming to set a new standard for the layer 2 solution performance at 100M per second. 17 | - Provide a truly low cost layer 2 solution. Ethereum upgrades such as Proto-Danksharding and eventually full Danksharding will significantly lower the cost of posting data to Ethereum. However, until ethereum upgrades become a reality, we needed to find a flexible solution to reduce the calldata cost as posting data to Layer-1 is the main bottleneck for fees on rollups. 18 | - Contribute to the open source community. All research and optimization we introduced to the opBNB can be traced back to the Ethereum community to boost the ecosystem. 19 | 20 | The OP Stack is a framework for building scalable and interoperable layer-2 solutions based on the utility, simplicity and extensibility principles. By choosing OP Stack as the bedrock of opBNB, we can achieve several benefits, such as: 21 | 22 | - **Flexible execution client options for decentralisation and performance optimization:** opBNB can execute smart contracts using different client options, thanks to its modular replaceable execution design. This design allows opBNB to interact with the blockchain network in various ways, and increases the platform's decentralisation. opBNB can not only build the execution layer on top of the BSC execution client, but also does not depend on a single client implementation, which strengthens the decentralisation of the opBNB network. 23 | 24 | - **Replaceable DA for lower gas fee:** One of the key issues for layer-2 solutions is to guarantee that the data of the transactions can be accessed and verified by anyone. OP Stack addresses this issue by separating the DA layer from the execution layer, and enabling us to select from various DA options. With OP Stack, we can seamlessly switch between different DA schemes based on our security and performance needs. As a member of the BNB ecosystem, we can leverage BNB greenfield as a DA layer, which will bring down the cost even further. 25 | 26 | - **Open ecosystem:** OP Stack also fosters an open and collaborative ecosystem where different projects can work together and benefit from each other. By using OP Stack, we can join a network of chains that share the same tech stack and interoperate with each other. For example, we can connect with Optimism, which is another layer-2 platform based on OP Stack that supports EVM and Solidity. By being part of this ecosystem, we can increase our network effects, security and innovation. 27 | 28 | -------------------------------------------------------------------------------- /docs/faq/build-on-opbnb-faqs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Build on opBNB 3 | --- 4 | 5 | ### How to check if a smart contract is verified on opBNB using an API GET request? 6 | 7 | With the [API key](https://nodereal.io/meganode) and smart contract address, you can retrieve the contract's verification status, source code & ABI. 8 | 9 | For opBNB mainnet, `https://open-platform.nodereal.io/{{yourAPIkey}}/op-bnb-mainnet/contract/?action=getsourcecode&address={{contract address}}` 10 | 11 | For opBNB testnet, `https://open-platform.nodereal.io/{{yourAPIkey}}/op-bnb-testnet/contract/?action=getsourcecode&address={{contract address}}` 12 | 13 | ### Why does token info (like name, symbol) is not displayed on opBNBscan despite having contract verified? 14 | 15 | If the deployed contract is a proxy contract, then the info. will not be displayed as opBNBscan uses enhanced API to fetch the token details like name, symbol etc. In this case, enhanced API needs to call the implementation contract to fetch the token details. 16 | Currently, this feature is under development where enhanced API will make call to implementation contract when token info. returned from proxy contract is empty. 17 | 18 | ### What are the third-party provider services where we can purchase private RPC access? 19 | 20 | You can purchase private RPC access from [Nodereal](https://nodereal.io/meganode). 21 | 22 | ### Are there any grants or financial support for projects on opBNB? 23 | 24 | Yes, we provide the same support for opBNB as for BNB Smart Chain when it comes to grants or financing projects. Check [here](https://www.bnbchain.org/en/developers/developer-programs) for the complete details. 25 | 26 | ### Is there an ability to run nodes on opBNB? 27 | 28 | Check out the official [documentation](https://docs.bnbchain.org/opbnb-docs/docs/tutorials/running-a-testnet-node) to learn how to run nodes on opBNB. 29 | 30 | ### Can a native project on opBNB issues its token natively on opBNB? 31 | 32 | Yes, it is up to the project. 33 | 34 | ### What is the recommended approach for launching projects, should the project be natively launched on opBNB and then bridged to L1 or the other way around? 35 | 36 | The choice of L2 or L1 depends on the specific needs of the project. L2 offers better performance and lower cost, so it is advisable to use L2 as the starting point if these factors are important for the project. 37 | 38 | ### Is there a possibility of a shared sequencer/liquidity with other chains built on OPStack in the future? 39 | 40 | Unfortunately, no, in short term, this is BNB Chain team`s goal yet. 41 | 42 | ### What programming language is used for the opBNB chain and contracts? 43 | 44 | The pre-deployed smart contracts are written in Solidity, and opBNB is built with OP Stack framework. For details, please refer to [official docs](https://docs.bnbchain.org/opbnb-docs/docs/core-concepts/why-opstack) for more details. 45 | 46 | ### Are there any airdrops for opBNB? 47 | 48 | We want to clarify that there is NO airdrop planned for opBNB as of now. Please be cautious and aware of any claims or messages suggesting otherwise. Protect yourself from potential scams by staying vigilant and verifying information from official sources. 49 | 50 | ### What oracles and VRF does opBNB support? 51 | 52 | opBNB is a permissionless chain that allows any VRF and oracle services to be integrated. The 53 | first two services that have been launched on opBNB are Binance Oracle and Polythera, which 54 | provide reliable and secure data feeds for smart contracts. 55 | 56 | ### What to do if there is trouble verifying smart contract with all available methods using the 57 | 58 | Try using the alternative explorer for verifying your smart contracts. 59 | 60 | ### How do we set hardhat verification parameters for opBNB? 61 | 62 | Refer to the official Hardhat documentation [here](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify#adding-support-for-other-networks) 63 | 64 | ### How does opBNB handle the storage and execution of metadata associated with NFTs on its optimistic rollup? 65 | 66 | The process of creating and storing NFTs on the opBNB is similar to other blockchains. You need to have a smart contract that defines the properties and functions of your NFT, and then deploy it on the opBNB. To store the metadata of your NFT, such as the name, description, image, and other attributes, you can use various storage solutions. Some examples are BNB Greenfield, IPFS, and Filecoin. 67 | 68 | ### Why my opBNB node is unable to catch up with current blocks? 69 | 70 | There is a possibility that the node's chain has been forked and is different from other nodes. 71 | 72 | In the event that the chain is forked due to a hard fork, it is recommended to reset the blockchain and synchronize it with the latest version of the program: 73 | 74 | 1) Clear the data directory in OP Geth 75 | 2) Update the opbnb to latest version: `git clone -b v0.x.x git@github.com:bnb-chain/opbnb.git` 76 | 3) Update the op-geth to latest version: `git clone -b v0.x.x git@github.com:bnb-chain/op-geth.git` 77 | 78 | Follow the instructions here to re-sync the node: https://docs.bnbchain.org/opbnb-docs/docs/tutorials/running-a-local-node. Just note that make sure to use the latest version of opbnb and op-geth, and use the new version `genesis.json` and `rollup.json`. 79 | 80 | ### How to verify ERC1967Proxy upgradeable contract on opbnb-testnet by Hardhat? 81 | 82 | You can follow the instructions from How to verify a contract on [Etherscan/BscScan/PolygonScan](https://forum.openzeppelin.com/t/how-to-verify-a-contract-on-etherscan-bscscan-polygonscan/14225#if-proxy-is-not-verified-10) to use the solc-input.json to verify the proxy. 83 | 84 | ### How to get proxy's constructor arguments for verification? 85 | To form _data argument we need: 1) function name 2) owner address + argument1 + argument2 + etc. Then copy "Encoded data", add "0x" at the beginning of the text and past it as _data (Bytes) argument. For details, please refer to [openzeppelin docs](https://forum.openzeppelin.com/t/how-to-verify-upgradeable-contract-on-opbnb-testnet-by-hardhat/39495/6?u=serghd). 86 | 87 | An easier way is to look at the input data of the creation transaction for your proxy: https://testnet.opbnbscan.com/tx/0xa287b0b69472cb4961c528b16e799136a520f700b5407595314c3cdd0a21f8d6?tab=overview 3. You can see that the encoded constructor arguments are at the last portion of the bytecode. 88 | 89 | :::info Don't see your question? 90 | We are improving the FAQ from time to time, to include latest questions from the community and partners, bookmark this page! However, if you don't see your question, please feel free to ask in the [BNB forum](https://forum.bnbchain.org/) and [Discord](https://discord.com/invite/bnbchain support channel 91 | ::: 92 | -------------------------------------------------------------------------------- /docs/faq/cross-chain-faqs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cross Chain FAQs 3 | --- 4 | 5 | ### How does opBNB ensure data availability and security for off-chain transactions? 6 | 7 | opBNB relies on a mechanism called "fraud proofs" to ensure data availability and security. Users can submit proofs on-chain that demonstrate any malicious behavior or incorrect transaction processing on the off-chain optimistic rollup. If a fraud proof is valid, the system can penalize the malicious actor and revert any incorrect state changes. 8 | 9 | ### Who is responsible for gathering and bundling off-chain transactions into bundles on opBNB network? 10 | 11 | Sequencers are responsible for the aggregation of transactions, computation of the state transitions and submission of these to the rollup contract on BSC. 12 | 13 | ### What is the role of the aggregator in the opBNB network? 14 | 15 | Aggregators are entities responsible for gathering and bundling off-chain transactions into batches. They play a crucial role in opBNB by forming these transaction batches and submitting them to the main BNB chain for validation. Aggregators also generate Merkle proofs for the data they submit, which are essential for the anchoring process. 16 | 17 | ### Can opBNB handle smart contracts and complex computations like the main BNB Chain? 18 | 19 | The opBNB network is EVM compatible and works identically to BSC from a smart contract developer’s perspective. This means that developers can easily deploy their existing Ethereum or BSC smart contracts on opBNB with minimal changes. 20 | 21 | ### How does opBNB handle cross-contract interactions and composability? 22 | 23 | Cross-contract interactions and composability are challenging aspects for optimistic rollups. While opBNB can facilitate cross-contract interactions, the limitations of off-chain processing mean that certain complex composability scenarios might be less efficient or not supported at all. Developers and projects using opBNB need to carefully consider these limitations when designing their applications. 24 | 25 | ### What happens if there's a dispute about an off-chain transaction's validity? 26 | 27 | In the event of a dispute, a "challenge" period is initiated. During this period, anyone can 28 | submit a fraud proof to challenge the validity of an off-chain transaction. If the fraud proof 29 | is valid and proves that the transaction was incorrect or malicious, the transaction is 30 | reverted on-chain, and the malicious actor might face penalties. 31 | 32 | ### Can smart contracts deployed on the main BNB Smart Chain interact seamlessly with applications on opBNB? If yes, how? 33 | 34 | Yes, this is achieved through a set of smart contracts that enable the execution of transactions on the opBNB network. The main contract is the `batchInbox` contract, which receives batches of transactions from the Sequencer on L1. 35 | 36 | ### How to allow smart contract cross chain communication between L1 and L2? 37 | 38 | Directly interacting with smart contract functions that exist on L2(opBNB) from L1(BSC), is not possible as all smart contracts on L2 are isolated from L1. 39 | 40 | With that said, there is a way for developers to allow arbitrary message sending by writing their own contracts to build their required business logic. More details [here](https://community.optimism.io/docs/developers/bridge/messaging/#communication-basics-between-layers). 41 | 42 | 43 | :::info Don't see your question? 44 | We are improving the FAQ from time to time, to include latest questions from the community and partners, bookmark this page! However, if you don't see your question, please feel free to ask in the [BNB forum](https://forum.bnbchain.org/) and [Discord](https://discord.com/invite/bnbchain support channel 45 | ::: 46 | -------------------------------------------------------------------------------- /docs/faq/gas-and-fees-faqs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Gas and Fees FAQs 3 | --- 4 | 5 | ### What is the cost of transfer transaction on opBNB and why opBNB hold capacity to enable the mass adoption of daily small amount transactions? 6 | 7 | opBNB can make small daily transactions possible because the transaction fees are very low, around **$0.005** per transaction. This is much lower than traditional payment methods like credit cards which charge around **1-3%** per transaction. The low fees on opBNB make it economical for small purchases and daily transactions. 8 | 9 | ### What is the link to the canonical bridge for gas/stables? 10 | 11 | **For Testnet:** 12 | **For Mainnet:** 13 | 14 | ### Where can we get the token pricing for the BNB token on opBNB? 15 | 16 | You can get the token pricing for BNB on opBNB from 17 | [Coinmarketcap](https://coinmarketcap.com/currencies/bnb/) 18 | 19 | ### What is the block gas limit on opBNB? 20 | 21 | The block gas limit on opBNB is **100M/block**, and the block time of opBNB is **1 second**. 22 | 23 | ### How are transaction fees calculated on opBNB? 24 | 25 | You can details about the transaction fee calculation from [opBNB official 26 | docs](https://docs.bnbchain.org/opbnb-docs/docs/core-concepts/gas-and-fees) 27 | 28 | ### Are there any overheads to include in the gas calculation? 29 | 30 | Yes, there is a _fixed overhead_ for L1 data fee is **2100**, and _dynamic_overhead(L1 Fee Scala)_ is **1**. 31 | 32 | ### How are data storage fees for rollups calculated? 33 | 34 | The data storage fees for rollups are calculated using the following formula. 35 | 36 | ```math 37 | l1_data_fee = l1_gas_price * (tx_data_gas + fixed_overhead) * dynamic_overhead 38 | 39 | fixed_overhead = 2100 40 | 41 | dynamic_overhead = 1 42 | 43 | tx_data_gas = count_zero_bytes(tx_data) * 4 + count_non_zero_bytes(tx_data) * 16 44 | ``` 45 | 46 | ### What gas fees are associated with withdrawing opBNB assets from the main chain back to the layer 2 network? 47 | 48 | Gas fees associated with withdrawing assets from the main chain back to the layer 2 network depend on the BNB chain's gas price at the time of withdrawal. These fees cover the cost of anchoring data on-chain and updating the network state. 49 | 50 | ### where can I find out more information about L2 gas fees? 51 | Prominent Layer 2 mainnet gas fees resource. 52 | 53 | * [opBNB](https://opbnbscan.com/tx/0xa9f32fc3ef0b3338032bffc95f1c93e4d4bf6bdf6f0225b47e3b543b5421fdc0) 54 | * [Optimism](https://l2fees.info/) 55 | * [Arbitrum](https://l2fees.info/) 56 | * [Base](https://basescan.org/tx/0xd360162fb3474308acdf707f730cbff993168ef46610f5453b3a10d7d76deaa2) 57 | * [Starknet](https://l2fees.info/) 58 | * [Linea](https://l2fees.info/) 59 | * [Polygon zkEVM](https://l2fees.info/) 60 | * [zkSync](https://l2fees.info/) 61 | 62 | To also check BNB Chain’s Layer 1, BSC visit [here](https://bscscan.com/tx/0x1515e830b352a76bab8468d39c4924e1d220578ab0bf69eb09914e877c0713e5). 63 | 64 | ### Why is my opbnb transaction rejected or pending? 65 | There are several possible reasons why your transaction of opBNB may be rejected or pending. Here are some of the most common ones: 66 | 67 | * You have insufficient funds in your wallet to cover the transaction fee or the amount of opBNB you want to send. 68 | * You have set a gas price or gas limit that is too low for the network congestion level, resulting in a slow or failed transaction. 69 | * You have made a mistake in the contract interaction, such as calling a function that does not exist or sending an unsupported token type. 70 | * You have encountered a technical issue with your wallet provider, the opBNB network, or the smart contract you are interacting with. 71 | 72 | To troubleshoot your transaction, you can do the following: 73 | 74 | * Check your wallet balance and make sure you have enough funds to cover the transaction fee and the amount of opBNB you want to send. 75 | * Check the network status and adjust your gas price and gas limit accordingly. Sometimes the wallet like Trust Wallet or Metamask recommends the "max base fee" or "max priority fee" to "0". This is not accepted by the opBNB Mainnet and will result in a failed transaction. Please check your transaction details carefully before signing/confirming. If you see a "0" in the "max base fee" or "max priority fee" fields, do not proceed with the transaction. Instead, cancel it and try again until you see a normal fee recommendation. 76 | * Check the recipient address and make sure it is correct and valid. You can use a tool like https://opbnbscan.com/ to verify the address and see if it has any transactions history or contract code. 77 | * Contact your wallet provider, the opBNB network, or the smart contract developer for technical support if you suspect there is an issue on their end. 78 | 79 | 80 | 81 | ### Why the estimated transaction fee is zero in my wallet? 82 | 83 | It is because wallets are not well adapted to L2 networks. Wallets are designed for L1 networks, where the total transaction cost is calculated differently from L2 networks. 84 | 85 | For example, suppose you want to send some opBNB tokens on the opBNB network. When you use your wallet to approve the transaction, you will see that the estimated gas fee is 0BNB. This may seem like a great deal, but it is not the whole story. 86 | 87 | opBNB-bridge 92 | 93 | The gas fee you see in your wallet is based on the L2 part of the transaction, which is very low because it uses a batch processing technique to aggregate many transactions into one. The L2 part of the transaction consists of two components: the base fee and the priority fee. The base fee is a fixed amount that depends on the network congestion, and the priority fee is a variable amount that you can set to increase or decrease the speed of your transaction. For example, in our case, the base fee is 0.000000008 gwei and the priority fee is 0.00001 gwei, so the total L2 gas price is 0.000010008 gwei. The gas used is 21000, which is the standard amount for a transfer transaction. Therefore, the total L2 gas fee is 0.000010008 * 21000 = 0.210168 gwei, which is too small to be displayed in your wallet. 94 | 95 | opBNB-bridge 100 | 101 | However, this is not the only cost you have to pay for your transaction. There is also a layer 1 (L1) part of the transaction, which is the data cost. This is because every L2 transaction has to be recorded on the blockchain as data, and data storage on the blockchain is not free. The L1 part of the transaction depends on the size of the data and the L1 gas price at the time of submission. For example, in our case, the size of the data is 68 bytes and the L1 gas price is 249 gwei, so the total L1 gas fee is 68 * 249 = 16.932 gwei. 102 | 103 | Therefore, the actual cost of your transaction is the sum of the L2 and L1 parts, which is 0.210168 + 16.932 = 17.142168 gwei, or about 0.00001698 BNB, or about 0.003 USD at current prices. This is still very cheap compared to other blockchains, but it is not zero as your wallet shows. 104 | 105 | To verify this, you can check your transaction details on the opBNB explorer, where you will see both the L2 and L1 costs clearly displayed. 106 | 107 | opBNB-bridge 112 | 113 | We hope this helps you understand how opBNB works and why your wallet only shows the L2 cost. 114 | 115 | ### Why is one of transaction's gas fees so much higher than the rest? 116 | 117 | A known issue that can cause irregularly high gas prices in opBNB transactions could be due to a high L1 gas price which is calculated by averaging block transaction gas prices using the formula:
118 | ```(Txn Fee = Gas Price * Gas + L1 Gas Price * L1 Gas Used * L1 Fee Scalar)```
119 | This means that if there is an L1 block with an unusual high gas price, it will cause the gas price to be higher for a specific L2 block. This will be fixed going forward by introducing a static L1 gas price. 120 | 121 | :::info Don't see your question? 122 | We are improving the FAQ from time to time, to include latest questions from the community and partners, bookmark this page! However, if you don't see your question, please feel free to ask in the [BNB forum](https://forum.bnbchain.org/) and [Discord](https://discord.com/invite/bnbchain support channel 123 | ::: 124 | -------------------------------------------------------------------------------- /docs/faq/opbnb-bridge-faqs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: opBNB Bridge FAQs 3 | --- 4 | 5 | ### What is the status of the integration between opBNB and Optimism's Superchain? 6 | 7 | opBNB is a project that aims to bring the benefits of L2 scaling and user-friendly UX to the BNB ecosystem. It will enable fast and cheap transactions on BNB L2, as well as smooth interoperability with Greenfield, a decentralized platform for building and running applications. 8 | Superchain is an innovative solution that leverages OP Stack to provide L2/L3 scaling and security for Ethereum. It allows users to access various L2 protocols with a single wallet and enjoy low fees and high throughput. opBNB is interested in collaborating with Superchain and integrating OP Stack into BNBChain. 9 | 10 | ### What is the reason for the discrepancy in the estimated cost of withdraw/deposit transactions between the opBNB bridge page and my wallet? 11 | 12 | When you use the bridge to deposit or withdraw assets from opBNB, the bridge will estimate the gas cost for your transaction. This is done by simulating the execution of the transaction on the blockchain, without actually sending it or changing the state of the network. The simulation returns a number that indicates how much gas units the transaction would use if it was executed in the current network state. 13 | 14 | To get this number, the bridge uses a function called estimateGas, which implements a binary search algorithm between a lower and an upper bound of gas units. The lower bound is usually 21,000, which is the minimum gas required for a simple ether transfer. The upper bound is either specified by the user or derived from the block gas limit of the pending block. The function tries to execute the transaction with different gas values within this range until it finds the smallest gas value that does not cause an out-of-gas exception. This is the estimated gas usage of the transaction. 15 | 16 | For example: 17 | In this example, the bridge estimate of gas is around 0.0008 BNB, which is around $0.17. 18 | opBNB-bridge 23 | 24 | However, the wallet that you use to interact with the bridge may use a different method to calculate the estimated transaction cost. It may use the gas limit, which is the maximum amount of gas that you are willing to spend on the transaction. This is usually higher than the estimate given by the bridge. 25 | 26 | For example: 27 | The wallet estimate of the transaction is around 0.002 BNB, which is around $0.47. 28 | opBNB-bridge 33 | 34 | Once the transaction is executed on the chain, you can see the actual cost of the transaction in the opBNB explorer, which usually is similar to the estimate given by the bridge. 35 | 36 | 37 | ### Why your tokens on BSC are not received after 7 days of withdrawal request? 38 | 39 | You might have forgotten to sign the proof in the transaction history. This is a necessary step to initiate the 7 days challenge window. Without signing the proof, the bridge will not proceed with the challenge window and your withdrawal will be postponed. 40 | 41 | opBNB-bridge-withdraw-confirmation 46 | 47 | ### Why do I need to sign the proof to start the 7 days challenge window? 48 | 49 | When you withdraw tokens from opBNB to BSC, you need to provide a proof withdrawal to verify that your transaction on L2 is valid and consistent with the world state of L2. This is because L1 does not have access to the full world state of L2, only the data availability (DA) data and periodic snapshots of the world state from L2. The DA data is a compressed representation of the transactions on L2, which can be used to reconstruct the world state of L2 if needed. However, this process is expensive and time-consuming, so it is not done for every withdrawal. Instead, you need to submit a proof withdrawal, which is a cryptographic proof that your transaction on L2 matches the world state of L2 at a certain point in time. This way, you can ensure that your withdrawal is secure and accurate, and that no one can cheat or double-spend on L2. 50 | 51 | 52 | :::info Don't see your question? 53 | We are improving the FAQ from time to time, to include latest questions from the community and partners, bookmark this page! However, if you don't see your question, please feel free to ask in the [BNB forum](https://forum.bnbchain.org/) and [Discord](https://discord.com/invite/bnbchain support channel 54 | ::: 55 | -------------------------------------------------------------------------------- /docs/faq/opbnb-faq.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FAQs 3 | sidebar_label: FAQs 4 | --- 5 | 6 | In this section of the documentation, we cover FAQs related to opBNB. For easy navigation, we have divided the FAQs into multiple categories. 7 | 8 | * [Protocol](protocol-faqs.md) 9 | * [Gas and Fees](gas-and-fees-faqs.md) 10 | * [opBNB Bridge](opbnb-bridge-faqs.md) 11 | * [Cross Chain](cross-chain-faqs.md) 12 | * [Building on opBNB](build-on-opbnb-faqs.md) 13 | 14 | :::info Don't see your question? 15 | We are improving the FAQ from time to time, to include latest questions from the community and partners, bookmark this page! However, if you don't see your question, please feel free to ask in the [BNB forum](https://forum.bnbchain.org/) and [Discord](https://discord.com/invite/bnbchain support channel 16 | ::: 17 | -------------------------------------------------------------------------------- /docs/faq/protocol-faqs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Protocol FAQs 3 | --- 4 | 5 | ### How does opBNB achieve high performance and cheap gas fees? 6 | 7 | opBNB testnet enhances the performance of the "Execution Layer" and the "Derivation Layer" of the OP Stack as highlighted in [OP Stack landscape](https://stack.optimism.io/docs/understand/landscape/?ref=binance.ghost.io#existing-landscape). 8 | 9 | ### How do you expect the TPS of the opBNB? 10 | 11 | The TPS of opBNB can be estimated to be around **4,761** transactions per second based on the calculations. This is significantly higher than Ethereum's current TPS and can enable more frequent daily transactions. 12 | 13 | ### What impact opBNB can bring to web3 games? 14 | 15 | Performance is important for games because gamers expect a highly responsive experience. Any lag, delay or choppiness can hamper enjoyment and immersion in the game. For blockchain games, fast transaction speeds and throughput are crucial to enable a seamless user experience. Gamers expect in-game assets and currencies to be transferred instantly, so the underlying blockchain network must be high performance 16 | 17 | ### What is the difference between opBNB and other Optimism based layer 2 solution, like Base? 18 | opBNB is the first layer 2 optimistic rollup on BSC, and BSC layer 1 cost is much lower than ETH, so the cost of layer 2 on BSC will give application developers a more affordable solution. Another difference is the opBNB will include the performance optimization techniques that have been used in BSC to have a much better performance. 19 | 20 | ### We already have the zkBNB as a scaling solution, why opBNB is needed? 21 | zkBNB is not EVM-comptatible, which means it is more suitable for NFT and token transactions, not for generic dApps. opBNB`s programmability is to support applications that need more flexibility. 22 | 23 | ### Is opBNB connected to the superchain or is unrelated? Can opBNB be considered as just optimistic rollups on the BNB Smart Chain? 24 | 25 | opBNB can be considered as just rollups on BSC, not superchain. Please check 26 | [this](https://bnbchain.org/en/blog/opbnb-high-performance-and-low-cost-layer-2-based- 27 | on-optimism-op-stack/) blog for more details. We may expand opBNB to superchain or 28 | L3 in the future. 29 | 30 | ### What are the differences between opBNB, the OP Stack, and Arbitrum Orbit? What are the pros and cons of these different tech stacks? 31 | 32 | Check [this](https://bnbchain.org/en/blog/opbnb-high-performance-and-low-cost-layer-2-based- 33 | on-optimism-op-stack/) blog for more details on the differences between opBNB, the OP 34 | Stack, and Arbitrum Orbit. 35 | 36 | ### Why OP Stack is used for the implementation of opBNB instead of zkEVM? 37 | 38 | OP Stack is a reliable and robust solution that has been verified through rigorous testing. 39 | OP Stack is designed with modularity in mind, allowing it to support multiple clients and 40 | different data access layers without affecting other parts of the code. opBNB leverages 41 | OP Stack as a solid foundation to explore various ways to lower the cost and enhance 42 | the user experience. 43 | 44 | ### Are transactions nonce-order enforced? 45 | 46 | Yes, on opBNB transactions, nonce-order enforced. 47 | 48 | ### How does opBNB prevent front-running and other transaction-related attacks? 49 | 50 | Front-running and other transaction-related attacks are challenges faced by many 51 | blockchain systems. opBNB uses mechanisms like transaction ordering and 52 | timestamping to mitigate these attacks. Aggregators are incentivized to order 53 | transactions fairly and not prioritize their own transactions, reducing the potential for 54 | front-running. 55 | 56 | ### Can I run my own validator or aggregator node on the opBNB network? 57 | 58 | The opBNB network currently does not support running validator or aggregator nodes by 59 | individual users. However, we are working on this feature and plan to release it in the future. 60 | Please keep following opBNB for the latest updates. 61 | 62 | ### How does opBNB handle reentrancy attacks within its optimistic rollup framework? 63 | 64 | opBNB employs a combination of security measures, including strict transaction ordering 65 | and careful state management, to prevent reentrancy attacks. By enforcing a controlled 66 | and deterministic execution order, reentrancy attacks are mitigated. 67 | 68 | ### What's the mechanism for preventing long-range attacks on the opBNB network? 69 | 70 | opBNB implements a checkpointing mechanism that anchors its state onto the main 71 | BNB chain. This helps prevent long-range attacks by ensuring that the latest valid state 72 | is preserved on-chain, making any attempted reorganizations infeasible. 73 | 74 | ### How does opBNB ensure the ordering of transactions in a decentralized manner without central coordination? 75 | 76 | The opBNB team is responsible for operating the sequencer, which ensures the correct 77 | order of transactions on the network. The sequencer is a centralized component that 78 | provides a reliable and efficient service for the users. 79 | 80 | ### How does opBNB handle disputes arising from cases where the fraud proof itself is malicious or incorrect? 81 | 82 | opBNB employs a challenge mechanism to resolve disputes. If a malicious fraud proof is 83 | submitted, honest participants can submit counter-fraud proofs to correct the situation. 84 | The challenge period provides time for these proofs to be evaluated. 85 | 86 | ### What is the challenge period on opBNB? 87 | 88 | During the challenge period, any participant on the blockchain can raise challenges against the validity of the transactions or the execution results provided by the L2 sequencer. This mechanism is crucial for ensuring the integrity and correctness of the L2 execution. 89 | 90 | ### What is the difference between validity proof and fraud proof? 91 | 92 | The validity proof is efficient at verifying, verifiers just need to check the “proof” once and 93 | confirm the correctness, but the disadvantage is that it is hard to generate the proof, 94 | both in algorithm and in efficiency. A popular validity proof solution is zero knowledge 95 | proof. On the other hand, the fraud proof is efficient at execution since it doesn’t 96 | generate any proof at execution time, but the shorthand is that a specific time window 97 | must be established for participants to challenge the correctness of the L2 state, which 98 | will highly affect the finality of the L2 results. 99 | 100 | ### What is the duration of the challenge period? 101 | 102 | The challenge window is shorter on the testnet of opBNB, so you can test the withdrawal 103 | process faster. On the mainnet of opBNB, the challenge window will be 7 days long. 104 | 21. What are the penalties for dishonest sequencers? 105 | In case a sequencer is proven to be dishonest or provides incorrect execution results, 106 | penalties are applied. The sequencer's bond may be slashed as a form of punishment. 107 | Additionally, the state roots from the problematic transaction onwards will be erased and 108 | re-computed to ensure accuracy. 109 | 110 | ### How to check if a smart contract is verified on opBNB using an API GET request? 111 | With the [API key](https://nodereal.io/meganode) and smart contract address, you can retrieve the contract's verification status, source code & ABI. 112 | For opBNB mainnet, https://open-platform.nodereal.io/{{yourAPIkey}}/op-bnb-mainnet/contract/?action=getsourcecode&address={{contract address}}. 113 | For opBNB testnet, https://open-platform.nodereal.io/{{yourAPIkey}}/op-bnb-testnet/contract/?action=getsourcecode&address={{contract address}}. 114 | 115 | ### How to get the finalized block height on opBNB and why is it always hundreds blocks behind the latest? 116 | The difference between latest and finalized by more than 200 blocks is expected. This is the concept in the OP design. The latest is defined as the latest unsafe block. The finalized means that the L2 block has been committed to L1 and the corresponding L1 block is finalized (by fast finality or natural finality). 117 | 118 | :::info Don't see your question? 119 | We are improving the FAQ from time to time, to include latest questions from the community and partners, bookmark this page! However, if you don't see your question, please feel free to ask in the [BNB forum](https://forum.bnbchain.org/) and [Discord](https://discord.com/invite/bnbchain support channel 120 | ::: 121 | -------------------------------------------------------------------------------- /docs/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: What is opBNB 3 | icon: code 4 | index: yes 5 | dir: 6 | order: 1 7 | --- 8 | 9 | # opBNB - High-performance layer 2 solution 10 | 11 | The opBNB network is the Layer 2 scaling solution for the BNB Smart Chain powered by [bedrock version](https://community.optimism.io/docs/developers/bedrock/) of Optimism OP Stack. It works by offloading transaction processing and resource usage from the BNB Smart Chain, while still posting data to the underlying mainnet. Users interact with the opBNB network by depositing funds from BSC and using applications and contracts on opBNB. Sequencers then aggregate transactions, compute state transitions and submit them to the rollup contract on BSC. Provers generate cryptographic proofs that prove the validity of these state transitions, and Verifiers check the proofs to verify the opBNB state is correct. At its core, opBNB allows users to deposit and withdraw funds, use smart contracts, and view network data with high throughput and low fees. By leveraging Layer 2, opBNB is able to scale beyond the constraints of the BNB Smart Chain and provide an improved experience for users. 12 | 13 | ![image-20230621190244472](../../opbnb-docs/static/img/opBNB-intro.png) 14 | 15 | Besides the [differentiators of bedrock](https://docs.optimism.io/stack/differences), opBNB is the solution that we aim to provide the best optimistic solution on the BSC. 16 | 17 | - Capacity can reach to > 100m gas per second, which is much higher than other layer 2 solutions on the Ethereum. 18 | - Gas fee of transfer can reach as low as $0.001 on average. 19 | - block time is 1 second. 20 | -------------------------------------------------------------------------------- /docs/intro/why-opbnb.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Why do we need opBNB 3 | description: Learn why opBNB is needed 4 | icon: code 5 | index: yes 6 | dir: 7 | order: 2 8 | --- 9 | 10 | ## Why do we need opBNB 11 | 12 | Large-scale Web3 applications like games, social networks, the metaverse, and high-frequency trading face significant challenges when built directly on Layer 1 chains. Networks like BNB Smart Chain, Ethereum, and Polygon were not designed to handle the high transaction volumes and intensive daily active users of these applications. For example, a game like Crypto Blades on BSC with 300K daily active users and 18 million transactions per day can overload the BNB Smart Chain, leading to unacceptable gas fees and network responsiveness. 13 | The gas fees of these Layer 1 chains are still too expensive for most games and applications, which usually prefer low or no fees. A single game with 1 million daily active users could spend thousands of BNB on gas fees during peak periods. Layer 2 scaling solutions built on top of Layer 1 chains offer a solution. They can provide high throughput beyond Layer 1 constraints. The opBNB network is built on OP Stack and designed for over 4,000 TPS and gas fees under $0.001 on average for transfer transactions. 14 | By offloading transaction processing and resource usage to Layer 2 while still securely posting data to the underlying BNB Smart Chain, applications gain major throughput benefits without sacrificing decentralisation or composability. Layer 2 solutions are suitable for applications where scale and user experience are crucial, such as games, social networks, the metaverse, and high-frequency trading. 15 | 16 | - **High Performance:** opBNB is designed to achieve an impressive capacity of 100 million gas per second. This significant increase compared to existing Layer 1 solutions facilitates fast and efficient transaction processing, a crucial requirement for large-scale Web3 applications. 17 | - **Scalability:** Leveraging the OP Stack framework, opBNB delivers scalability far beyond the constraints of Layer 1 chains. It's designed for over 4,000 Transactions Per Second (TPS), a significant improvement over Layer 1 chains' capabilities, thus accommodating high-volume applications. 18 | - **Cost Efficiency:** One of opBNB's significant selling points is reduced transaction cost. It is designed to maintain gas fees under $0.001 on average for transfer transactions, a significant reduction from standard Layer 1 gas fees, making it affordable for a wider user base. 19 | - **Compatibility:** opBNB aligns its parameters with the BNB Smart Chain. For instance, the block time has been set to match BNB Chain's block time of 1 second, enabling faster transaction processing compared to other Layer 2 solutions like Optimism on Ethereum with a block time of 2 seconds. 20 | - **Security:** opBNB employs sequencers, provers, and verifiers to ensure secure state transitions and transactions. Its rollup is secured by its settlement chain, benefiting from the consensus and data availability solutions of the BNB Smart Chain, ensuring robust security. 21 | - **Flexibility:** The OP Stack foundation provides a modular and replaceable execution design, making opBNB not only dependent on a single client implementation but able to interact with the blockchain network in various ways, enhancing platform decentralization and flexibility. 22 | - **Interoperability:** opBNB's foundation on OP Stack means it can interoperate with other Layer 2 platforms like Optimism that support EVM and Solidity, thus fostering an open and collaborative ecosystem, driving network effects, security, and innovation. 23 | - **Data Availability:** opBNB addresses data accessibility by separating the Data Availability (DA) layer from the execution layer, allowing the selection of various DA options and enabling seamless switching between different DA schemes based on security and performance needs. 24 | - **Community Engagement:** The launch of the opBNB testnet and mainnet will directly involve the community in testing and providing feedback. This open feedback loop fosters strong community engagement and contributes to the evolution and development of opBNB. 25 | - **Leverage Active BNB User base:** One of our main advantages is that we can leverage the large user base of the BNB ecosystem, which consists of millions of loyal customers who trust our brand and services. This gives us a competitive edge over other platforms that lack such a network effect and have to spend more on marketing and customer acquisition. 26 | - **Integration with BNB Ecosystem:** opBNB integrates with the BNB ecosystem to leverage the benefits of the BNB Greenfield. This allows us to offer secure, scalable and cost-effective solutions for our clients. By using the BNB token as a payment method, we also enable faster and cheaper transactions across the network. 27 | -------------------------------------------------------------------------------- /docs/tech-specs/censorship-resistence.md: -------------------------------------------------------------------------------- 1 | # The sequencer and censorship resistance mechanism 2 | -------------------------------------------------------------------------------- /docs/tech-specs/parameters.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Core Parameters you may want to know 3 | icon: code 4 | index: yes 5 | dir: 6 | order: 2 7 | --- 8 | 9 | :::caution 10 | This is a living document and is susceptible to changes. 11 | ::: 12 | 13 | ## Core parameters you may want to know 14 | 15 | OpBNB is a layer 2 scaling solution for BNB Chain that leverages the Optimism opstack. It aims to provide faster, cheaper and more secure transactions for BNB Chain users and developers. OpBNB is compatible with BNB Chain's smart contract functionality. 16 | 17 | However, as BNB Chain has some differences from Ethereum, we need to make some compatibility changes accordingly. For example, BNB Chain's block time is 3 seconds, whereas Ethereum's is 12 seconds. BNB Chain's block gas limit is also different from Ethereum's. These differences affect how we configure our opBNB deployment and how we handle reorgs and fraud proofs. 18 | 19 | I will explain the parameters we have changed for opBNB and why we changed them. We will also share some of the challenges and opportunities we faced while developing opBNB and how we plan to overcome them. 20 | 21 | ## Parameters We Changed for opBNB 22 | 23 | To deploy opBNB on BNB Chain, we had to adjust some parameters. Here are some of the most important ones: 24 | 25 | - Block time: The block time of opBNB is set to match the block time of BNB Chain, which is 1 seconds. This means that opBNB can process transactions faster than Optimism on Ethereum, which has a block time of 2 seconds. 26 | 27 | - Block gas limit: One of the changes that OpBNB has made is to increase the block gas limit to 100 million gas units, which is higher than the block gas limit of Optimism on Ethereum, which is 30 million gas units. This is to accommodate the higher block gas limit of BNB Chain and to allow more applications to migrate from BSC to OpBNB. 28 | 29 | - EIP-1559 Gas Settings: TBD 30 | 31 | - Miscellaneous: As we have changed the block time, the corresponding configurations that are related with the block time need to be changed as well. For example the SequencerWindowSize, we changed from 3600 to 14400 because of the block time change and we want to keep the window size time unchanged. For more details, you can refer to the [optimism configuration doc](https://stack.optimism.io/docs/build/conf/#). 32 | 33 | ## Why We Changed These Parameters 34 | 35 | We changed these parameters for opBNB to make it more compatible with BNB Chain and to optimize its performance and security. By aligning the block time and block gas limit of opBNB with those of BNB Chain, we can achieve faster transaction throughput and lower transaction costs for opBNB users and developers. 36 | -------------------------------------------------------------------------------- /docs/tech-specs/plans.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Future Plans (2023) 3 | icon: code 4 | index: yes 5 | dir: 6 | order: 1 7 | --- 8 | 9 | :::caution 10 | This is a living document and is susceptible to changes. 11 | ::: 12 | 13 | ## Future Plans for opBNB(2023) 14 | 15 | Developing opBNB on BNB Chain has been an exciting and rewarding journey for us. We have faced some challenges along the way, such as adapting to BNB Chain's unique features and specifications, testing our code on different environments and networks, and ensuring the compatibility and interoperability of opBNB with other BNB Chain projects and protocols. 16 | 17 | However, we have also encountered many opportunities and benefits from building opBNB on BNB Chain. BNB Chain is a fast-growing and vibrant ecosystem that offers a rich variety of dApps, DeFi protocols, NFT platforms, and gaming projects. BNB Chain also has a large and active community of users, developers, and validators that support its development and adoption. By deploying opBNB on BNB Chain, we can tap into this ecosystem and community and provide them with a scalable and secure layer 2 solution that enhances their experience and value. 18 | 19 | We are currently working hard to launch the opBNB testnet, which will allow users and developers to try out opBNB and give us feedback on its functionality and performance. We are also working on integrating opBNB with other BNB Chain projects and protocols. We aim to create a seamless and interoperable layer 2 ecosystem on BNB Chain that offers users and developers more choices and possibilities. 20 | -------------------------------------------------------------------------------- /docs/tech-specs/solidity-difference.md: -------------------------------------------------------------------------------- 1 | # Solidity differences from Ethereum and BSC -------------------------------------------------------------------------------- /docs/tutorials/chain-configuration.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Chain Configuration 3 | description: New L2 Rollup Configuration 4 | --- 5 | 6 | # New Blockchain Configuration 7 | 8 | New l2 rollup blockchains are currently configured with a JSON file inside the [opbnb](https://github.com/bnb-chain/opbnb). The file is ./packages/contracts-bedrock/deploy-config/.json. 9 | 10 | ## Admin addresses 11 | 12 | | Key | Type | Description |Default / Recommended value| 13 | |:-----:|:-----:|:---------------------:|:------:| 14 | | finalSystemOwner | L1 Address | Address that will own all ownable contracts on L1 once the deployment is finished, including the ProxyAdmin contract. | It is recommended to have a single admin address to retain a common security model. | 15 | | proxyAdminOwner | L2 Address | ddress that will own the ProxyAdmin contract on L2. The L2 ProxyAdmin contract owns all of the Proxy contracts for every predeployed contract in the range 0x42...0000 to 0x42..2048. This makes predeployed contracts easily upgradeable. | It is recommended to have a single admin address to retain a common security model. | 16 | 17 | 18 | ## Fee recipients 19 | 20 | | Key | Type | Description |Default / Recommended value| 21 | |:-----:|:-----:|:--------:|:------:| 22 | | baseFeeVaultRecipient | L1 or L2 Address | Address that the base fees from all transactions on the L2 can be withdrawn to. | It is recommended to have a single admin address to retain a common security model. | 23 | | l1FeeVaultRecipient | L1 or L2 Address | Address that the L1 data fees from all transactions on the L2 can be withdrawn to. | It is recommended to have a single admin address to retain a common security model. | 24 | | sequencerFeeVaultRecipient | L1 or L2 Address | Address that the tip fees from all transactions on the L2 can be withdrawn to. | It is recommended to have a single admin address to retain a common security model. | 25 | 26 | ## Minimum Fee Withdrawal Amounts 27 | 28 | | Key | Type | Description | Default / Recommended value | 29 | |:-----:|:-----:|:--------------:|:-------------------:| 30 | | baseFeeVaultMinimumWithdrawalAmount | Number in wei | The minimum amount of BNB the BaseFeeVault contract must have for a fee withdrawal. | 10 BNB | 31 | | l1FeeVaultMinimumWithdrawalAmount | Number in wei | The minimum amount of BNB the L1FeeVault contract must have for a fee withdrawal. | 10 BNB | 32 | | sequencerFeeVaultWithdrawalAmount | Number in wei | The minimum amount of BNB the SequencerFeeVault contract must have for a fee withdrawal. | 10 BNB | 33 | 34 | ## Withdrawal Network 35 | 36 | | Key | Type | Description | Default / Recommended value | 37 | |:-----:|:-----:|:---------------------------:|:-------------------------:| 38 | | baseFeeVaultWithdrawalNetwork | Number representing network enum | A value of 0 will withdraw BNB to the recipient address on L1 and a value of 1 will withdraw BNB to the recipient address on L2. | | 39 | | l1FeeVaultWithdrawalNetwork | Number representing network enum | A value of 0 will withdraw ETH to the recipient address on L1 and a value of 1 will withdraw ETH to the recipient address on L2. | | 40 | | sequencerFeeVaultWithdrawalNetwork | Number representing network enum | A value of 0 will withdraw BNB to the recipient address on L1 and a value of 1 will withdraw BNB to the recipient address on L2. | | 41 | 42 | ## Misc. 43 | 44 | | Key | Type | Description | Default / Recommended value | 45 | |:-----:|:-----:|:------------:|:---------------------------:| 46 | | numDeployConfirmations | Number of blocks | Number of confirmations to wait when deploying smart contracts to L1. | 1 | 47 | | l1StartingBlockTag | Block hash | Block tag for the L1 block where the L2 chain will begin syncing from. Generally recommended to use a finalized block to avoid issues with reorgs. | | 48 | | l1ChainID | Number | Chain ID of the L1 chain. | 97 for bsc testnet. | 49 | | l2ChainID | Number | Chain ID of the L2 chain. | 901 | 50 | 51 | ## Blocks 52 | 53 | | Key | Type | Description | Default / Recommended value | 54 | |:-----:|:-----:|:------------------------:|:---------------:| 55 | | l2BlockTime | Number of seconds | Number of seconds between each L2 block. Must be < = L1 block time | 1 | 56 | | maxSequencerDrift | Number of seconds | How far the L2 timestamp can differ from the actual L1 timestamp | 600 (10 minutes) | 57 | | sequencerWindowSize | Number of blocks | Maximum number of L1 blocks that a Sequencer can wait to incorporate the information in a specific L1 block. For example, if the window is 10 then the information in L1 block n must be incorporated by L1 block n+10. | 3600 (3 hours) | 58 | | channelTimeout | Number of blocks | Maximum number of L1 blocks that a transaction channel frame can be considered valid. A transaction channel frame is a chunk of a compressed batch of transactions. After the timeout, the frame is dropped. | 300 (15 minutes) | 59 | | p2pSequencerAddress | L1 Address | Address of the key that the Sequencer uses to sign blocks on the p2p network. | Sequencer, an address for which you own the private key | 60 | | batchInboxAddress | L1 Address | Address that Sequencer transaction batches are sent to on L1. | 0xff00…00901 | 61 | | batchSenderAddress | L1 Address | Address that nodes will filter for when searching for Sequencer transaction batches being sent to the batchInboxAddress. Can be updated later via the SystemConfig contract on L1. | Batcher, an address for which you own the private key | 62 | 63 | ## Proposal Fields 64 | 65 | | Key | Type | Description | Default / Recommended value | 66 | |:-----:|:------------------:|:--------------:|:---------------------------:| 67 | | l2OutputOracleStartingBlockNumber | Number | Block number of the first block. | 0 | 68 | | l2OutputOracleStartingTimestamp | Number | Timestamp of the first block. This MUST be the timestamp corresponding to the block defined by the l1StartingBlockTag. | | 69 | | l2OutputOracleSubmissionInterval | Number of blocks | Number of blocks between proposals to the L2OutputOracle | 120 | 70 | | finalizationPeriodSeconds | Number of seconds | Number of seconds that a proposal must be available to challenge before it is considered finalized by the OptimismPortal contract. | Recommend 12 on test networks, seven days on production ones | 71 | | l2OutputOracleProposer | L1 Address | Address that is allowed to submit output proposals to the L2OutputOracle contract | | 72 | | l2OutputOracleChallenger | L1 Address | Address that is allowed to challenge output proposals submitted to the L2OutputOracle. | It is recommended to have a single admin address to retain a common security model. | 73 | 74 | ## L1 data fee 75 | 76 | ### Bedrock & Regolith 77 | 78 | | Key | Type | Description | Default / Recommended value | 79 | |:-----:|:--------:|:-----------:|:-------:| 80 | | gasPriceOracleOverhead | Number | Fixed L1 gas overhead per transaction. | 2100 | 81 | | gasPriceOracleScalar | Number | Dynamic L1 gas overhead per transaction, given in 6 decimals. Default value of 1000000 implies a dynamic gas overhead of exactly 1x (no overhead). | 1000000 | 82 | 83 | ### Ecotone 84 | 85 | | Key | Type | Description | Default / Recommended value | 86 | |:-----:|:--------:|:--------------:|:---------------------------:| 87 | | gasPriceOracleBaseFeeScalar | Number | Scalar applied to the Ethereum base fee in the L1 data fee cost function, given in 6 decimals. | 1000000 | 88 | | gasPriceOracleBlobBaseFeeScalar | Number | Scalar applied to the Ethereum blob base fee in the L1 data fee cost function, given in 6 decimals. | 0 | 89 | 90 | ## EIP 1559 gas algorithm 91 | 92 | | Key | Type | Description | Default / Recommended value | 93 | |:-----:|:--------:|:--------:|:-------------------:| 94 | | eip1559Denominator | Number | Denominator used for the EIP1559 gas pricing mechanism on L2. A larger denominator decreases the amount by which the base fee can change in a single block. | 50 | 95 | | eip1559Elasticity | Number | Elasticity for the EIP1559 gas pricing mechanism on L2. A larger elasticity increases the maximum allowable gas limit per block. | 10 | 96 | | l2GenesisBlockGasLimit | String | Initial block gas limit, represented as a hex string. Default is 25m, implying a 2.5m target when combined with a 10x elasticity. | 0x17D7840 | 97 | | l2GenesisBlockBaseFeePerGas | String | Initial base fee, used to avoid an unstable EIP1559 calculation out of the gate. Initial value is 1 gwei. | 0x3b9aca00 | 98 | 99 | ## Governance token 100 | 101 | | Key | Type | Description | Default / Recommended value | 102 | |:-----:|:--------:|:-----------:|:------------------:| 103 | | governanceTokenOwner | L2 Address | Address that will own the token contract deployed by default to every chain. | | 104 | | governanceTokenSymbol | String | Symbol for the token deployed by default to each chain. | | 105 | | governanceTokenName | String | Name for the token deployed by default to each chain. | | 106 | 107 | ## OP-Batcher Configuration 108 | 109 | | Key | Type | Description | Default / Recommended value | 110 | |:-----:|:--------:|:----------------------:|:---------------------------:| 111 | | OP_BATCHER_MAX_CHANNEL_DURATION | Number | The maximum duration of L1-blocks to keep a channel open. Set to 0 to disable. | 0 | 112 | | OP_BATCHER_BATCH_TYPE | Number | The batch type. Set to 0 for SingularBatch and 1 for SpanBatch. | 0 | 113 | | OP_BATCHER_DATA_AVAILABILITY_TYPE | String | The data availability type to use for submitting batches to the L1. Valid options: calldata, blobs | calldata | 114 | | OP_BATCHER_TARGET_NUM_FRAMES | Number | The target number of frames to create per channel. Controls number of blobs per blob tx, if using Blob DA. | 1 | 115 | | OP_BATCHER_TXMGR_MIN_BASEFEE | Number | Enforces a minimum base fee (in GWei) to assume when determining tx fees. 1 GWei by default. | 1 | 116 | | OP_BATCHER_TXMGR_MIN_TIP_CAP | Number | Enforces a minimum tip cap (in GWei) to use when determining tx fees. 1 GWei by default. | 1 | 117 | | OP_BATCHER_RESUBMISSION_TIMEOUT | Number | Duration to wait before resubmitting a transaction to L1. | 48s | 118 | -------------------------------------------------------------------------------- /docs/tutorials/full-stack-dapp.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Create a Full Stack dapp 3 | description: Build Full Stack dapp using Truffle and React on opBNB 4 | --- 5 | 6 | # Create a Full Stack dapp using Truffle and React on opBNB 7 | 8 | In this tutorial, we'll deploy a simple HelloWorld smart contract on opBNB and build a Web3 frontend using React to interact with the deployed smart contract, i.e., read from and write to the opBNB blockchain. 9 | 10 | ## What are we building 11 | 12 | opBNB is essentially an optimized layer-2 solution that delivers lower fees and higher throughput to unlock the full potential of the BNB Chain. 13 | 14 | For this tutorial, we will deploy a simple `HelloWorld` smart contract on the opBNB network and build a frontend using Reactjs to interact with the deployed smart contract for reading and writing data onto the opBNB blockchain. 15 | The `HelloWorld` smart contract is a simple string variable message that will be used for storing the user-defined messages, e.g., `Hello, opBNB User`. The `updateMessage` function will be used for updating the message variable to any user-defined string value. 16 | 17 | This smart contract will then be deployed on the opBNB network using [Truffle IDE](https://trufflesuite.com/). We will then use the [Reactjs boilerplate](https://create-react-app.dev/) to build a front end to communicate with the smart contract. [Web3.js library](https://web3js.readthedocs.io/en/v1.10.0/#) is used for interacting with the smart contract and reading and writing data to the opBNB blockchain. We further use [Metamask](https://metamask.io/) for signing transactions and paying any gas costs. 18 | 19 | :::note 20 | 21 | This is a basic example for educational purposes, and it assumes familiarity with [Truffle](https://trufflesuite.com/), [React](https://react.dev/), and [MetaMask](https://metamask.io/). 22 | 23 | ::: 24 | 25 | ## Learning Takeaways 26 | 27 | By the end of this tutorial, you will be able to achieve the following 28 | 29 | - Use Truffle IDE to spin up a project template and write, compile, and deploy a simple smart contract on the opBNB. 30 | - Create a front end for interacting with the deployed smart contract using ReactJS. 31 | - Interact with smart contracts deployed on opBNB via ReactJS frontend using Web3.js library. 32 | 33 | ## Pre-requisites 34 | 35 | - [Node.js (Node v18.14.2)](https://nodejs.org/en/download/) 36 | - [Metamask Web Wallet](https://metamask.io/) 37 | - [Truffle v5.10.0](https://trufflesuite.com/docs/truffle/how-to/install/) 38 | - Get tBNB in your Metamask wallet configured with opBNB Testnet 39 | - [Metamask Wallet Configuration for opBNB.](https://docs.bnbchain.org/opbnb-docs/docs/build-on-opbnb/wallet-configuration) 40 | - [Deposit tBNB to your opBNB account](https://docs.bnbchain.org/opbnb-docs/docs/build-on-opbnb/deposit-to-opbnb) 41 | 42 | ## Demo Step-by-Step Guide 43 | 44 | For this tutorial, we will be using Truffle IDE to develop, compile and deploy a simple `HelloWorld` smart contract on the opBNB network. For building the front end, we will be using the `create-react-app` React boilerplate. Further, to connect our dapp to the web3 world, we will be using the Metamask wallet. 45 | 46 | ### Step 1: Set up the project 47 | 48 | 1. Make sure you have Node.js and npm installed on your machine. 49 | 50 | 2. Install Truffle globally by running the following command 51 | 52 | ```shell 53 | npm install -g truffle 54 | ``` 55 | 56 | 3. Create a new directory for your project and navigate into it 57 | 58 | ```shell 59 | mkdir HelloWorldDapp 60 | cd HelloWorldDapp 61 | ``` 62 | 63 | 4. Initialize a new Truffle project. Create a [bare Truffle project](https://trufflesuite.com/docs/truffle/getting-started/creating-a-project.html) which generates the required directory structure to test and deploy contracts: 64 | 65 | ```shell 66 | truffle init 67 | ``` 68 | 69 | Truffle creates the following directory structure for your project: 70 | 71 | - `contracts/`: directory for your [Solidity contracts](https://trufflesuite.com/docs/truffle/getting-started/interacting-with-your-contracts). 72 | - `migrations/`: directory for the [scriptable deployment files](https://trufflesuite.com/docs/truffle/getting-started/running-migrations#migration-files). 73 | - `test/`: directory for files that [test your application and contracts](https://trufflesuite.com/docs/truffle/testing/testing-your-contracts). 74 | - `truffle-config.js`: the Truffle [configuration file](https://trufflesuite.com/docs/truffle/reference/configuration). 75 | 76 | 5. Install Create React App globally by running the following command 77 | 78 | ```shell 79 | npm install -g create-react-app 80 | ``` 81 | 82 | 6. Create the React app frontend using the following command 83 | 84 | ```shell 85 | npx create-react-app frontend 86 | ``` 87 | 88 | 7. Navigate into the client directory using the following command 89 | 90 | ```shell 91 | cd frontend 92 | ``` 93 | 94 | ### Step#2: Install `hdwallet-provider​` 95 | 96 | `hdwallet-provider` is a separate package that signs transactions for addresses derived from a 12 or 24-word mnemonic. By default, the `hdwallet-provider` uses the first address generated from the mnemonic. However, this is configurable. For more information, refer to the Truffle `hdwallet-provider` repository. Run the following command to install `hdwallet-provider` 97 | 98 | ```shell 99 | npm install @truffle/hdwallet-provider 100 | ``` 101 | 102 | ### Step#3: Create the `.env` file​ 103 | 104 | - Install the `dotenv` package using the following command 105 | 106 | ```shell 107 | npm install dotenv 108 | ``` 109 | 110 | - Create a file named `.env` in your project directory to store the Metamask Secret Phrase. Refer to the MetaMask instructions on [how to reveal a secret recovery phrase](https://metamask.zendesk.com/hc/en-us/articles/360015290032-How-to-Reveal-Your-Seed-Phrase). 111 | 112 | ```js 113 | MNEMONIC = ""; 114 | ``` 115 | 116 | - Ensure you replace the following values in the `.env` file 117 | - `` with the mnemonic of your MetaMask wallet. This phrase is used by the [Truffle hdwallet-provider](https://github.com/trufflesuite/truffle/tree/develop/packages/hdwallet-provider) to sign transactions. 118 | 119 | :::danger 120 | Never disclose your secret recovery phrase. Anyone with your recovery phrase can steal any assets held in your wallet. 121 | ::: 122 | 123 | ### Step#4: Create the smart contract 124 | 125 | Inside the contracts directory, create a new file named `HelloWorld.sol` and add the following code 126 | 127 | ```jsx 128 | // SPDX-License-Identifier: MIT 129 | pragma solidity ^0.8.19; 130 | 131 | contract HelloWorld { 132 | string public message; 133 | 134 | constructor(string memory _message) { 135 | message = _message; 136 | } 137 | 138 | function updateMessage(string memory _newMessage) public { 139 | message = _newMessage; 140 | } 141 | } 142 | ``` 143 | 144 | ### Step#5: Configure Truffle for use with opBNB 145 | 146 | 1. Open the `truffle-config.js` file and add the following code: 147 | 148 | ```jsx 149 | const HDWalletProvider = require("@truffle/hdwallet-provider"); 150 | // create a file at the root of your project and name it .env -- there you can set process variables 151 | // like the mnemonic etc. Note: .env is ignored by git to keep your private information safe 152 | 153 | require("dotenv").config(); 154 | 155 | const mnemonic = process.env["MNEMONIC"].toString().trim(); 156 | 157 | module.exports = { 158 | networks: { 159 | development: { 160 | host: "127.0.0.1", // Localhost (default: none) 161 | port: 8545, // Standard Ethereum port (default: none) 162 | network_id: "*", // Any network (default: none) 163 | }, 164 | opBNBTestnet: { 165 | provider: () => 166 | new HDWalletProvider( 167 | mnemonic, 168 | `https://opbnb-testnet-rpc.bnbchain.org` 169 | ), 170 | network_id: 5611, 171 | confirmations: 3, 172 | timeoutBlocks: 200, 173 | skipDryRun: true, 174 | }, 175 | }, 176 | 177 | // Set default mocha options here, use special reporters etc. 178 | mocha: { 179 | // timeout: 100000 180 | }, 181 | 182 | // Configure your compilers 183 | compilers: { 184 | solc: { 185 | version: "0.8.19", 186 | }, 187 | }, 188 | }; 189 | ``` 190 | 191 | ### Step#6: Deploy the smart contract on opBNB 192 | 193 | 1. In the root directory of your project, create a new file named `1_deploy_contract.js` inside the `migrations` directory and add the following code: 194 | 195 | ```jsx 196 | const HelloWorld = artifacts.require("HelloWorld"); 197 | 198 | module.exports = function (deployer) { 199 | deployer.deploy(HelloWorld, "Hello, World!"); 200 | }; 201 | ``` 202 | 203 | 2. Deploy the smart contract to the opBNB testnet by running the following command 204 | 205 | ```shell 206 | truffle migrate --network opBNBTestnet 207 | ``` 208 | 209 | ![deploy-smart-contract](../../static/img/opBNB-deploy-contract.PNG) 210 | 211 | ### Step#7: Set up the React frontend 212 | 213 | 1. Inside the `frontend/src` directory, replace the contents of the `App.js` file with the following code: 214 | 215 | ```jsx 216 | import React, { useEffect, useState } from "react"; 217 | import Web3 from "web3"; 218 | import HelloWorldContract from "./contracts/HelloWorld.json"; 219 | import "./App.css"; 220 | 221 | function App() { 222 | const [contract, setContract] = useState(null); 223 | const [message, setMessage] = useState(""); 224 | const [newMessage, setNewMessage] = useState(""); 225 | const [loading, setLoading] = useState(false); 226 | 227 | useEffect(() => { 228 | const loadBlockchainData = async () => { 229 | try { 230 | const web3 = new Web3(window.ethereum); 231 | const networkId = await web3.eth.net.getId(); 232 | const deployedNetwork = HelloWorldContract.networks[networkId]; 233 | const instance = new web3.eth.Contract( 234 | HelloWorldContract.abi, 235 | deployedNetwork && deployedNetwork.address 236 | ); 237 | setContract(instance); 238 | } catch (error) { 239 | console.error(error); 240 | } 241 | }; 242 | 243 | loadBlockchainData(); 244 | }, []); 245 | 246 | const getMessage = async () => { 247 | if (contract) { 248 | try { 249 | setLoading(true); 250 | const message = await contract.methods.message().call(); 251 | setMessage(message); 252 | } catch (error) { 253 | console.error(error); 254 | } finally { 255 | setLoading(false); 256 | } 257 | } 258 | }; 259 | 260 | const updateMessage = async () => { 261 | if (contract && newMessage !== "") { 262 | try { 263 | setLoading(true); 264 | await contract.methods 265 | .updateMessage(newMessage) 266 | .send({ from: (await window.ethereum.enable())[0] }); 267 | setNewMessage(""); 268 | } catch (error) { 269 | console.error(error); 270 | } finally { 271 | setLoading(false); 272 | } 273 | } 274 | }; 275 | 276 | return ( 277 |
278 |

HelloWorld dApp

279 |
280 |
281 |

Current Message

282 |

{loading ? "Loading..." : message}

283 | 284 |
285 |
286 |
287 |
288 |

Update Message

289 | setNewMessage(e.target.value)} 294 | className="inputMessage" 295 | /> 296 |
297 | 298 |
299 |
300 |
301 | ); 302 | } 303 | 304 | export default App; 305 | ``` 306 | 307 | 2. Replace the contents of the `App.css` file with the following code: 308 | 309 | ```css 310 | .App { 311 | text-align: center; 312 | } 313 | 314 | .header { 315 | background-color: #f3ba2f; 316 | min-height: 20vh; 317 | display: flex; 318 | flex-direction: column; 319 | align-items: center; 320 | justify-content: center; 321 | font-size: calc(40px + 2vmin); 322 | color: white; 323 | } 324 | 325 | .content { 326 | display: flex; 327 | justify-content: center; 328 | align-items: center; 329 | padding: auto; 330 | text-align: center; 331 | } 332 | 333 | .message, 334 | .update { 335 | padding: auto; 336 | margin: 20px; 337 | } 338 | .messageValue { 339 | color: whitesmoke; 340 | font-size: large; 341 | } 342 | 343 | .inputMessage { 344 | float: center; 345 | padding: 10px; 346 | width: 100%; 347 | font-family: "IBM Plex Sans", "Raleway", "Source Sans Pro", "Arial"; 348 | } 349 | 350 | button { 351 | float: center; 352 | margin: 1em 0; 353 | padding: 10px 3em; 354 | font-weight: bold; 355 | max-width: fit-content; 356 | font-family: "IBM Plex Sans", "Raleway", "Source Sans Pro", "Arial"; 357 | } 358 | 359 | body { 360 | background-color: #292929; 361 | color: #f3ba2f; 362 | align-items: center; 363 | font-family: "IBM Plex Sans", "Raleway", "Source Sans Pro", "Arial"; 364 | -webkit-font-smoothing: antialiased; 365 | -moz-osx-font-smoothing: grayscale; 366 | } 367 | ``` 368 | 369 | ### Step 6: Start the development server 370 | 371 | 1. In the frontend directory, install the required dependencies by running the following command 372 | 373 | ```shell 374 | npm install 375 | ``` 376 | 377 | 2. Start the React development server: 378 | 379 | ```shell 380 | npm start 381 | ``` 382 | 383 | 3. Visit `http://localhost:3000` in your browser, and you should see the `HelloWorld` dApp with the current message and the ability to update it. 384 | 385 | :::note 386 | 387 | Make sure you have the MetaMask extension installed and set to the opBNB testnet. 388 | 389 | ::: 390 | 391 | ![helloworld-opbnb-ui](../../static/img/opbnb-helloworld-ui.PNG) 392 | 393 | 4. When you enter a new message and click the update button, if your dapp is already not connected to Metamask wallet, you will get a Metamask notification asking for permission to connect your wallet to the dapp. 394 | 395 | ![connect-metamask](../../static/img/opbnb-connect-wallet.PNG) 396 | 397 | 5. It will also ask for your confirmation to confirm the transaction. Proceed by clicking the confirm button. 398 | 399 | ![opbnb-metamask-tx](../../static/img/opbnb-metamask-tx.PNG) 400 | 401 | 6. Once the transaction is confirmed, click the `Refresh` button to load the new message. 402 | 403 | ![helloworld-opbnb-output-ui](../../static/img/opbnb-helloworld-ui-2.PNG) 404 | 405 | ## Conclusion 406 | 407 | In this tutorial, we provided a step-by-step guide on how to develop, deploy, and interact with a smart contract on the opBNB network. We used the Truffle IDE for compiling and deploying the smart contract. We also build a React frontend to interact with the deployed smart contract, i.e., read from and write to the opBNB blockchain. 408 | 409 | ##### Follow us to stay updated on everything BNB Chain! 410 | 411 | [Website](https://www.bnbchain.org/en?ref=binance.ghost.io) | [Twitter](https://twitter.com/BNBCHAIN?ref=binance.ghost.io) | [Twitter (Devs)](https://twitter.com/BNBChainDevs?ref=binance.ghost.io) | [Telegram](https://t.me/bnbchain?ref=binance.ghost.io) | [dApp Store](https://dappbay.bnbchain.org/?ref=binance.ghost.io) | [YouTube](https://www.youtube.com/@BNBChainOfficial?ref=binance.ghost.io) | [Discord](https://discord.gg/bnbchain?ref=binance.ghost.io) | [LinkedIn](https://www.linkedin.com/company/bnbchaininnovation/?ref=binance.ghost.io) | [Build N' Build Forum](https://www.buildnbuild.dev/?ref=binance.ghost.io) | [Dev Community](https://bnbdev.community/?ref=binance.ghost.io) 412 | -------------------------------------------------------------------------------- /docs/tutorials/opbnbscan-verify-hardhat-truffle.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Verify Smart Contracts with Hardhat and Truffle 3 | description: Guide to use the opBNBScan API to verify the smart contracts easily via Hardhat and Truffle. 4 | --- 5 | 6 | # Use opBNBScan to verify your contract via Hardhat and Truffle 7 | 8 | opBNBScan provides a convenient and user-friendly platform for developers to verify their smart contracts using popular developer tools like Truffle and Hardhat. Here are the step-by-step instructions to get started with opBNBScan's smart contract verification APIs. 9 | 10 | 1. Go to the [NodeReal](http://nodereal.io) portal and click the **Login** button. 11 | 2. Login with your github account or discord account. 12 | 3. And create your API key by clicking the **create new key** button. 13 | 4. Copy your API key to your clipboard and and use it as your key of smart verification contract APIs. 14 | 15 | ## **Hardhat** 16 | 17 | You can use the [hardhat-verify](https://hardhat.org/hardhat-runner/docs/guides/verifying) plugin to verify your deployed smart contract. You can follow the steps in the hardhat document. Below is an example of how to configure your hardhat.config.js. Pay attention to the network's configuration settings, and replace the corresponding settings that meet your requirements. 18 | 19 | ```typescript 20 | require("@nomicfoundation/hardhat-toolbox"); 21 | require("@nomicfoundation/hardhat-verify"); 22 | /** @type import('hardhat/config').HardhatUserConfig */ 23 | 24 | module.exports = { 25 | solidity: "0.8.19", //replace your own solidity compiler version 26 | networks: { 27 | opbnb: { 28 | url: "https://opbnb-testnet-rpc.bnbchain.org/", 29 | chainId: 5611, // Replace with the correct chainId for the "opbnb" network 30 | accounts: ["{{YOUR-PRIVATE-KEY}}"], // Add private keys or mnemonics of accounts to use 31 | gasPrice: 20000000000, 32 | }, 33 | }, 34 | etherscan: { 35 | apiKey: { 36 | opbnb: "{{YOUR-NODEREAL-API-KEY}}", //replace your nodereal API key 37 | }, 38 | 39 | customChains: [ 40 | { 41 | network: "opbnb", 42 | chainId: 5611, // Replace with the correct chainId for the "opbnb" network 43 | urls: { 44 | apiURL: 45 | "https://open-platform.nodereal.io/{{YOUR-NODEREAL-API-KEY}}/op-bnb-testnet/contract/", 46 | browserURL: "https://testnet.opbnbscan.com/", 47 | }, 48 | }, 49 | ], 50 | }, 51 | }; 52 | ``` 53 | 54 | ## **Truffle** 55 | 56 | You can also use truffle to verify your smart contract on opBNBScan. 57 | 58 | Please make sure the truffle-plugin-verify is installed correctly, and in the plugin, add the 'truffle-plugin-verify' 59 | 60 | ```typescript 61 | module.exports = { 62 | plugins: [ 63 | 'truffle-plugin-verify' 64 | ], 65 | networks: 66 | { 67 | development: { 68 | host: "127.0.0.1", // Localhost (default: none) 69 | port: 8545, // Standard port (default: none) 70 | network_id: "*", // Any network (default: none) 71 | }, 72 | dashboard: { 73 | verify: { 74 | apiUrl: 'https://open-platform.nodereal.io/{{YOUR-NODEREAL-API-KEY}}/op-bnb-testnet/contract/', 75 | apiKey: '{{YOUR-NODEREAL-API-KEY}}', 76 | explorerUrl: 'https://testnet.opbnbscan.com/', 77 | }, 78 | host: "127.0.0.1", 79 | port: 24012, 80 | network_id: "*" 81 | }, 82 | }, 83 | // Set default mocha options here, use special reporters, etc. 84 | mocha: { 85 | // timeout: 100000 86 | }, 87 | // Configure your compilers 88 | compilers: { 89 | solc: { 90 | version: "0.8.15", // Fetch exact version from solc-bin (default: truffle's version) 91 | } 92 | }, 93 | ``` 94 | 95 | Make sure your smart contract is deployed first. I am using the dashboard to avoid saving your private credentials to your local machine. 96 | 97 | ```shell 98 | npx truffle migrate –network dashboard 99 | ``` 100 | 101 | And then you can verify your smart contract by specifying your contract name 102 | 103 | ```shell 104 | npx truffle run verify {{Your-Contract-Name}} --network dashboard 105 | ``` 106 | 107 | Then you can go to the [opBNBScan explorer](https://testnet.opbnbscan.com/address/0x57996bA7FC3F0C61E7A949ac050b9E2437eA1972?p=1&tab=Contract) to check if your smart contract has been verified. 108 | 109 | For the mainnet contract verification, please change the following URLs: 110 | url: "https://opbnb-testnet-rpc.bnbchain.org/" change to "https://opbnb-mainnet-rpc.bnbchain.org/" 111 | apiUrl: 'https://open-platform.nodereal.io/{{YOUR-NODEREAL-API-KEY}}/op-bnb-testnet/contract/' change to 'https://open-platform.nodereal.io/{{YOUR-NODEREAL-API-KEY}}/op-bnb-mainnet/contract/' 112 | -------------------------------------------------------------------------------- /docs/tutorials/pbss-pebble.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Run with PBSS and PebbleDB 3 | description: Guide on running an opBNB Node with PBSS and PebbleDB 4 | --- 5 | 6 | # Run with PBSS (Path-Based Scheme Storage) and PebbleDB 7 | 8 | ## How to Run op-geth with PBSS and PebbleDB 9 | 10 | To start op-geth with PBSS and PebbleDB, include the following flags: 11 | 12 | ```bash 13 | --state.scheme path --db.engine pebble 14 | ``` 15 | 16 | :::info 17 | We recommend using version v0.3.1-alpha or later to activate this feature. 18 | ::: 19 | 20 | Upon successful startup, the logs will confirm the initiation of PBSS and PebbleDB: 21 | 22 | ```bash 23 | INFO [03-21|07:00:25.684] Using pebble as the backing database 24 | INFO [03-21|07:00:47.039] State scheme set by user scheme=path 25 | ``` 26 | 27 | ## PBSS (Path-Based Scheme Storage) 28 | 29 | PBSS stores trie nodes on disk using the encoded path and a specific key prefix as the key. This approach allows PBSS's 30 | Merkle Patricia Trie (MPT) to overwrite older data due to the shared key between the account trie and storage trie. This 31 | feature not only enables **online pruning** but also significantly **reduces data redundancy**. 32 | 33 | PBSS architecture comprises 128 difflayers (in memory) and one disk layer, as depicted below. Difflayers store only the 34 | state data changes. 35 | 36 | ```plaintext 37 | +-------------------------------------------+ 38 | | Block X+128 State | 39 | +-------------------------------------------+ 40 | | Block X+127 State | 41 | +-------------------------------------------+ 42 | | ....... | 43 | +-------------------------------------------+ 44 | | Block X+1 State, Bottom-most diff layer | 45 | +-------------------------------------------+ 46 | | Block X State, Disk layer (singleton trie)| 47 | +-------------------------------------------+ 48 | ``` 49 | 50 | **PBSS offers superior read performance**, with faster trie access and iteration. It maintains a single version of the 51 | state trie on disk and keeps new tries (changes to the state/storage/account trie) only in memory. 52 | 53 | ### Restrictions 54 | 55 | * **Supports queries for only the last 129 blocks' state data** 56 | 57 | RPC requests requiring data beyond this range will return an error: `missing trie node ${hash} (path ${path})`. 58 | Only RPC methods that need to query trie data, such as `eth_getProof`, will be impacted by this limitation, while 59 | others will remain unaffected. 60 | 61 | * **The withdrawal function of opBNB might not be supported** 62 | 63 | This function might require querying state data from an hour earlier to obtain a withdrawal proof, which is not 64 | supported yet. Future versions will address this limitation. 65 | 66 | ## PebbleDB 67 | 68 | PebbleDB, now the default database for the community, has been integrated into go-ethereum. It replaces LevelDB, which 69 | lacks a throttle mechanism for flushes and compactions, leading to latency spikes during intense read and write 70 | operations. 71 | 72 | Conversely, PebbleDB features separate rate limiters for flushes and compactions, conducting operations as needed and 73 | **reducing unnecessary disk bandwidth consumption**. 74 | 75 | ## FAQ 76 | 77 | ### Can I change the `state.scheme` or `db.engine` for an existing node? 78 | 79 | No, you cannot change the `state.scheme` or `db.engine` for an existing node. You must start a new node with the desired 80 | configuration. 81 | -------------------------------------------------------------------------------- /docs/tutorials/run-nodes-best-practices.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Best Practices for opBNB Node Configuration 3 | description: Comprehensive Manual for Operating an opBNB Node Utilizing Best Practices 4 | --- 5 | 6 | # Best Practices for opBNB Node Configuration 7 | 8 | This manual delineates Best practices for the configuration and operation of an opBNB Node. 9 | 10 | ## Selecting the Appropriate Mode and Storage Scheme 11 | 12 | opBNB accommodates various node modes: Full, Fast, and Archive. 13 | Two storage schemes are available: HBSS (Hash-Based Scheme Storage) and PBSS (Path-Based Scheme Storage). 14 | 15 | The principal distinctions between them lie in their methods of preserving history trie data. 16 | 17 | The Merkle Patricia Trie (MPT), an advanced data structure, is adept at storing and retrieving key-value pairs with efficiency. It amalgamates the principles of a Patricia trie and a Merkle tree to forge a secure and immutable representation of data within the Ethereum Virtual Machine (EVM). 18 | 19 | The MPT endows the following capabilities: 20 | - Access to historical data: Enables retrieval of an account's balance at a specified block height, simulation of calls, and debugging of traces at particular block heights, among others. 21 | - Verification of Inclusion and Exclusion: 22 | The MPT facilitates proofs of both inclusion and exclusion of key-value pairs, a pivotal feature for transaction verification and blockchain integrity maintenance. 23 | 24 | Nevertheless, the preservation of entire history trie data on disk can demand substantial resources and may be superfluous for certain applications. opBNB introduces diverse node modes and storage schemes to accommodate a range of requirements. 25 | 26 | The variances between the modes and storage schemes are encapsulated as follows: 27 | - Archive node mode conserves the complete history trie data. Full node mode archives recent trie data (128 blocks), whereas the fast node mode retains only the current state, excluding trie data. 28 | - Functions such as block, transaction, receipt, and log retrieval are supported across all node modes. Since block data is preserved in the block database, it remains unaffected by the trie data storage scheme. 29 | - The capability to access historical state data varies by node mode. Archive nodes support comprehensive historical state data retrieval, whereas full and fast nodes facilitate access to recent 128 blocks' state data. 30 | - Trie data-dependent functions like `eth_getProof`, `eth_getStorageAt`, etc., are fully supported by Archive nodes. Full nodes offer queries for recent 128 blocks, whereas fast nodes lack this support. 31 | - Specifically, given that the transfer from Layer 2 to Layer 1 necessitates `eth_getProof` data corresponding to the most recent root hash height, we have implemented certain enhancements within the full node configuration to facilitate `eth_getProof` for the latest root hash height, irrespective of it surpassing the 128-block threshold. Should you require the utilization of your personal node for the assembly of withdrawal proof, the full node mode is at your disposal. 32 | - PBSS archives trie nodes on disk utilizing encoded paths and specific key prefixes as keys. This method permits PBSS's Merkle Patricia Trie (MPT) to supersede older data due to the shared key between the account trie and storage trie, enabling **online pruning** and significantly **diminishing data redundancy**. 33 | - Archive node mode is only compatible with HBSS, whereas Full and Fast node modes support both HBSS and PBSS. 34 | - For further details, please consult the [PBSS document](./pbss-pebble.md). 35 | 36 | Comparative Analysis of Node Modes and Storage Schemes: 37 | 38 | | **Mode** | **Full Node (PBSS)** | **Full Node (HBSS)** | **Fast Node** | **Archive Node** | 39 | |--------------------------------|----------------------|----------------------|----------------------------------------------------------|------------------| 40 | | **Preserve Trie Nodes** | Latest 128 blocks | Latest 128 blocks | None | All | 41 | | **Disk Consumption** | Moderate-Low | Moderate-High | Lowest | Highest | 42 | |**Auto Prune History Trie Data**| Yes | No | Not Applicable | Not Applicable | 43 | | **Performance** | Moderate-High | Moderate-Low | Highest | Lowest | 44 | | **Security** | High | High | Lower than others since it doesn't verify the state root | High | 45 | 46 | ### Fast Node 47 | 48 | For most applications, operating a fast node is advisable. This mode maintains only the current state, sans trie data, making it suitable for tasks such as querying the current state and processing transactions. 49 | 50 | To activate the fast node, include `--allow-insecure-no-tries` in the `op-geth` startup command. 51 | 52 | ``` 53 | ./geth --config ./config.toml --datadir ./node --syncmode full --allow-insecure-no-tries 54 | ``` 55 | 56 | To prune the MPT state (e.g., when transitioning from a full to a fast node), prune the node as follows: 57 | 58 | ``` 59 | ./geth snapshot insecure-prune-all --datadir ./datadir ./genesis.json 60 | ``` 61 | 62 | :::warning 63 | Fast Node does not generate Trie Data when syncing. 64 | Once the Fast Node is running, there is no way to switch back to Full Node. 65 | Need to re-download snapshot data to restore it to Full Node. 66 | ::: 67 | 68 | For implementation details and further information, refer to [the PR](https://github.com/bnb-chain/op-geth/pull/75). 69 | 70 | ### Full Node 71 | 72 | Operating a full node is recommended if you require: 73 | - Enhanced security and reliability assurances. The full node meticulously executes and locally verifies all blocks. 74 | - The facility to query trie data of the most recent 128 blocks, such as retrieving an account's balance at a specific block height, simulating calls, and debugging traces. 75 | 76 | To enable the full node, set the `--syncmode full` flag in the `geth` command. 77 | 78 | It is particularly advised to operate a full node with PBSS and pebble to minimize data redundancy and enhance performance. 79 | 80 | ``` 81 | --state.scheme path --db.engine pebble 82 | ``` 83 | 84 | For comprehensive details, consult the [PBSS document](./pbss-pebble.md). 85 | 86 | ### Archive Node(with op-reth) 87 | 88 | The Archive node mode archives the entirety of history trie data. 89 | This mode is apt for scenarios necessitating access to the complete history trie data, such as block explorers and analytics. 90 | 91 | The current volume of history trie data approximates 3TB (as of the end of April, 2024). 92 | Significant performance issues may arise in the op-geth implementation when managing extensive history trie data. 93 | Therefore, it is recommended to operate the archive node in conjunction with op-reth. 94 | 95 | Below is an exemplary command for initiating the archive node with op-reth: 96 | 97 | ``` 98 | export L2_RPC=https://opbnb-mainnet-rpc.bnbchain.org 99 | 100 | op-reth node \ 101 | --datadir /server/datadir \ 102 | --chain opbnb-mainnet \ 103 | --rollup.sequencer-http ${L2_RPC} \ 104 | --authrpc.addr "0.0.0.0" \ 105 | --authrpc.port 8551 \ 106 | --authrpc.jwtsecret /server/datadir/jwt.txt \ 107 | --http \ 108 | --http.addr "0.0.0.0" \ 109 | --http.port 8545 \ 110 | --ws \ 111 | --ws.addr "0.0.0.0" \ 112 | --ws.port 8545 \ 113 | --builder.gaslimit 150000000 \ 114 | --nat any 115 | ``` 116 | 117 | For further particulars, visit the [op-reth GitHub repository](https://github.com/bnb-chain/reth). 118 | 119 | ## Snapshots 120 | 121 | The latest snapshot data is accessible via the [opbnb-snapshot](https://github.com/bnb-chain/opbnb-snapshot) repository. 122 | 123 | Employing snapshot data can drastically curtail the time required for node synchronization. 124 | 125 | ## Performance Optimization 126 | 127 | In order to enhance the performance of `op-geth`, it is crucial to configure the cache settings appropriately. Allocating approximately one-third of the physical memory to the cache is advisable. For instance, if the system has 64GB of physical memory, the cache setting can be configured as: 128 | 129 | ``` 130 | --cache 20000 131 | ``` 132 | 133 | This allocation ensures that the cache is optimized for efficient use of system resources, ultimately leading to improved performance of `op-geth`. 134 | 135 | ## Running Server as a Daemon 136 | 137 | To ensure continuous operation, it is important to keep `op-node` and `op-geth` running at all times. One of the simplest and recommended solutions is to register them as systemd service. By doing so, they will automatically start upon system reboots and other relevant events, ensuring seamless operation without manual intervention. 138 | 139 | ## Security 140 | 141 | ### Securing Your Full Node RPC from Hackers 142 | 143 | It is imperative to safeguard your Full Node RPC endpoints from unauthorized access. Exposing RPC endpoints to the public network can pose security risks, making it essential to restrict access and implement appropriate security measures to prevent unauthorized intrusion. 144 | 145 | ### Software Vulnerabilities 146 | 147 | To ensure the security of your node and assets, it is crucial to download software only from official sources. Additionally, it is important to consistently update the software to the latest, most secure version available. By adhering to these practices, you can mitigate the risk of potential vulnerabilities and safeguard your node and assets from security threats. 148 | 149 | ## FAQ 150 | 151 | ### Why does my node experience offline status or block height lag after an abrupt termination? 152 | 153 | After running a synchronized node for an extended period of time, abruptly terminating the node(op-geth process) can result in a period of offline status upon restart. Specifically, only archived nodes are expected to quickly re-synchronize after such an event. 154 | 155 | The reason for this behavior lies in the nature of Geth's functionality. When Geth experiences a crash or is not shut down gracefully, the recent state that was held in memory is lost and must be regenerated. As a result, it can take Geth a considerable amount of time to restore these states. 156 | 157 | The root cause of this prolonged restoration process can be attributed to the fact that Geth does flush the state trie periodically. The frequency of this flushing is defined by the trieTimeout parameter in the configuration file (config.toml). This periodic flushing is intended to maintain consistency and integrity within the node's state, but it also contributes to the time required for state regeneration in the event of an abrupt shutdown. 158 | -------------------------------------------------------------------------------- /docs/tutorials/running-a-local-development-environment.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Run Local Dev Environment 3 | description: Guide to running a local development environment 4 | --- 5 | 6 | # Running a local development environment 7 | 8 | Install and start the entire opbnb system locally, including L1 (BNB Smart Chain) and L2 development nodes. Running a local development environment is a great way to test the behavior of your code and contracts. 9 | 10 | ## How to do it 11 | 12 | 1. Make sure the following software is installed: golang, nodejs 16+, make, pnpm, python3, docker, foundry, poetry, jq 13 | Tips: 14 | 15 | Install Foundry by following [the instructions located here](https://getfoundry.sh/). 16 | Please make sure your Foundry version matches the one described in opbnb/versions.json. 17 | If they do not match, please use a command such as `foundryup -C xxxxxx` to modify it. 18 | 19 | 2. Clone opbnb monorepo: 20 | 21 | ```shell 22 | git clone git@github.com:bnb-chain/opbnb.git 23 | cd opbnb 24 | ``` 25 | 26 | 3. Running `pnpm install` and then running `pnpm build`. 27 | 4. Running `make devnet-up` and wait for the docker container to start.(The first run will be relatively slow because it needs to download the image and deploy the contract, and then it will be fast) 28 | 5. Through the `docker ps` command, you can see that 5 containers have been started: `ops-bedrock_l1_1`, `ops-bedrock_l2_1`, `ops-bedrock_op-node_1`, `ops-bedrock_op-batcher_1`, `ops-bedrock_op-proposer_1` 29 | 30 | Now L1 is accessible at `http://localhost:8545`, and L2 is accessible at `http://localhost:9545` 31 | 32 | ## Stop or clean 33 | 34 | To stop, run (in the root directory of the monorepo) `make devnet-down`. 35 | To clean everything, run (in the root directory of the monorepo) `make devnet-clean`. 36 | To view logs, run `make devnet-logs` 37 | 38 | # Notes 39 | 40 | 1. When executing for the first time, please be patient if you see the message "Waiting for RPC server at...", as the BSC network takes time to initialize. 41 | 2. If you encounter an error during the "Deploying contracts" step, please try again as it usually recovers. 42 | 43 | ## Additional Information 44 | 45 | L1 chain ID is `714`. 46 | L2 chain ID is `901`. 47 | 48 | L1 test account: 49 | 50 | - address: `0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` 51 | - Private key: `ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` 52 | 53 | L2 test account: 54 | 55 | - Address: `0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` 56 | - Private key: `ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` 57 | -------------------------------------------------------------------------------- /docs/tutorials/running-a-local-node.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_label: Run Local Mainnet or Testnet Node 3 | description: Guide to running opBNB Testnet or Mainnet Node 4 | --- 5 | 6 | # Running a Local Testnet or Mainnet Node 7 | 8 | If you're looking to build an app on opBNB you'll need access to an opBNB node. 9 | You can simply use the public rpc(Testnet: , Mainnet: ) or run your own node. 10 | 11 | This guide will walk you through setting up your own Testnet/Mainnet node. 12 | 13 | ## Hardware requirements 14 | 15 | Replicas must store the transaction history of opBNB and run Geth. For optimal performance, they should be powerful machines (real or virtual) with at least 16 GB RAM and an SSD drive with 500 GB free space (for production network). 16 | 17 | ### Fast Node 18 | 19 | For users that just to run normal rpc node without debug functions, you can run the fast node which has faster sync speed and less hardware requirements. 20 | 21 | The fast node don't have MPT states and only use the snapshot to sync the latest state. The security is not as good as the full node, but it's enough for most of the users and 22 | validated in many production nodes. The advantage of the fast node is that it's faster to sync for it doesn't need to calculate the MPT states and store and query the MPT trees. 23 | 24 | You can start the fast node with the flags `--allow-insecure-no-tries`. The gc mode should not be `archive` if you start with the fast node. 25 | 26 | For more information, you can refer to the [fast node pr](https://github.com/bnb-chain/op-geth/pull/75). 27 | 28 | ## Run with Docker 29 | 30 | There are official Docker images available for the opBNB node. You can use the latest versions of these images from the following links: 31 | - [op-node](https://github.com/bnb-chain/opbnb/pkgs/container/op-node) 32 | - [op-geth](https://github.com/bnb-chain/op-geth/pkgs/container/op-geth) 33 | 34 | Additionally, you can find a docker-compose file example in this [repository](https://github.com/bnb-chain/opbnb-node-docker) to run the opBNB node with Docker. This allows you to set up a Testnet/Mainnet node quickly, within minutes. 35 | If you use different infrastructure providers, please consult the docker-compose file and adjust the configuration as needed. 36 | 37 | ## Run with Binaries 38 | 39 | ### Build op-node and op-geth 40 | 41 | dependencies 42 | - golang 1.21+ 43 | - make 44 | - git 45 | - gcc 46 | - libc-dev 47 | 48 | You can refer to the Docker files for Alpine Linux: [op-node](https://github.com/bnb-chain/opbnb/blob/develop/op-node/Dockerfile) and [op-geth](https://github.com/bnb-chain/op-geth/blob/develop/Dockerfile). 49 | If you are using a different OS, please find the alternative packages for your OS. 50 | 51 | ```bash 52 | export OPBNB_WORKSPACE=/tmp/opbnb 53 | mkdir -p $OPBNB_WORKSPACE 54 | 55 | cd $OPBNB_WORKSPACE 56 | git clone https://github.com/bnb-chain/opbnb.git 57 | cd opbnb/op-node 58 | git checkout develop 59 | make op-node 60 | mkdir -p $OPBNB_WORKSPACE/op-node-data 61 | cp ./bin/op-node $OPBNB_WORKSPACE/op-node-data 62 | 63 | cd $OPBNB_WORKSPACE 64 | git clone https://github.com/bnb-chain/op-geth.git 65 | cd op-geth 66 | git checkout develop 67 | make geth 68 | mkdir -p $OPBNB_WORKSPACE/op-geth-data 69 | cp ./build/bin/geth $OPBNB_WORKSPACE/op-geth-data/op-geth 70 | ``` 71 | 72 | ### Data Preparation 73 | 74 | ```bash 75 | openssl rand -hex 32 > jwt.txt 76 | cp jwt.txt $OPBNB_WORKSPACE/op-geth-data 77 | cp jwt.txt $OPBNB_WORKSPACE/op-node-data 78 | ``` 79 | 80 | ### Start components 81 | 82 | op-geth 83 | 84 | ```bash 85 | #! /usr/bin/bash 86 | cd $OPBNB_WORKSPACE/op-geth-data 87 | 88 | # for testnet 89 | export L2_RPC=https://opbnb-testnet-rpc.bnbchain.org 90 | 91 | # for mainnet 92 | # export L2_RPC=https://opbnb-mainnet-rpc.bnbchain.org 93 | 94 | # for testnet using --opBNBTestnet, for mainnet using --opBNBMainnet 95 | ./op-geth \ 96 | --opBNBTestnet \ 97 | --datadir="./datadir" \ 98 | --authrpc.jwtsecret=./jwt.txt \ 99 | --rollup.sequencerhttp=$L2_RPC 100 | ``` 101 | 102 | op-geth runs with [PBSS(Path-Base Scheme Storage) and PebbleDB](./pbss-pebble.md) by adding the flags `--state.scheme path` and `--db.engine pebble`. 103 | **It's recommended to start a new node with this mode, which provides better performance and less disk space usage.** 104 | 105 | To start the op-geth node for a fast node, you can add the flag `--allow-insecure-no-tries`. but the `gcmode` should be `full`. 106 | 107 | op-node 108 | 109 | ```bash 110 | #! /usr/bin/bash 111 | 112 | set -ex 113 | 114 | cd op-node-data 115 | 116 | export L2_RPC=http://localhost:8551 117 | 118 | # for testnet 119 | # it's better to replace the L1_RPC with your own BSC Testnet RPC Endpoint for stability 120 | export L1_RPC=https://bsc-testnet.bnbchain.org 121 | 122 | # for mainnet 123 | # export L1_RPC=https://bsc-dataseed.bnbchain.org 124 | 125 | # for testnet using --network=opBNBTestnet, for mainnet using --network=opBNBMainnet 126 | ./op-node \ 127 | --network=opBNBTestnet \ 128 | --snapshotlog.file=./snapshot.log \ 129 | --l1=${L1_RPC} \ 130 | --l2=${L2_RPC} \ 131 | --l2.jwt-secret=./jwt.txt 132 | ``` 133 | 134 | ## Run with Snapshots 135 | 136 | To improve the synchronization speed of the node, you can utilize snapshots to initialize it. 137 | 138 | The most recent snapshot is maintained in the repository [opbnb-snapshot](https://github.com/bnb-chain/opbnb-snapshot). 139 | Please visit the repository for download links and usage instructions. 140 | 141 | ## Check status 142 | 143 | Wait for the node to sync. You'll see log in `op-geth` if there's any new block. 144 | 145 | ``` 146 | INFO [11-15|10:10:05.569] Syncing beacon headers downloaded=1,762,304 left=11,403,991 eta=27m1.039s 147 | INFO [11-15|10:10:06.440] Forkchoice requested sync to new head number=13,164,499 hash=d78cb3..a2e94d finalized=unknown 148 | ``` 149 | 150 | You can check the block number with curl: 151 | 152 | ``` 153 | $ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:8545 154 | ``` 155 | 156 | Once all headers have been downloaded, the node will begin downloading the blocks. 157 | You will notice that the block height is increasing. 158 | 159 | ``` 160 | {"jsonrpc":"2.0","id":1,"result":"0x1a"} 161 | ``` 162 | 163 | To verify if the node has synchronized to the latest height, you can compare the block with the one requested from public endpoints. 164 | 165 | ```bash 166 | # local 167 | $ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","id": 1, "params": ["0x1a", false]}' http://localhost:8545 168 | 169 | # testnet 170 | $ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","id": 1, "params": ["0x1a", false]}' https://opbnb-testnet-rpc.bnbchain.org 171 | 172 | # mainnet 173 | $ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","id": 1, "params": ["0x1a", false]}' https://opbnb-mainnet-rpc.bnbchain.org 174 | ``` 175 | 176 | ## Troubleshooting 177 | 178 | If the problem you are facing is not addressed here, please open an issue on GitHub by visiting this link: [open an issue](https://github.com/bnb-chain/opbnb/issues). 179 | 180 | ### Not synced for a long time 181 | 182 | The default sync mechanism involves two P2P networks, the op-node network and op-geth network. 183 | If you are not connected to the op-node network, you can not receive the latest blocks from broadcast, and can't trigger the engine sync of op-geth. 184 | If you are not connected to the op-geth network, you can receive the latest blocks from broadcast, but can't get the historical blocks from op-geth P2P network. 185 | 186 | Check the op-geth logs. 187 | 188 | If you can find the following logs, it means that the op-node network is connected successfully and you are receiving the latest blocks from broadcast. 189 | 190 | ``` 191 | INFO [11-15|10:32:02.801] Forkchoice requested sync to new head number=8,290,596 hash=1dbff3..9a306a finalized=unknown 192 | ``` 193 | 194 | If you can find the following logs, it means that the op-geth network is connected successfully and you are receiving the historical block headers from op-geth P2P network. 195 | 196 | ``` 197 | INFO [11-15|10:32:52.240] Syncing beacon headers downloaded=210,432 left=8,084,773 eta=31m39.748s 198 | ``` 199 | 200 | Check the op-node p2p network with the command below: 201 | 202 | ``` 203 | $ curl -X POST -H "Content-Type: application/json" --data \ 204 | '{"method":"opp2p_peers","params":[true],"id":1,"jsonrpc":"2.0"}' \ 205 | http://localhost:8546 206 | ``` 207 | 208 | Check the op-geth p2p network with the command below. You have to enable admin API in op-geth to use this API. 209 | Refer to for more details. 210 | 211 | ``` 212 | $ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}' http://localhost:8545 | jq . 213 | ``` 214 | 215 | ### The local node's chain has forked from the canonical chain 216 | 217 | If your local node is already running and tracking blocks, the following situations may indicate that your local node's chain has forked from the canonical chain: 218 | 1. The block hash at the same height obtained through the `eth_getBlockByNumber` method does not match the data returned by the public node. 219 | 2. Your local chain consistently lags behind a fixed number of blocks and cannot catch up with the latest block height. 220 | 221 | In this case, we recommend that you check the code version of the running node through the following steps: 222 | ```bash 223 | $ op-node -v 224 | op-node version v0.0.0-515ebd51-1698742099 225 | 226 | $ op-geth version 227 | Geth 228 | Version: 0.1.0-unstable 229 | Git Commit: f8871fc80dbf2aa0178b504e76c20c21b890c6d5 230 | Git Commit Date: 20231026 231 | Upstream Version: 1.11.5-stable 232 | Architecture: arm64 233 | Go Version: go1.20.2 234 | Operating System: darwin 235 | GOPATH= 236 | ``` 237 | Please make sure to use the latest code version. If the code version is incorrect, please completely clear the node data and run the new node again according to this guide. 238 | 239 | You also need to check if the `genesis.json` and `rollup.json` files are up to date. 240 | 241 | In the latest code, we hardcoded the configuration of rollup.json. Instead of using `--rollup.config=./rollup.json`, you just need to use `--network=opBNBTestnet` (for the mainnet network it is opBNBMainnet). This change ensures that the contents of rollup.json will not be incorrect. 242 | 243 | ### Node block is stuck and op-geth log prints: Database compacting, degraded performance database=/data/geth/chaindata 244 | 245 | If your node suddenly gets stuck and cannot grow, and your op-geth log keeps printing: Database compacting, degraded performance database=/data/geth/chaindata, 246 | then you need to consider upgrading your machine specifications, increasing CPU, memory, and disk maximum throughput. 247 | 248 | This is because the current OP Stack only supports the archive mode of Geth, and the disk space usage increases over time. The Leveldb that Geth relies on requires more machine resources to complete the compact process. 249 | We are working hard to support full mode Geth, and further support PBSS and Pebble to completely solve this problem. 250 | 251 | If you don't want to upgrade your machine's specifications, You can choose to download the pruned snapshot from the [opbnb-snapshot](https://github.com/bnb-chain/opbnb-snapshot) repository, and use it to start a new node. 252 | The new node will not have this issue, but it will lose all state data before a certain block height. 253 | 254 | If you are an advanced player, you can also try to perform offline pruning on your nodes (Note that this is a dangerous operation and after pruning, the state data of the blocks before the target block height will no longer be available). 255 | You can follow these steps: 256 | 1. Shut down your machine and make sure that op-geth prints the following log: "Blockchain stopped". 257 | 2. Search for the keyword "Chain head was updated" in the logs to confirm the block height of the last inserted block before the node was shut down. For the sake of explanation, let's assume the block height is 16667495. 258 | 3. Wait for 16667495 to become the final state on the chain, ensuring that no reorganization has occurred. You can go to the blockchain explorer (https://opbnbscan.com/) to query this block height, 259 | and compare the block height hash with the one in the log. If the hashes match and a long time has passed, then we believe that this block height will not be reorganized. 260 | 4. Get the state root hash of this block height through JSON-RPC. 261 | 5. To execute pruning, use the following command: `geth snapshot prune-state --datadir {yourDataDir} --triesInMemory=32 {targetBlockStateRootHash}`, 262 | making sure to replace {yourDataDir} and {targetBlockStateRootHash} with your own values. 263 | 6. Be patient and observe the logs. The entire process may take dozens of hours. 264 | 7. Restart your node after pruning is complete. 265 | 266 | **Reminder: Pruning is very dangerous and may damage the data of the node. This could result in having to rerun the new node. Please only perform this operation if you are familiar with the process.** 267 | -------------------------------------------------------------------------------- /docusaurus.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Note: type annotations allow type checking and IDEs autocompletion 3 | 4 | const lightCodeTheme = require("prism-react-renderer/themes/github"); 5 | const darkCodeTheme = require("prism-react-renderer/themes/dracula"); 6 | 7 | /** @type {import('@docusaurus/types').Config} */ 8 | const config = { 9 | title: "BNB Optimistic Rollup", 10 | tagline: "opBNB", 11 | url: "https://docs.bnbchain.org", 12 | baseUrl: "/opbnb-docs/", 13 | onBrokenLinks: "throw", 14 | onBrokenMarkdownLinks: "warn", 15 | favicon: "img/favicon.ico", 16 | trailingSlash: true, 17 | 18 | // GitHub pages deployment config. 19 | // If you aren't using GitHub pages, you don't need these. 20 | organizationName: "bnb-chain", // Usually your GitHub org/user name. 21 | projectName: "opbnb-docs", // Usually your repo name. 22 | 23 | presets: [ 24 | [ 25 | "classic", 26 | /** @type {import('@docusaurus/preset-classic').Options} */ 27 | ({ 28 | docs: { 29 | sidebarPath: require.resolve("./sidebars.js"), 30 | // Please change this to your repo. 31 | // Remove this to remove the "edit this page" links. 32 | editUrl: 33 | "https://github.com/bnb-chain/opbnb-docs/blob/main", 34 | docLayoutComponent: "@theme/DocPage", 35 | docItemComponent: "@theme/ApiItem" // Derived from docusaurus-theme-openapi 36 | }, 37 | blog: { 38 | showReadingTime: true, 39 | editUrl: "https://www.bnbchain.org/en/blog/", 40 | }, 41 | theme: { 42 | customCss: require.resolve("./src/css/custom.css") 43 | }, 44 | gtag: { 45 | trackingID: 'G-LSRFL0KHRR', 46 | anonymizeIP: true, 47 | } 48 | }) 49 | ], 50 | ], 51 | 52 | themes: ["docusaurus-theme-openapi-docs"], 53 | 54 | themeConfig: 55 | 56 | /** @type {import('@docusaurus/preset-classic').ThemeConfig } */ 57 | ({ 58 | docs: { 59 | sidebar: { 60 | hideable: true, 61 | } 62 | }, 63 | algolia: { 64 | // The application ID provided by Algolia 65 | appId: '3LF005YNGZ', 66 | 67 | // Public API key: it is safe to commit it 68 | apiKey: 'dbc11ec6638f9c767ef6ed2856871f58', 69 | 70 | indexName: 'bnbchain', 71 | 72 | // Optional: see doc section below 73 | // contextualSearch: true, 74 | 75 | // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them. 76 | externalUrlRegex: 'https://docs.bnbchain.org/', 77 | 78 | }, 79 | navbar: { 80 | title: "BNB Optimistic Rollup", 81 | logo: { 82 | alt: "BNB Optimistic Rollup", 83 | src: "img/logo.svg" 84 | }, 85 | items: [ 86 | { 87 | link: { type: 'doc', id: 'build-on-opbnb/getting-started.md' }, 88 | label: "Getting Started", 89 | position: "left", 90 | to: "/docs/build-on-opbnb/getting-started", 91 | }, 92 | { 93 | link: { type: 'doc', id: '/core-concepts' }, 94 | label: "Core Concepts", 95 | position: "left", 96 | to: "/docs/core-concepts/need-for-opbnb", 97 | }, 98 | { 99 | link: { type: 'doc', id: '/docs/tutorials/running-a-local-node' }, 100 | label: "Tutorials", 101 | position: "left", 102 | to: "/docs/tutorials/running-a-local-node", 103 | }, 104 | { 105 | link: { type: 'doc', id: 'openbnb-faq' }, 106 | label: "FAQs", 107 | position: "left", 108 | to: "/docs/faq/opbnb-faq", 109 | }, 110 | { 111 | href: 'https://github.com/bnb-chain/opbnb-docs', 112 | position: 'right', 113 | className: 'header-github-link', 114 | 'aria-label': 'GitHub repository', 115 | }, 116 | ], 117 | }, 118 | 119 | prism: { 120 | theme: lightCodeTheme, 121 | darkTheme: darkCodeTheme, 122 | additionalLanguages: ["ruby", "csharp", "php"] 123 | } 124 | }), 125 | 126 | 127 | }; 128 | 129 | module.exports = config; 130 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "opbnb-docs", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "docusaurus": "docusaurus", 7 | "start": "docusaurus start", 8 | "build": "docusaurus build", 9 | "swizzle": "docusaurus swizzle", 10 | "deploy": "docusaurus deploy", 11 | "clear": "docusaurus clear", 12 | "serve": "docusaurus serve", 13 | "write-translations": "docusaurus write-translations", 14 | "write-heading-ids": "docusaurus write-heading-ids", 15 | "gen-api-docs": "docusaurus gen-api-docs", 16 | "clean-api-docs": "docusaurus clean-api-docs", 17 | "gen-api-docs:version": "docusaurus gen-api-docs:version", 18 | "clean-api-docs:version": "docusaurus clean-api-docs:version" 19 | }, 20 | "dependencies": { 21 | "@docusaurus/core": ">=2.0.1 <2.3.0", 22 | "@docusaurus/plugin-google-gtag": "^3.0.1", 23 | "@docusaurus/preset-classic": ">=2.0.1 <2.3.0", 24 | "@docusaurus/types": "^2.4.1", 25 | "@markprompt/css": "^0.8.1", 26 | "@markprompt/docusaurus-theme-search": "^0.7.0", 27 | "@markprompt/web": "^0.12.2", 28 | "@mdx-js/react": "^1.6.22", 29 | "clsx": "^1.1.1", 30 | "docusaurus-plugin-openapi-docs": "^1.7.0", 31 | "docusaurus-theme-openapi-docs": "^1.7.0", 32 | "prism-react-renderer": "^1.3.1", 33 | "react": "^17.0.2", 34 | "react-dom": "^17.0.2" 35 | }, 36 | "browserslist": { 37 | "production": [ 38 | ">0.5%", 39 | "not dead", 40 | "not op_mini all" 41 | ], 42 | "development": [ 43 | "last 1 chrome version", 44 | "last 1 firefox version", 45 | "last 1 safari version" 46 | ] 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | // @ts-check 13 | 14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 15 | const sidebars = { 16 | guideSidebar: [ 17 | { 18 | type: "category", 19 | label: "Introduction", 20 | //link: {type: 'doc', id: 'intro'}, 21 | collapsible: true, 22 | collapsed: true, 23 | items: ["intro", "intro/why-opbnb"], 24 | }, 25 | { 26 | type: "category", 27 | label: "Core Concepts", 28 | collapsible: true, 29 | collapsed: true, 30 | items: [ 31 | "core-concepts/need-for-opbnb", 32 | "core-concepts/why-opstack", 33 | "core-concepts/optimisations-on-opstack", 34 | "core-concepts/difference-BSC-Eth", 35 | "core-concepts/difference-L2", 36 | "core-concepts/cross-chain", 37 | "core-concepts/gas-and-fees", 38 | "core-concepts/account-abstraction-on-opbnb", 39 | "core-concepts/raas", 40 | ], 41 | }, 42 | { 43 | type: "category", 44 | label: "Getting Started", 45 | collapsible: true, 46 | collapsed: true, 47 | link: { type: "doc", id: "build-on-opbnb/getting-started" }, 48 | items: [ 49 | "build-on-opbnb/developer-cheat-sheet", 50 | "build-on-opbnb/wallet-configuration", 51 | "build-on-opbnb/set-gas-price", 52 | "build-on-opbnb/opbnb-network-info", 53 | "build-on-opbnb/network-faucet", 54 | "build-on-opbnb/deposit-to-opbnb", 55 | "build-on-opbnb/withdraw-from-opbnb", 56 | "build-on-opbnb/developer-tools", 57 | "build-on-opbnb/multisig-wallet", 58 | "build-on-opbnb/geth-sync", 59 | "build-on-opbnb/bep20-crosschain", 60 | ], 61 | }, 62 | 63 | { 64 | type: "doc", 65 | id: "contribute", 66 | label: "Contribute", 67 | }, 68 | ], 69 | 70 | tutorials: [ 71 | { 72 | type: "category", 73 | label: "Tutorials", 74 | collapsible: true, 75 | collapsed: true, 76 | items: [ 77 | "tutorials/running-a-local-development-environment", 78 | { 79 | type: "category", 80 | label: "Run opBNB Nodes", 81 | collapsible: true, 82 | collapsed: true, 83 | items: [ 84 | "tutorials/run-nodes-best-practices", 85 | "tutorials/running-a-local-node", 86 | "tutorials/pbss-pebble", 87 | ], 88 | }, 89 | "tutorials/full-stack-dapp", 90 | "tutorials/opbnbscan-verify-hardhat-truffle", 91 | "tutorials/creating-your-own-l2-rollup-testnet", 92 | "tutorials/chain-configuration", 93 | ], 94 | }, 95 | ], 96 | faqs: [ 97 | { 98 | type: "category", 99 | label: "FAQs", 100 | collapsible: true, 101 | collapsed: true, 102 | link: { 103 | type: "doc", 104 | id: "faq/opbnb-faq", 105 | }, 106 | items: [ 107 | "faq/protocol-faqs", 108 | "faq/gas-and-fees-faqs", 109 | "faq/opbnb-bridge-faqs", 110 | "faq/cross-chain-faqs", 111 | "faq/build-on-opbnb-faqs", 112 | ], 113 | }, 114 | ], 115 | }; 116 | 117 | module.exports = sidebars; 118 | -------------------------------------------------------------------------------- /src/components/HomepageFeatures/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import clsx from 'clsx'; 3 | import styles from './styles.module.css'; 4 | 5 | const FeatureList = [ 6 | { 7 | title: 'Easy to Use', 8 | Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, 9 | description: ( 10 | <> 11 | Docusaurus was designed from the ground up to be easily installed and 12 | used to get your website up and running quickly. 13 | 14 | ), 15 | }, 16 | { 17 | title: 'Focus on What Matters', 18 | Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, 19 | description: ( 20 | <> 21 | Docusaurus lets you focus on your docs, and we'll do the chores. Go 22 | ahead and move your docs into the docs directory. 23 | 24 | ), 25 | }, 26 | { 27 | title: 'Powered by React', 28 | Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, 29 | description: ( 30 | <> 31 | Extend or customize your website layout by reusing React. Docusaurus can 32 | be extended while reusing the same header and footer. 33 | 34 | ), 35 | }, 36 | ]; 37 | 38 | function Feature({Svg, title, description}) { 39 | return ( 40 |
41 |
42 | 43 |
44 |
45 |

{title}

46 |

{description}

47 |
48 |
49 | ); 50 | } 51 | 52 | export default function HomepageFeatures() { 53 | return ( 54 |
55 |
56 |
57 | {FeatureList.map((props, idx) => ( 58 | 59 | ))} 60 |
61 |
62 |
63 | ); 64 | } 65 | -------------------------------------------------------------------------------- /src/components/HomepageFeatures/styles.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 200px; 10 | width: 200px; 11 | } 12 | -------------------------------------------------------------------------------- /src/css/custom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Any CSS included here will be global. The classic template 3 | * bundles Infima by default. Infima is a CSS framework designed to 4 | * work well for content-centric websites. 5 | */ 6 | 7 | :root { 8 | --doc-sidebar-width: 250px !important; 9 | } 10 | /* You can override the default Infima variables here. */ 11 | :root { 12 | --ifm-color-primary: #2e8555; 13 | --ifm-color-primary-dark: #29784c; 14 | --ifm-color-primary-darker: #277148; 15 | --ifm-color-primary-darkest: #205d3b; 16 | --ifm-color-primary-light: #33925d; 17 | --ifm-color-primary-lighter: #359962; 18 | --ifm-color-primary-lightest: #3cad6e; 19 | --ifm-code-font-size: 95%; 20 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); 21 | } 22 | 23 | /* For readability concerns, you should choose a lighter palette in dark mode. */ 24 | [data-theme='dark'] { 25 | --ifm-color-primary: #25c2a0; 26 | --ifm-color-primary-dark: #21af90; 27 | --ifm-color-primary-darker: #1fa588; 28 | --ifm-color-primary-darkest: #1a8870; 29 | --ifm-color-primary-light: #29d5b0; 30 | --ifm-color-primary-lighter: #32d8b4; 31 | --ifm-color-primary-lightest: #4fddbf; 32 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); 33 | } 34 | 35 | /* GitHub Icon on NavBar*/ 36 | 37 | .header-github-link:hover { 38 | opacity: 0.6; 39 | } 40 | 41 | .header-github-link::before { 42 | content: ''; 43 | width: 24px; 44 | height: 24px; 45 | display: flex; 46 | background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") 47 | no-repeat; 48 | } 49 | 50 | [data-theme='dark'] .header-github-link::before { 51 | background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") 52 | no-repeat; 53 | } 54 | 55 | /* Sidebar Method labels */ 56 | .api-method>.menu__link { 57 | align-items: center; 58 | justify-content: start; 59 | } 60 | 61 | .api-method>.menu__link::before { 62 | width: 50px; 63 | height: 20px; 64 | font-size: 12px; 65 | line-height: 20px; 66 | text-transform: uppercase; 67 | font-weight: 600; 68 | border-radius: 0.25rem; 69 | border: 1px solid; 70 | margin-right: var(--ifm-spacing-horizontal); 71 | text-align: center; 72 | flex-shrink: 0; 73 | border-color: transparent; 74 | color: white; 75 | } 76 | 77 | .get>.menu__link::before { 78 | content: "get"; 79 | background-color: var(--ifm-color-primary); 80 | } 81 | 82 | .put>.menu__link::before { 83 | content: "put"; 84 | background-color: var(--openapi-code-blue); 85 | } 86 | 87 | .post>.menu__link::before { 88 | content: "post"; 89 | background-color: var(--openapi-code-green); 90 | } 91 | 92 | .delete>.menu__link::before { 93 | content: "del"; 94 | background-color: var(--openapi-code-red); 95 | } 96 | 97 | .patch>.menu__link::before { 98 | content: "patch"; 99 | background-color: var(--openapi-code-orange); 100 | } 101 | 102 | -------------------------------------------------------------------------------- /src/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Redirect } from 'react-router-dom'; 3 | 4 | export default function Home() { 5 | return ; 6 | } -------------------------------------------------------------------------------- /src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS files with the .module.css suffix will be treated as CSS modules 3 | * and scoped locally. 4 | */ 5 | 6 | .heroBanner { 7 | padding: 4rem 0; 8 | text-align: center; 9 | position: relative; 10 | overflow: hidden; 11 | } 12 | 13 | /* GitHub Icon on NavBar*/ 14 | 15 | .header-github-link:hover { 16 | opacity: 0.6; 17 | } 18 | 19 | .header-github-link::before { 20 | content: ''; 21 | width: 24px; 22 | height: 24px; 23 | display: flex; 24 | background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") 25 | no-repeat; 26 | } 27 | 28 | [data-theme='dark'] .header-github-link::before { 29 | background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") 30 | no-repeat; 31 | } 32 | 33 | @media screen and (max-width: 996px) { 34 | .heroBanner { 35 | padding: 2rem; 36 | } 37 | } 38 | 39 | .buttons { 40 | display: flex; 41 | align-items: center; 42 | justify-content: center; 43 | } 44 | -------------------------------------------------------------------------------- /src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/.nojekyll -------------------------------------------------------------------------------- /static/image-20231103144553832.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/image-20231103144553832.png -------------------------------------------------------------------------------- /static/img/74pMzvad03dbTmcQx6wGiGfqlfrtWzhxUBRUYooy5vcwtfbjVbKlK71mknIozAWagJz6NFsoBqjIiClFbd_0KrpSsuIY5qs6h81XLGsqvAV-Gsh4CPOLCqmfIOCYUxe1kPri8US7jPEfy_aJFmGwIJQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/74pMzvad03dbTmcQx6wGiGfqlfrtWzhxUBRUYooy5vcwtfbjVbKlK71mknIozAWagJz6NFsoBqjIiClFbd_0KrpSsuIY5qs6h81XLGsqvAV-Gsh4CPOLCqmfIOCYUxe1kPri8US7jPEfy_aJFmGwIJQ.png -------------------------------------------------------------------------------- /static/img/D63yQpYlnLUseqSJWf403Go4mrRaSQWM6LJ6EMsX6lJJH2BXlBEmy342JJp3hTW08mcjyClg4X6UmAOCTiTt1Hoq8APLdbyx8Z7UKtf0IYYYrwy5ZPtfcLv5LHgvEY7BXoLD6jUUlOnfe27gP0QhmEs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/D63yQpYlnLUseqSJWf403Go4mrRaSQWM6LJ6EMsX6lJJH2BXlBEmy342JJp3hTW08mcjyClg4X6UmAOCTiTt1Hoq8APLdbyx8Z7UKtf0IYYYrwy5ZPtfcLv5LHgvEY7BXoLD6jUUlOnfe27gP0QhmEs.png -------------------------------------------------------------------------------- /static/img/L1-L2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/L1-L2.png -------------------------------------------------------------------------------- /static/img/LlvtsQFvpzHkXr6s3aWyOLW6agzcChIOW3xx1sakQJRRSP448OS2Q7jdDGTLS77Ve6gbAZuHrMu16CqVavhpduOerSJCXvR70RZ6HLe03UhYyHtfHd9HqChc55XLdrG9Ogq922OCUt2Wk64wbmYawG0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/LlvtsQFvpzHkXr6s3aWyOLW6agzcChIOW3xx1sakQJRRSP448OS2Q7jdDGTLS77Ve6gbAZuHrMu16CqVavhpduOerSJCXvR70RZ6HLe03UhYyHtfHd9HqChc55XLdrG9Ogq922OCUt2Wk64wbmYawG0.png -------------------------------------------------------------------------------- /static/img/add-bsc-metamask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/add-bsc-metamask.png -------------------------------------------------------------------------------- /static/img/add-bsc-trustwallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/add-bsc-trustwallet.png -------------------------------------------------------------------------------- /static/img/advanced-setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/advanced-setting.png -------------------------------------------------------------------------------- /static/img/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/banner.png -------------------------------------------------------------------------------- /static/img/bridge-supported-tokens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/bridge-supported-tokens.png -------------------------------------------------------------------------------- /static/img/bsc-testnet-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/bsc-testnet-config.png -------------------------------------------------------------------------------- /static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/docusaurus.png -------------------------------------------------------------------------------- /static/img/evm-state-data-access-optimization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/evm-state-data-access-optimization.png -------------------------------------------------------------------------------- /static/img/faqs/Withdraw-confirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/faqs/Withdraw-confirmation.png -------------------------------------------------------------------------------- /static/img/faqs/bridge-estimate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/faqs/bridge-estimate.png -------------------------------------------------------------------------------- /static/img/faqs/mm-balance-mismatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/faqs/mm-balance-mismatch.png -------------------------------------------------------------------------------- /static/img/faqs/wallet-estimate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/faqs/wallet-estimate.png -------------------------------------------------------------------------------- /static/img/faqs/zkBridge_issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/faqs/zkBridge_issue.png -------------------------------------------------------------------------------- /static/img/faucet-tbnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/faucet-tbnb.png -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/gas-price-setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/gas-price-setting.png -------------------------------------------------------------------------------- /static/img/image-20231027125614827.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/image-20231027125614827.png -------------------------------------------------------------------------------- /static/img/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/img/online-faucet-bnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/online-faucet-bnb.png -------------------------------------------------------------------------------- /static/img/opBNB-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opBNB-arch.png -------------------------------------------------------------------------------- /static/img/opBNB-bridge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opBNB-bridge.png -------------------------------------------------------------------------------- /static/img/opBNB-deploy-contract.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opBNB-deploy-contract.PNG -------------------------------------------------------------------------------- /static/img/opBNB-intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opBNB-intro.png -------------------------------------------------------------------------------- /static/img/opBNB-testnet-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opBNB-testnet-config.png -------------------------------------------------------------------------------- /static/img/opbnb-connect-wallet.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opbnb-connect-wallet.PNG -------------------------------------------------------------------------------- /static/img/opbnb-helloworld-ui-2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opbnb-helloworld-ui-2.PNG -------------------------------------------------------------------------------- /static/img/opbnb-helloworld-ui.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opbnb-helloworld-ui.PNG -------------------------------------------------------------------------------- /static/img/opbnb-metamask-tx.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/opbnb-metamask-tx.PNG -------------------------------------------------------------------------------- /static/img/pool-sharing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/pool-sharing.png -------------------------------------------------------------------------------- /static/img/prefetch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/prefetch.png -------------------------------------------------------------------------------- /static/img/tutorial/docsVersionDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/tutorial/docsVersionDropdown.png -------------------------------------------------------------------------------- /static/img/tutorial/localeDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/tutorial/localeDropdown.png -------------------------------------------------------------------------------- /static/img/undraw_docusaurus_tree.svg: -------------------------------------------------------------------------------- 1 | 2 | Focus on What Matters 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /static/img/why-opbnb-tx-stats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/why-opbnb-tx-stats.png -------------------------------------------------------------------------------- /static/img/withdraw-confirm-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/withdraw-confirm-details.png -------------------------------------------------------------------------------- /static/img/withdraw-confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/withdraw-confirm.png -------------------------------------------------------------------------------- /static/img/withdraw-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/withdraw-status.png -------------------------------------------------------------------------------- /static/img/withdraw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zikc2023/opbnb-docs/2d33e35930bb3ab6365d5bbc6403ca80e1b99e1c/static/img/withdraw.png --------------------------------------------------------------------------------