-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: disable ETH ERC20 features #1450
Conversation
🦋 Changeset detectedLatest commit: ebc5e529581bb026272d7a7731d39037caa1f753 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
17c766f
to
292425a
Compare
|
f3f54a8
to
8dda912
Compare
Is the idea of this PR to make it so that ETH balance shows up in the account itself instead of being in a contract? If so, I believe this needs to be updated as well. https://github.com/ethereum-optimism/optimism/blob/8dda91206e7b3b2a8f9839e278c90873f973594f/l2geth/core/state/statedb.go#L369-L379 Based on the usage of |
Balance will still be in the contract until further notice. Currently we need this in order to do ETH withdrawals but that will likely change in the update after this next one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just would suggest removing all of the ERC20 functions altogether instead of reverting for them
describe('transfer', () => { | ||
it('should revert', async () => { | ||
await expect( | ||
OVM_ETH.transfer(await signer2.getAddress(), 100) | ||
).to.be.revertedWith( | ||
'OVM_ETH: ERC20 features are disabled pending further community discussion.' | ||
) | ||
}) | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above - do we even need to have these functions exist? We can just delete them + these tests for now
Unfortunately I can't do this without making a huge diff because OVM_ETH inherits L2StandardERC20 which inherits ERC20 etc etc. Disabling the functions was the easiest option. |
Didn't think of that - will go ahead and approve 👍 |
33fc843
to
ebc5e52
Compare
ebc5e52
to
f8fbeca
Compare
Description
Disables ERC20 and WETH9 features in
OVM_ETH
, moves the contract to0xdeaddead....0000
.Metadata