opBNB Testnet PreContract Hardfork



opBNB Testnet PreContract Hardfork

Description opBNB

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 5114294, expected to occur on Aug 14, 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 5114294. If the transaction fails, enable the HTTP admin API.


Tags: