Commit 1403884a authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #4351 from ethereum-optimism/sc/ctb-legacy-eth-invariant

feat(ctb): preserve legacy ETH invariant
parents 3c9d662b 8d125b7b
This diff is collapsed.
This diff is collapsed.
......@@ -22,6 +22,19 @@ contract LegacyERC20ETH is OptimismMintableERC20 {
OptimismMintableERC20(Predeploys.L2_STANDARD_BRIDGE, address(0), "Ether", "ETH")
{}
/**
* @notice Returns the ETH balance of the target account. Overrides the base behavior of the
* contract to preserve the invariant that the balance within this contract always
* matches the balance in the state trie.
*
* @param _who Address of the account to query.
*
* @return The ETH balance of the target account.
*/
function balanceOf(address _who) public view virtual override returns (uint256) {
return address(_who).balance;
}
/**
* @custom:blocked
* @notice Mints some amount of ETH.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment