description |
---|
Learn more about the Boba Network and OVM 2.0 |
-
What is the Gas Price on Boba L2?
The Gas Price on L2 changes every 30 seconds with some smoothing to reduce sharp discontinuities in the price from one moment to the next. The maximum percentage change from one value to another is capped to not more than 5% in the gas price oracle. For example, if the current
gasPrice
is 10 Gwei then the nextgasPrice
will be between 9.5 and 10.5 Gwei. Like on mainchain, the current gas price can be obtained via.getGasPrice()
and is typically around 10 Gwei. -
What are the decimals for tokens on the Boba L2?
In general, the decimals on L2 mirror those of L1. You can check decimals using the blockexploer.boba.network, for example:
https://blockexplorer.boba.network/tokens/0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc/token-transfers
Exception: Note that the decimals on Rinkeby are generally 18, whereas on L2 mainnet they mirror the ETH L1 decimals.
You can also check the decimals of course by calling the token contracts:
const decimals = await this.ERC20_Contract.attach(tokenAddress).connect(this.L2Provider).decimals() //typical values are 18 or, in some rare but important cases, 6
-
How do I bridge funds from L1 to L2?
There are two methods, the classical bridge and the fast bridge. You can see an example of the classical bridge here. There is working code here.
-
Do you support EIP-2470: Singleton Factory?
Yes! ERC-2470 is deployed to
0xce0042B868300000d44A59004Da54A005ffdcf9f
on the Boba L2. The address on the Boba L2 is the same as on Ethereum mainnet. -
How do I follow cross domain (xDomain) transactions and their status?
There are 4 different mechanisms for following the status of a transaction.
- The Boba Blockexplorer (for L2) and Etherscan (for L1)
- Running a typescript
watcher
- Using the Boba
watcher-api
- Third-party analytics
These methods are described here.
The v1 to v2 changes reduced the differences between the OVM and EVM so that developers can implement their contracts with just one target in mind, instead of managing OVM idiosyncrasies with separate contracts. Here is the list of changes to watch for, in case you are used to v1:
- Contracts whose source code has not been verified on Etherscan will be wiped out along with their storage.
- Contracts whose source code has been verified will be recompiled with the standard Solidity compiler. As a result of this:
- The
EXTCODEHASH
andCODESIZE
of every contract will change. Any hardcoded values will break. - The address generated by
CREATE2
may be different (it depends on the constructor code). - Code size will no longer be increased during compilation. Any custom OVM work that required reducing code size could now be reverted.
- The
- ETH will no longer be ERC20 compatible.
- Users will no longer be able to transfer and interact with ETH as an ERC20 located at
0x4200000000000000000000000000000000000006
. - Please let us know if you rely on this functionality on Optimistic Ethereum mainnet currently as we will have to migrate those balances to a standard WETH9 contract which will be deployed to a new TBD address
- The
Transfer
event currently emitted on ETH fee payment will be removed
- Users will no longer be able to transfer and interact with ETH as an ERC20 located at
- Our fee scheme will be altered. Learn more
- EOAs will no longer be contract wallets
- Currently, every new EOA in Optimistic Ethereum deploys a proxy contract to that address, making every EOA a contract account.
- After the upgrade, every known contract account will be reverted to an EOA with no code.
- To best handle the upgrade, we recommend you write your contracts to handle normal EOAs and to make no assumptions around EOAs having code or additional OVM-specific functionality.
- Gas usage will decrease to be the same as on L1 Ethereum.
- Currently, the OVM results in an increase in gas usage because of compiled OVM opcodes, sometimes inflating gas costs by up to 10x the costs on L1 Ethereum.
- With this OVM upgrade, gas usage on Optimistic Ethereum should now exactly match the expected gas usage from a deployment to (L1) pre-London Ethereum in almost all cases.
- Certain opcodes will have updated functionality:
NUMBER
-block.number
in L2 will now correspond to the L2 block number, not “Last finalized L1 block number” like it used to. Any project currently usingblock.number
must check that this will not break their implementation. The L1 Block number will be made accessible via a new pre-deployed contract.COINBASE
is set by the sequencer. For the near-term future, it will return theOVM_SequencerFeeVault
address (currently0x4200000000000000000000000000000000000011
)DIFFICULTY
will return 0BLOCKHASH
will return the L2 block hash. Note that this value can be manipulated by the sequencer and is not a safe source of randomness.SELFDESTRUCT
will now work just as it currently works in the EVM.GASPRICE
will now return the l2GasPriceBASEFEE
will be unsupported - execution will revert if it is used.ORIGIN
will be supported normally.
- Certain OVM system contracts will be wiped from the state. We will remove:
OVM_ExecutionManager
OVM_SequencerEntrypoint
OVM_StateManager
OVM_StateManagerFactory
OVM_SafetyChecker
OVM_ECDSAContractAccount
OVM_ExecutionManagerWrapper
All other OVM pre-deploys will remain at the same addresses as before the re-genesisTIMESTAMP
will function the same as before, updating with each new deposit or after 5 minutes if there has not been a deposit.TIMESTAMP
will still correspond to "Last Finalized L1 Timestamp"