-
Notifications
You must be signed in to change notification settings - Fork 17
feat(ensindexer): re-derive Resolver.extended on EIP-1967 proxy upgrade (.box) #2280
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b96d063
feat(ensindexer): re-classify Resolver.extended on EIP-1967 proxy upg…
shrugs 429ed5c
Merge branch 'main' into feat/reclassify-extended-on-proxy-upgrade
shrugs 097380b
Merge branch 'main' into feat/reclassify-extended-on-proxy-upgrade
shrugs 41afc50
checkpoint: self review
shrugs 32e200d
fix: typechec
shrugs a801332
fix: revert back to single-address checking
shrugs c0f8b8c
docs: clarify upsertResolver derives interfaces on first insert (loop 1)
shrugs 212e450
refactor: spell UpgradeableProxyResolver consistently (loop 2)
shrugs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "ensindexer": patch | ||
| --- | ||
|
|
||
| ENSIndexer now re-derives a Resolver's ENSIP-10 `IExtendedResolver` support when a known proxy Resolver emits an EIP-1967 `Upgraded` event, instead of fixing the value once at first visibility. Proxy Resolvers that activate `IExtendedResolver` via a post-assignment upgrade (e.g. the 3DNS Resolver behind `.box`) were stuck `extended = false` forever, silently breaking wildcard resolution for affected names. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
apps/ensindexer/src/plugins/protocol-acceleration/handlers/UpgradeableProxyResolver.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { PluginName } from "@ensnode/ensnode-sdk"; | ||
|
|
||
| import { getThisAccountId } from "@/lib/get-this-account-id"; | ||
| import { addOnchainEventListener } from "@/lib/indexing-engines/ponder"; | ||
| import { namespaceContract } from "@/lib/plugin-helpers"; | ||
| import { handleResolverImplementationChange } from "@/lib/protocol-acceleration/resolver-db-helpers"; | ||
|
|
||
| const pluginName = PluginName.ProtocolAcceleration; | ||
|
|
||
| /** | ||
| * Handlers for any Resolvers that are UpgradeableProxies, necessary for tracking implementation updates. | ||
| */ | ||
| export default function () { | ||
| addOnchainEventListener( | ||
| namespaceContract(pluginName, "UpgradeableProxyResolver:Upgraded"), | ||
| async ({ context, event }) => { | ||
| const resolver = getThisAccountId(context, event); | ||
| await handleResolverImplementationChange(context, resolver); | ||
| }, | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import type { Abi } from "viem"; | ||
|
|
||
| /** | ||
| * Minimal ABI for EIP-1967 upgradeable proxies. | ||
| * | ||
| * Captures only the `Upgraded(address indexed implementation)` event, emitted by transparent/UUPS | ||
| * proxies whenever their implementation slot changes. | ||
| * | ||
| * @see https://eips.ethereum.org/EIPS/eip-1967 | ||
| */ | ||
| export const UpgradeableProxy = [ | ||
| { | ||
| type: "event", | ||
| name: "Upgraded", | ||
| inputs: [{ name: "implementation", type: "address", indexed: true, internalType: "address" }], | ||
| anonymous: false, | ||
| }, | ||
| ] as const satisfies Abi; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.