-
Notifications
You must be signed in to change notification settings - Fork 15
refactor(ensindexer): improve ENSIndexerConfig #765
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
Conversation
…ions This way, we can derive config params on already validated config.
…onfig' into feat/757-761-improve-ensindexerconfig-ext
🦋 Changeset detectedLatest commit: d13baf8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| import type { MergedTypes } from "@/lib/plugin-helpers"; | ||
|
|
||
| import basenamesPlugin from "@/plugins/basenames/basenames.plugin"; | ||
| import lineaNamesPlugin from "@/plugins/lineanames/lineanames.plugin"; | ||
| import subgraphPlugin from "@/plugins/subgraph/subgraph.plugin"; | ||
| import threednsPlugin from "@/plugins/threedns/threedns.plugin"; |
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.
This refactor enabled creation of getPlugin(pluginName: PluginName) helper, which will be used in validation logic.
apps/ensindexer/ponder.config.ts
Outdated
| // combine each plugins' config into a MergedPonderConfig | ||
| const ponderConfig = activePlugins.reduce( | ||
| (memo, plugin) => mergePonderConfigs(memo, plugin.config), | ||
| (memo, plugin) => mergePonderConfigs(memo, plugin.createPluginConfig(config)), |
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.
Plugin config required using factory function in order to calculate the PluginConfig type and pass it as a param in to ENSIndexerPlugin type.
| const derive_isSubgraphCompatible = < | ||
| CONFIG extends Pick< | ||
| ENSIndexerConfig, | ||
| "plugins" | "healReverseAddresses" | "indexAdditionalResolverRecords" | ||
| >, | ||
| >( | ||
| config: CONFIG, | ||
| ): CONFIG & { isSubgraphCompatible: boolean } => { | ||
| // 1. only the subgraph plugin is active | ||
| const onlySubgraphPluginActivated = | ||
| config.plugins.length === 1 && config.plugins[0] === PluginName.Subgraph; | ||
|
|
||
| // 2. healReverseAddresses = false | ||
| // 3. indexAdditionalResolverRecords = false | ||
| const indexingBehaviorIsSubgraphCompatible = | ||
| !config.healReverseAddresses && !config.indexAdditionalResolverRecords; | ||
|
|
||
| return { | ||
| ...config, | ||
| isSubgraphCompatible: onlySubgraphPluginActivated && indexingBehaviorIsSubgraphCompatible, | ||
| }; | ||
| }; | ||
|
|
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.
Moved into a separate derived-params.ts file.
| ), | ||
| } as ENSIndexerConfig, | ||
| null, | ||
| (key: string, value: unknown) => (key === "abi" ? `(truncated ABI output)` : value), |
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.
Quite handy to avoid printing very long ABIs into stdout for ENSIndexer container.
| } | ||
|
|
||
| // Helper type to merge multiple types into one | ||
| export type MergedTypes<T> = (T extends any ? (x: T) => void : never) extends (x: infer R) => void |
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.
Didn't want to call import config from "@/config"; while importing MergedTypes, so moved MergedTypes where it's needed (a private helper type inside @/plugins)
| ...args | ||
| }: ENSIndexerPluginHandlerArgs<PLUGIN_NAME> & { | ||
| handlers: Promise<{ default: ENSIndexerPluginHandler<PLUGIN_NAME> }>[]; | ||
| handlers: () => Promise<{ default: ENSIndexerPluginHandler<PLUGIN_NAME> }>[]; |
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.
| */ | ||
|
|
||
| export const getENSDeployment = (ensDeploymentChain: keyof typeof ENSDeployments) => | ||
| export const getENSDeployment = (ensDeploymentChain: ENSDeploymentChain) => |
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 type, just called directly.
| @@ -1,4 +1,3 @@ | |||
| import { zeroAddress } from "viem"; | |||
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.
Dropping unused import.
| import lineaNamesPlugin from "@/plugins/lineanames/lineanames.plugin"; | ||
| import subgraphPlugin from "@/plugins/subgraph/subgraph.plugin"; | ||
| import threednsPlugin from "@/plugins/threedns/threedns.plugin"; | ||
| import { ALL_PLUGINS, type AllPluginsConfig } from "@/plugins"; |
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.
Decoupling plugins list from ponder.config.ts file is a step towards having plugin configuration managed through ENSIndexerConfig builder.
…ensindexerconfig-ext
lightwalker-eth
left a comment
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.
@tk-o Super cool upgrades here. Nice work 🚀
apps/ensindexer/ponder.config.ts
Outdated
| // combine each plugins' config into a MergedPonderConfig | ||
| const ponderConfig = activePlugins.reduce( | ||
| (memo, plugin) => mergePonderConfigs(memo, plugin.config), | ||
| (memo, plugin) => mergePonderConfigs(memo, plugin.createPluginConfig(config)), |
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.
Noting here how I see both "ponderConfig" and "pluginConfig" language being mixed together.
Should we align this? Should createPluginConfig be renamed to createPonderConfig?
Advice appreciated 👍
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've had mixed feelings about all of the config-related values being passed around next to each other.
We have:
- application config of
ENSIndexerConfigtype, which is often referred to just asconfig - plugin config that is actually a result of
createConfigfunction ofponder
I think renaming createPluginConfig into createPonderConfig is a good move 👍
| [PluginName.Lineanames]: [DatasourceName.Lineanames], | ||
| [PluginName.ThreeDNS]: [DatasourceName.ThreeDNSOptimism, DatasourceName.ThreeDNSBase], | ||
| }; | ||
| export function getPlugin(pluginName: PluginName) { |
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.
Cool utility function 👍 Could we please explicitly identify the type this function returns, or is that tricky?
If tricky, no need to worry about this comment.
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.
It's tricky, as the list of ALL_PLUGINS is marked as const type, which turns it into a literal.
| * @param pluginNames A list of selected plugin names. | ||
| * @returns A list of unique datasource names. | ||
| */ | ||
| export function getRequiredDatasourceNames(pluginNames: PluginName[]): DatasourceName[] { |
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.
Nice 👍
| const activePluginNames = allPluginNames.filter((pluginName) => | ||
| config.plugins.includes(pluginName), | ||
| ); | ||
| const ensDeployment = getENSDeployment(config.ensDeploymentChain); |
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'm surprised this works ok? As I understand invariant_requiredDatasources is called before config is finished being built?
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.
This works OK as invariant functions, such as invariant_requiredDatasources, are applied after the input object was already parsed into correct individual types.
Please note how Pick type is applied onto the ENSIndexerConfig type. This way, we can ensure the invariant function gets all data it needs from a slice of the whole config. The parsing process ended, but we still apply invariants, and add derived config values to the final config object.
I've build a small demo to illustrate that here:

|
|
||
| if (globalBlockrange.startBlock !== undefined || globalBlockrange.endBlock !== undefined) { | ||
| const deployment = getENSDeployment(config.ensDeploymentChain); | ||
| const indexedChainIds = uniq( |
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 think I saw another helper function we've built now for getting the set of unique chainIds being indexed? Seems nice to reuse it here if possible?
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 think you refer to getIndexedChainIds function was added in this very PR inside plugin-helpers.ts. Will apply it here.
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.
getIndexedChainIds has implicit dependency on config value from import config from "@/config".
I've just discovered it might be tricky to replace reading from import config from "@/config"; and keep typescript inferred types working. It all comes back to ponder config expecting literal values.
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.
Logged an issue:
apps/ensindexer/src/config/types.ts
Outdated
| * | ||
| * See {@link ENSDeployment} for the deployment type. | ||
| */ | ||
| ensDeployment: ENSDeploymentGlobalType; |
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.
We need to document / explain what this ENSDeploymentGlobalType is here. It's not intuitive why this type is being used or what it represents.
I'm not 100% sure I'm familiar with all the background here, but what about the following?
- Change the definition of
ENSDeploymentGlobalTypefromtypeof ENSDeployments.mainnetto something likeRequired<ENSDeployment>. - Rename
ENSDeploymentGlobalTypeto something more self-describing, such asENSDeploymentCommonType. - Refine the docs for
ENSDeploymentGlobalType.
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.
The moment we change type for ENSDeploymentCommonType from:
typeof ENSDeployments.mainnet
to
Required<ENSDeployment>
whole type inference for ponder handlers falls apart.
Type error logs
pnpm -r --parallel typecheck
Scope: 12 of 13 workspace projects
apps/ensindexer typecheck$ tsc --noEmit
apps/ensadmin typecheck$ tsc --noEmit
apps/ensrainbow typecheck$ tsc --noEmit
packages/ensrainbow-sdk typecheck$ tsc --noEmit
packages/ensnode-sdk typecheck$ tsc --noEmit
packages/ponder-metadata typecheck$ tsc --noEmit
packages/ponder-subgraph typecheck$ tsc --noEmit
packages/ensrainbow-sdk typecheck: Done
packages/ensnode-sdk typecheck: Done
apps/ensrainbow typecheck: Done
packages/ponder-subgraph typecheck: Done
packages/ponder-metadata typecheck: Done
apps/ensadmin typecheck: Done
apps/ensindexer typecheck: src/handlers/NameWrapper.ts(260,11): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/NameWrapper.ts(261,11): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/NameWrapper.ts(283,13): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/NameWrapper.ts(284,13): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Registrar.ts(139,27): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Registry.ts(66,20): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Registry.ts(116,32): error TS18048: 'event.transaction' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Registry.ts(167,22): error TS18048: 'event.transaction' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Registry.ts(195,32): error TS18048: 'event.transaction' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Registry.ts(255,53): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(60,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(64,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(96,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(100,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(131,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(135,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(149,16): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(165,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(171,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(190,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(196,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(221,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(225,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(295,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(299,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(319,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(323,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(348,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(353,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(375,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(386,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(445,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(449,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(540,54): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/Resolver.ts(544,14): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/ThreeDNSToken.ts(33,3): error TS2322: Type 'unknown' is not assignable to type 'string'.
apps/ensindexer typecheck: src/handlers/ThreeDNSToken.ts(98,18): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/ThreeDNSToken.ts(205,40): error TS18048: 'event.transaction' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/ThreeDNSToken.ts(212,40): error TS18048: 'event.transaction' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/ThreeDNSToken.ts(219,40): error TS18048: 'event.transaction' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/ThreeDNSToken.ts(234,16): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/handlers/ThreeDNSToken.ts(248,23): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/lib/db-helpers.ts(32,30): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/lib/db-helpers.ts(32,50): error TS18048: 'event.log' is possibly 'undefined'.
apps/ensindexer typecheck: src/lib/db-helpers.ts(33,18): error TS18048: 'event.block' is possibly 'undefined'.
apps/ensindexer typecheck: src/lib/db-helpers.ts(34,20): error TS18048: 'event.transaction' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(35,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(36,14): error TS18048: 'contracts.Registry' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(39,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(40,14): error TS18048: 'contracts.BaseRegistrar' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(43,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(44,14): error TS18048: 'contracts.EARegistrarController' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(47,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(48,14): error TS18048: 'contracts.RegistrarController' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(51,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/basenames/basenames.plugin.ts(52,14): error TS18048: 'contracts.Resolver' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(34,13): error TS2345: Argument of type '"basenames/BaseRegistrar:NameRegisteredWithRecord"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(37,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(37,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(37,85): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(41,13): error TS2345: Argument of type '"basenames/BaseRegistrar:NameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(44,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(44,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(44,85): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(48,13): error TS2345: Argument of type '"basenames/BaseRegistrar:NameRenewed"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(51,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(51,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(51,85): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(55,13): error TS2345: Argument of type '"basenames/BaseRegistrar:Transfer"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(58,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(58,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(58,85): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(62,13): error TS2345: Argument of type '"basenames/EARegistrarController:NameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(65,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(65,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(69,13): error TS2345: Argument of type '"basenames/RegistrarController:NameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(72,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(72,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(76,13): error TS2345: Argument of type '"basenames/RegistrarController:NameRenewed"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(79,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registrar.ts(79,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registry.ts(16,13): error TS2345: Argument of type '"basenames/Registry:NewOwner"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registry.ts(17,13): error TS2345: Argument of type '"basenames/Registry:NewResolver"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registry.ts(18,13): error TS2345: Argument of type '"basenames/Registry:NewTTL"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/basenames/handlers/Registry.ts(19,13): error TS2345: Argument of type '"basenames/Registry:Transfer"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/NameWrapper.ts(20,13): error TS2345: Argument of type '"lineanames/NameWrapper:NameWrapped"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/NameWrapper.ts(21,13): error TS2345: Argument of type '"lineanames/NameWrapper:NameUnwrapped"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/NameWrapper.ts(22,13): error TS2345: Argument of type '"lineanames/NameWrapper:FusesSet"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/NameWrapper.ts(23,13): error TS2345: Argument of type '"lineanames/NameWrapper:ExpiryExtended"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/NameWrapper.ts(24,13): error TS2345: Argument of type '"lineanames/NameWrapper:TransferSingle"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/NameWrapper.ts(25,13): error TS2345: Argument of type '"lineanames/NameWrapper:TransferBatch"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(33,13): error TS2345: Argument of type '"lineanames/BaseRegistrar:NameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(36,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(36,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(36,85): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(40,13): error TS2345: Argument of type '"lineanames/BaseRegistrar:NameRenewed"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(43,16): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(43,43): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(43,85): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(47,13): error TS2345: Argument of type '"lineanames/BaseRegistrar:Transfer"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(51,9): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(52,26): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(52,68): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(57,13): error TS2345: Argument of type '"lineanames/EthRegistrarController:OwnerNameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(61,9): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(63,20): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(71,13): error TS2345: Argument of type '"lineanames/EthRegistrarController:PohNameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(75,9): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(77,20): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(85,13): error TS2345: Argument of type '"lineanames/EthRegistrarController:NameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(89,9): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(91,20): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(93,23): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(93,45): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registrar.ts(99,13): error TS2345: Argument of type '"lineanames/EthRegistrarController:NameRenewed"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registry.ts(16,13): error TS2345: Argument of type '"lineanames/Registry:NewOwner"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registry.ts(17,13): error TS2345: Argument of type '"lineanames/Registry:NewResolver"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registry.ts(18,13): error TS2345: Argument of type '"lineanames/Registry:NewTTL"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/handlers/Registry.ts(19,13): error TS2345: Argument of type '"lineanames/Registry:Transfer"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(36,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(37,14): error TS18048: 'contracts.Registry' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(40,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(41,14): error TS18048: 'contracts.BaseRegistrar' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(44,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(45,14): error TS18048: 'contracts.EthRegistrarController' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(48,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(49,14): error TS18048: 'contracts.NameWrapper' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(52,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/lineanames/lineanames.plugin.ts(53,14): error TS18048: 'contracts.Resolver' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(32,13): error TS2345: Argument of type '"Resolver:AddrChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(33,13): error TS2345: Argument of type '"Resolver:AddressChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(34,13): error TS2345: Argument of type '"Resolver:NameChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(35,13): error TS2345: Argument of type '"Resolver:ABIChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(36,13): error TS2345: Argument of type '"Resolver:PubkeyChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(38,5): error TS2345: Argument of type '"Resolver:TextChanged(bytes32 indexed node, string indexed indexedKey, string key)"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(42,5): error TS2345: Argument of type '"Resolver:TextChanged(bytes32 indexed node, string indexed indexedKey, string key, string value)"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(45,13): error TS2345: Argument of type '"Resolver:ContenthashChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(46,13): error TS2345: Argument of type '"Resolver:InterfaceChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(47,13): error TS2345: Argument of type '"Resolver:AuthorisationChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(48,13): error TS2345: Argument of type '"Resolver:VersionChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(52,5): error TS2345: Argument of type '"Resolver:DNSRecordChanged(bytes32 indexed node, bytes name, uint16 resource, bytes record)"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(59,5): error TS2345: Argument of type '"Resolver:DNSRecordChanged(bytes32 indexed node, bytes name, uint16 resource, uint32 ttl, bytes record)"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(62,13): error TS2345: Argument of type '"Resolver:DNSRecordDeleted"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(63,13): error TS2345: Argument of type '"Resolver:DNSZonehashChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/shared/Resolver.ts(64,13): error TS2345: Argument of type '"Resolver:ZoneCreated"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/NameWrapper.ts(20,13): error TS2345: Argument of type '"subgraph/NameWrapper:NameWrapped"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/NameWrapper.ts(21,13): error TS2345: Argument of type '"subgraph/NameWrapper:NameUnwrapped"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/NameWrapper.ts(22,13): error TS2345: Argument of type '"subgraph/NameWrapper:FusesSet"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/NameWrapper.ts(23,13): error TS2345: Argument of type '"subgraph/NameWrapper:ExpiryExtended"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/NameWrapper.ts(24,13): error TS2345: Argument of type '"subgraph/NameWrapper:TransferSingle"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/NameWrapper.ts(25,13): error TS2345: Argument of type '"subgraph/NameWrapper:TransferBatch"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(32,13): error TS2345: Argument of type '"subgraph/BaseRegistrar:NameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(36,9): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(38,20): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(39,47): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(45,13): error TS2345: Argument of type '"subgraph/BaseRegistrar:NameRenewed"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(49,9): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(51,20): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(52,47): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(58,13): error TS2345: Argument of type '"subgraph/BaseRegistrar:Transfer"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(59,41): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(63,9): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(73,13): error TS2345: Argument of type '"subgraph/EthRegistrarControllerOld:NameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(78,13): error TS2345: Argument of type '"subgraph/EthRegistrarControllerOld:NameRenewed"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(83,13): error TS2345: Argument of type '"subgraph/EthRegistrarController:NameRegistered"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(87,9): error TS2698: Spread types may only be created from object types.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(89,20): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(91,23): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(91,45): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registrar.ts(97,13): error TS2345: Argument of type '"subgraph/EthRegistrarController:NameRenewed"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(33,13): error TS2345: Argument of type '"subgraph/RegistryOld:NewOwner"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(34,58): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(43,13): error TS2345: Argument of type '"subgraph/RegistryOld:NewResolver"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(44,82): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(45,30): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(55,13): error TS2345: Argument of type '"subgraph/RegistryOld:NewTTL"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(56,82): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(62,13): error TS2345: Argument of type '"subgraph/RegistryOld:Transfer"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(69,82): error TS2339: Property 'args' does not exist on type 'never'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(75,13): error TS2345: Argument of type '"subgraph/Registry:NewOwner"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(76,13): error TS2345: Argument of type '"subgraph/Registry:NewResolver"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(77,13): error TS2345: Argument of type '"subgraph/Registry:NewTTL"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/handlers/Registry.ts(78,13): error TS2345: Argument of type '"subgraph/Registry:Transfer"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(36,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(37,14): error TS18048: 'contracts.Registry' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(40,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(41,14): error TS18048: 'contracts.Registry' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(44,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(45,14): error TS18048: 'contracts.BaseRegistrar' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(48,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(49,14): error TS18048: 'contracts.EthRegistrarControllerOld' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(52,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(53,14): error TS18048: 'contracts.EthRegistrarController' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(56,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(57,14): error TS18048: 'contracts.NameWrapper' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(60,50): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/subgraph/subgraph.plugin.ts(61,14): error TS18048: 'contracts.Resolver' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(36,13): error TS2345: Argument of type '"threedns/ThreeDNSToken:NewOwner"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(37,13): error TS2345: Argument of type '"threedns/ThreeDNSToken:Transfer"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(38,13): error TS2345: Argument of type '"threedns/ThreeDNSToken:RegistrationCreated"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(39,13): error TS2345: Argument of type '"threedns/ThreeDNSToken:RegistrationExtended"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(45,13): error TS2345: Argument of type '"threedns/Resolver:AddrChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(46,13): error TS2345: Argument of type '"threedns/Resolver:AddressChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(47,13): error TS2345: Argument of type '"threedns/Resolver:NameChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(48,13): error TS2345: Argument of type '"threedns/Resolver:ABIChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(49,13): error TS2345: Argument of type '"threedns/Resolver:PubkeyChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(51,5): error TS2345: Argument of type '"threedns/Resolver:TextChanged(bytes32 indexed node, string indexed indexedKey, string key)"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(55,5): error TS2345: Argument of type '"threedns/Resolver:TextChanged(bytes32 indexed node, string indexed indexedKey, string key, string value)"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(60,13): error TS2345: Argument of type '"threedns/Resolver:ContenthashChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(61,13): error TS2345: Argument of type '"threedns/Resolver:InterfaceChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(62,13): error TS2345: Argument of type '"threedns/Resolver:AuthorisationChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(63,13): error TS2345: Argument of type '"threedns/Resolver:VersionChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(68,5): error TS2345: Argument of type '"threedns/Resolver:DNSRecordChanged(bytes32 indexed node, bytes name, uint16 resource, uint32 ttl, bytes record)"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(73,13): error TS2345: Argument of type '"threedns/Resolver:DNSRecordDeleted"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(74,13): error TS2345: Argument of type '"threedns/Resolver:DNSZonehashChanged"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/handlers/ThreeDNSToken.ts(75,13): error TS2345: Argument of type '"threedns/Resolver:ZoneCreated"' is not assignable to parameter of type 'EventNames<MergedPonderConfig>'.
apps/ensindexer typecheck: src/plugins/threedns/threedns.plugin.ts(41,49): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/threedns/threedns.plugin.ts(42,45): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/threedns/threedns.plugin.ts(44,14): error TS18048: 'optimismContracts.ThreeDNSToken' is possibly 'undefined'.
apps/ensindexer typecheck: src/plugins/threedns/threedns.plugin.ts(48,49): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/threedns/threedns.plugin.ts(49,45): error TS2345: Argument of type 'ContractConfig | undefined' is not assignable to parameter of type 'ContractConfig'.
apps/ensindexer typecheck: Type 'undefined' is not assignable to type 'ContractConfig'.
apps/ensindexer typecheck: src/plugins/threedns/threedns.plugin.ts(51,14): error TS18048: 'optimismContracts.Resolver' is possibly 'undefined'.
apps/ensindexer typecheck: Failed
/Users/tko/dev/github/namehash/ensnode/apps/ensindexer:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL [email protected] typecheck: `tsc --noEmit`
Exit status 2
ELIFECYCLE Command failed with exit code 2.
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 think we have to stick to passing literal types around so we keen the value exported from ponder.config.ts derived from literal types and Ponder can properly infer types about indexing handlers.
|
BugBot run |
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.
Bug: Duplicate Chain IDs in Indexed Chain Retrieval
The getIndexedChainIds function in plugin-helpers.ts does not return unique chain IDs as stated in its documentation. Multiple datasources can be configured for the same chain, causing the function to return duplicate chain IDs. The function should use uniq() to deduplicate the results before returning, consistent with similar logic elsewhere in the codebase.
apps/ensindexer/src/lib/plugin-helpers.ts#L124-L133
ensnode/apps/ensindexer/src/lib/plugin-helpers.ts
Lines 124 to 133 in 282ff20
| /** | |
| * Get a list of unique indexed chain IDs for selected plugin names. | |
| */ | |
| export function getIndexedChainIds(pluginNames: PluginName[]): number[] { | |
| const datasources = getDatasources(pluginNames); | |
| const indexedChainIds = datasources.map((datasource) => datasource.chain.id); | |
| return indexedChainIds; | |
| } |
BugBot free trial expires on June 9, 2025
You have used $0.00 of your $5.00 spend limit so far. Manage your spend limit in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎
Co-authored-by: lightwalker.eth <[email protected]>
f92cf86 to
d13baf8
Compare

This PR includes refactorings around
ENSIndexerConfigthat allow dropping unnecessary imports and replace them with new derived configuration parameters:ensDeployment.The PR also moves the
requiredDatasourcesplugin configuration back to individual plugins and replace manual definitions (such asPLUGIN_REQUIRED_DATASOURCES) with plugin-driven ones.Suggested review order:
apps/ensindexer/ponder.config.ts: move all plugins list into its own file to avoid circular dependencies and enable creatinggetPlugin(pluginName: PluginName)helper function.apps/ensindexer/src/plugins/index.ts: it now includes the list of all plugins, and also helper functions working on that listapps/ensindexer/src/plugins/**/*: all plugins read theensDeploymentdirectly from theappConfigobject, and also definerequiredDatasourcesdirectly. What also changed is that staticconfiggetter was replaced with a config factory in order to break circular dependencies between plugin definitions and@/config.apps/ensindexer/src/lib/lib-config.ts:ensDeploymentincludes some ABIs, which I figured will be best not to be shown due to their length.apps/ensindexer/src/lib/plugin-helpers.ts: include new getters for datasources and indexed chain IDsapps/ensindexer/src/config/types.ts: includingensDeploymentconfig paramapps/ensindexer/src/config/validations.ts: usegetPluginshelper to get information about a given plugin. Also, make validation input types more precise.apps/ensindexer/src/config/config.schema.ts: moved all derive functionality into its own fileapps/ensindexer/src/config/derived-params.ts: derive functionality forisSubgraphCompatible(moved), andensDeployment(newly added)Resolves: