MCPcopy Index your code
hub / github.com/bnb-chain/opbnb

github.com/bnb-chain/opbnb @v0.5.6.test

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.6.test ↗ · + Follow
20,538 symbols 70,549 edges 1,310 files 12,061 documented · 59%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

opBNB - High-performance layer 2 solution

The opBNB network is the Layer 2 scaling solution for the BNB Smart Chain(BSC) powered by bedrock version 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 network. Users interact with the opBNB network by depositing funds from BSC and using applications and contracts on opBNB. 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.

Comparison

Besides the differentiators of OP Stack, opBNB is the solution that we aim to provide the best optimistic rollup solution on the BSC.

  • Capacity can reach to 100m gas per second, which is much higher than other layer 2 solutions on the Ethereum.
  • Gas fee of transfer can reach as low as $0.005 on average.
  • block time is 1 second.
Parameter opBNB value Optimism value Ethereum value (for reference)
Block gas limit 100,000,000 gas 30,000,000 gas 30,000,000 gas
Block gas target 50,000,000 5,000,000 gas 15,000,000 gas
EIP-1559 elasticity multiplier 2 6 2
EIP-1559 denominator 8 50 8
Maximum base fee increase (per block) 12.5% 10% 12.5%
Maximum base fee decrease (per block) 12.5% 2% 12.5%
Block time in seconds 1 2 12

Documentation

If you want to build on top of opBNB, refer to the opBNB Doc.

Community

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.

You can also join the conversation, connect with other projects, and ask questions in our BNB Chain Forum.

Directory Structure

~~ opBNB ~~
├── packages
│   └── contracts-bedrock: Bedrock smart contracts.
├── op-bindings: Go bindings for Bedrock smart contracts.
├── op-batcher: L2-Batch Submitter, submits bundles of batches to L1
├── op-e2e: End-to-End testing of all bedrock components in Go
├── op-node: rollup consensus-layer client.
├── op-proposer: L2-Output Submitter, submits proposals to L1
├── ops-bedrock: Bedrock devnet work
└── specs: Specs of the rollup starting at the Bedrock upgrade

License

All files within this repository are licensed under the MIT License unless stated otherwise.

Extension points exported contracts — how you extend this code

NodeAdminProxyAPI (Interface)
NodeProxyAPI defines the methods proxied to the node rpc backend This should include all methods that are called by op-b [10 …
op-conductor/rpc/api.go
Scores (Interface)
go:generate mockery --name Scores --output mocks/ --with-expecter=true [6 implementers]
op-node/p2p/gating/scoring.go
TraceAccessor (Interface)
TraceAccessor defines an interface to request data from a TraceProvider with additional context for the game position. T [6 …
op-challenger/game/fault/types/types.go
ETHBackend (Interface)
ETHBackend is the set of methods that the transaction manager uses to resubmit gas & determine when transactions are inc [6 …
op-service/txmgr/txmgr.go
SyncStatusProvider (Interface)
SyncStatusProvider is the interface of a rollup client from which its sync status can be queried. [9 implementers]
op-service/dial/rollupclient_interface.go
StateOracle (Interface)
StateOracle defines the high-level API used to retrieve L2 state data pre-images The returned data is always the preimag [8 …
op-program/client/l2/oracle.go
KV (Interface)
KV is a Key-Value store interface for pre-image data. [10 implementers]
op-program/host/kvstore/kv.go
Hint (Interface)
Hint is an interface to enable any program type to function as a hint, when passed to the Hinter interface, returning a [5 …
op-preimage/iface.go

Core symbols most depended-on inside this repo

Equal
called by 3170
op-conductor/conductor/service.go
Errorf
called by 2405
op-e2e/e2eutils/testing.go
New
called by 1077
op-service/testlog/testlog.go
Error
called by 709
op-e2e/e2eutils/testing.go
Hash
called by 525
op-service/eth/block_info.go
Run
called by 443
op-conductor/consensus/mocks/Consensus.go
FilterLogs
called by 337
op-service/fallbackclient/client.go
Add
called by 309
op-service/sources/caching/cache.go

Shape

Method 12,933
Function 4,045
Struct 2,890
Interface 403
TypeAlias 116
FuncType 113
Class 32
Enum 6

Languages

Go99%
TypeScript1%
Python1%
C1%
Rust1%

Modules by API surface

op-e2e/bindings/safel2_v130.go257 symbols
op-e2e/bindings/safe_v130.go241 symbols
op-e2e/bindings/safe.go238 symbols
op-e2e/bindings/systemconfig.go173 symbols
op-e2e/bindings/faultdisputegame.go172 symbols
op-dispute-mon/bindings/faultdisputegame.go172 symbols
op-e2e/bindings/entrypoint.go170 symbols
op-e2e/bindings/l1standardbridge.go166 symbols
op-chain-ops/crossdomain/bindings/l1standardbridge.go166 symbols
op-chain-ops/upgrades/bindings/l1standardbridge.go165 symbols
op-chain-ops/upgrades/bindings/systemconfig.go164 symbols
indexer/bindings/l1standardbridge.go163 symbols

For agents

$ claude mcp add opbnb \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page