BNB Smart Chain

Build web3 dApps effortlessly

BNB 信標鏈

Sunset Complete

BNB Chain 生態系的質押與治理層

文件GitHubFaucetStake BNBBscScanBSCTraceDev ToolsLearn more about Fusion文件信標鏈瀏覽器Token Recovery Tool文件GitHubFaucet跨鏈橋GreenfieldScanDCellarDev Tools文件GitHubFaucet跨鏈橋opBNBScanDev Tools

開發人員


Submit dApps

BNB Smart ChainBNB GreenfieldopBNBBNB HackBNB Incubation Alliance (BIA)MVB 加速器計畫BNB Chain Grants開始Gas GrantsTVL Incentive ProgramMEME Coins Innovation查看所有計畫

Solutions

Tokenization

Get Your Business Into Web3

Company TokenizationReal World Assets TokenizationNFT Loyalty ProgramLaunch MemecoinStep by Step Guide

生態系

Staking

Earn BNB and rewards effortlessly

Native StakingLiquid Staking

社群

Careers🔥

Explore Opportunities on BNB Chain

BNB Chain CareersEcosystem Jobs
Get Started
Get Started

opBNB Testnet PreContract Hardfork

2023.8.9  •  2 min read
Blog post image.


Note: This is an updated version of a blog previously published on August 9th, 2023.

Description

This hard fork aims to add the PreContract hard fork, which updates the pre-deployed contract WBNB. The address of the WBNB contract is 0x4200000000000000000000000000000000000006, and it involves changes to the contract's name and symbol. Additionally, the pre-deployed contract GovernanceToken, with the address 4200000000000000000000000000000000000042, will be removed.

The hard fork block height is 5805494, expected to occur on Aug 22, 2023, at 06:00:00 AM UTC. If you are running a full node of opBNB, you must complete the upgrade before the specified time. Failing to do so will result in running a forked chain instead of the canonical chain. This will cause incorrect data queries from the node and transactions sent via the node may fail to be included in the block. You may need to clear the data and run the node again to recover it.

Changes

reference PR: feat:add preDeployedContract hardfork

  • Set preDeployed contract WBNB name to Wrapped BNB.
  • Set preDeployed contract WBNB symbol to WBNB.
  • Remove preDeployed contract 4200000000000000000000000000000000000042.

Upgrade Tutuorial

  • Build the latest op-geth binary from the op-geth repository version v0.1.3.
  • Obtain the most recent genesis.json file, which includes the new hardfork parameter preContractForkBlock.
  • Stop the op-geth process and replace the existing binary with the latest one.
  • Use the new op-geth to initialize the new genesis file by running the command:
    ./op-geth --datadir ./datadir init genesis.json.
    If the initialization fails, you may be running on a different network.
  • Restart op-geth, and the hardfork will take effect after reaching the block number specified by preContractForkBlock.
  • To ensure that the new parameter is set correctly, use the following command:
curl -X POST --data '{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}' -H "Content-Type: application/json" http://localhost:8545

The response should include the preContractForkBlock parameter with a value of 5805494. If the transaction fails, enable the HTTP admin API.

Follow us to stay updated on everything BNB Chain!

Website | Twitter | Twitter (Devs) | Telegram | dApp Store | YouTube | Discord | LinkedIn | Build N' Build Forum | Dev Community|

Share