-
Notifications
You must be signed in to change notification settings - Fork 403
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
fix: use implementation instead of admin slot for isProxy #5034
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: b50d766 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5034 +/- ##
=======================================
Coverage 77.53% 77.53%
=======================================
Files 103 103
Lines 2110 2110
Branches 190 190
=======================================
Hits 1636 1636
Misses 453 453
Partials 21 21
|
const admin = await proxyAdmin(provider, proxy); | ||
return !eqAddress(admin, ethers.constants.AddressZero); | ||
const implementation = await proxyImplementation(provider, proxy); | ||
return !eqAddress(implementation, ethers.constants.AddressZero); |
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.
I wonder if !isZeroishAddress
here would be more robust
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.
Tests not all passing
Description
Admin slot is optional as per https://eips.ethereum.org/EIPS/eip-1967
This PR uses the implementation slot for determining whether the contract is a (1967) proxy.
Backward compatibility
Yes
Testing
None