@ensnode/ensnode-schema 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ponder.schema.js +509 -136
- package/dist/ponder.schema.js.map +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/schemas/protocol-acceleration.schema.ts","../src/schemas/registrars.schema.ts","../src/schemas/subgraph.schema.ts","../src/lib/collate.ts","../src/schemas/tokenscope.schema.ts"],"sourcesContent":["/**\n * Schema Definitions that power Protocol Acceleration in the Resolution API.\n */\n\nimport { onchainTable, primaryKey, relations } from \"ponder\";\n\n/**\n * Tracks an Account's ENSIP-19 Reverse Name Records by CoinType.\n *\n * NOTE: this is NOT a cohesive, materialized index of ALL of an account's Primary Names, it is ONLY\n * an index of its ENSIP-19 Reverse Name _Records_ stored by a StandaloneReverseRegistrar:\n * - default.reverse\n * - [coinType].reverse\n * - NOT *.addr.reverse\n *\n * So these records CANNOT be queried directly and used as a source of truth — you MUST perform\n * Forward Resolution to resolve a consistent set of an Account's ENSIP-19 Primary Names. These records\n * are used to power Protocol Acceleration for those ReverseResolvers backed by a StandloneReverseRegistrar.\n */\nexport const reverseNameRecord = onchainTable(\n \"reverse_name_records\",\n (t) => ({\n // keyed by (address, coinType)\n address: t.hex().notNull(),\n coinType: t.bigint().notNull(),\n\n /**\n * Represents the ENSIP-19 Reverse Name Record for a given (address, coinType).\n *\n * The value of this field is guaranteed to be a non-empty-string normalized ENS name (see\n * `interpretNameRecordValue` for additional context and specific guarantees). Unnormalized\n * names and empty string values are interpreted as a deletion of the associated Reverse Name\n * Record entity (represented in the schema as the _absence_ of a relevant Reverse Name Record\n * entity).\n */\n value: t.text().notNull(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.address, t.coinType] }),\n }),\n);\n\n/**\n * Tracks Node-Resolver relationships to accelerate the identification of a node's active resolver\n * in a specific (shadow)Registry.\n *\n * Note that this model supports the indexing of Node-Resolver relationships across any Registry on\n * on any chain, in particular to support the acceleration of ForwardResolution#findResolver for the\n * ENS Root Chain's Registry which can have any number of (shadow)Registries (like Basenames' and\n * Lineanames') on any chain.\n *\n * It is keyed by (chainId, registry, node) to match the on-chain datamodel of Registry/(shadow)Registry\n * Node-Resolver relationships.\n */\nexport const nodeResolverRelation = onchainTable(\n \"node_resolver_relations\",\n (t) => ({\n // keyed by (chainId, registry, node)\n chainId: t.integer().notNull(),\n registry: t.hex().notNull(),\n node: t.hex().notNull(),\n\n /**\n * The Address of the Resolver contract this `node` has set (via Registry#NewResolver) within\n * the Registry on `chainId`.\n */\n resolver: t.hex().notNull(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.chainId, t.registry, t.node] }),\n }),\n);\n\n/**\n * Tracks a set of records for a specified `node` within a `resolver` contract on `chainId`.\n *\n * ResolverRecords is keyed by (chainId, resolver, node) and:\n * - has one `name` record (see ENSIP-3)\n * - has many `addressRecords` (unique by coinType) (see ENSIP-9)\n * - has many `textRecords` (unique by key) (see ENSIP-5)\n *\n * It is keyed by (chainId, resolver, node) to match the on-chain datamodel of Resolver contract storage.\n *\n * WARNING: These record values do NOT allow the caller to confidently resolve records for names\n * without following Forward Resolution according to the ENS protocol: a direct query to the database\n * for a record's value is not ENSIP-10 nor CCIP-Read compliant.\n */\nexport const resolverRecords = onchainTable(\n \"resolver_records\",\n (t) => ({\n // keyed by (chainId, resolver, node)\n chainId: t.integer().notNull(),\n resolver: t.hex().notNull(),\n node: t.hex().notNull(),\n\n /**\n * Represents the value of the reverse-resolution (ENSIP-3) name() record, used for Reverse Resolution.\n *\n * The emitted record values are interpreted according to `interpretNameRecordValue` — unnormalized\n * names and empty string values are interpreted as a deletion of the associated record (represented\n * here as `null`).\n *\n * If set, the value of this field is guaranteed to be a non-empty-string normalized ENS name\n * (see `interpretNameRecordValue` for additional context and specific guarantees).\n */\n name: t.text(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.chainId, t.resolver, t.node] }),\n }),\n);\n\nexport const resolverRecords_relations = relations(resolverRecords, ({ many }) => ({\n // resolverRecord has many address records\n addressRecords: many(resolverAddressRecord),\n\n // resolverRecord has many text records\n textRecords: many(resolverTextRecord),\n}));\n\n/**\n * Tracks address records for a `node` by `coinType` within a `resolver` on `chainId`.\n *\n * ResolverAddressRecord is keyed by (chainId, resolver, node, coinType), where the composite key\n * segment (chainId, resolver, node) describes a ResolverRecord entity. A ResolverAddressRecord is\n * then additionally keyed by (coinType).\n */\nexport const resolverAddressRecord = onchainTable(\n \"resolver_address_records\",\n (t) => ({\n // keyed by ((chainId, resolver, node), coinType)\n chainId: t.integer().notNull(),\n resolver: t.hex().notNull(),\n node: t.hex().notNull(),\n coinType: t.bigint().notNull(),\n\n /**\n * Represents the value of the Addresss Record specified by ((chainId, resolver, node), coinType).\n *\n * The value of this field is interpreted by `interpretAddressRecordValue` — see its implementation\n * for additional context and specific guarantees.\n */\n address: t.text().notNull(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.chainId, t.resolver, t.node, t.coinType] }),\n }),\n);\n\nexport const resolverAddressRecordRelations = relations(resolverAddressRecord, ({ one }) => ({\n // belongs to resolverRecord\n resolver: one(resolverRecords, {\n fields: [\n resolverAddressRecord.chainId,\n resolverAddressRecord.resolver,\n resolverAddressRecord.node,\n ],\n references: [resolverRecords.chainId, resolverRecords.resolver, resolverRecords.node],\n }),\n}));\n\n/**\n * Tracks text records for a `node` by `key` within a `resolver` on `chainId`.\n *\n * ResolverTextRecord is keyed by (chainId, resolver, node, key), where the composite key\n * segment (chainId, resolver, node) describes a ResolverRecord entity. A ResolverTextRecord is\n * then additionally keyed by (key).\n */\nexport const resolverTextRecord = onchainTable(\n \"resolver_trecords\",\n (t) => ({\n // keyed by ((chainId, resolver, node), key)\n chainId: t.integer().notNull(),\n resolver: t.hex().notNull(),\n node: t.hex().notNull(),\n key: t.text().notNull(),\n\n /**\n * Represents the value of the Text Record specified by ((chainId, resolver, node), key).\n *\n * The value of this field is interpreted by `interpretTextRecordValue` — see its implementation\n * for additional context and specific guarantees.\n */\n value: t.text().notNull(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.chainId, t.resolver, t.node, t.key] }),\n }),\n);\n\nexport const resolverTextRecordRelations = relations(resolverTextRecord, ({ one }) => ({\n // belongs to resolverRecord\n resolver: one(resolverRecords, {\n fields: [resolverTextRecord.chainId, resolverTextRecord.resolver, resolverTextRecord.node],\n references: [resolverRecords.chainId, resolverRecords.resolver, resolverRecords.node],\n }),\n}));\n\n/**\n * Tracks the migration status of a node.\n *\n * Due to a security issue, ENS migrated from the RegistryOld contract to a new Registry\n * contract. When indexing events, the indexer must ignore any events on the RegistryOld for domains\n * that have since been migrated to the new Registry.\n *\n * To store the necessary information required to implement this behavior, we track the set of nodes\n * that have been registered in the (new) Registry contract on the ENS Root Chain. When an event is\n * encountered on the RegistryOld contract, if the relevant node exists in this set, the event should\n * be ignored, as the node is considered migrated.\n *\n * Note that this logic is only necessary for the ENS Root Chain, the only chain that includes the\n * Registry migration: we do not track nodes in the the Basenames and Lineanames deployments of the\n * Registry on their respective chains, for example.\n *\n * Note also that this Registry migration tracking is isolated to the Protocol Acceleration schema/plugin.\n * That is, the subgraph core plugin implements its own Registry migration logic, and the future\n * ensv2 core plugin will likely do the same. By isolating this logic to the Protocol Acceleration\n * plugin, we allow the Protocol acceleration plugin to be run independently of a core plugin\n * (and could be run _without_ a core plugin, for example).\n */\nexport const migratedNode = onchainTable(\"migrated_nodes\", (t) => ({\n node: t.hex().primaryKey(),\n}));\n","/**\n * Schema Definitions for tracking of ENS registrars.\n */\n\nimport { index, onchainEnum, onchainTable, relations, uniqueIndex } from \"ponder\";\n\n/**\n * Subregistries\n *\n * @see https://ensnode.io/docs/reference/terminology/#subregistry\n */\nexport const subregistries = onchainTable(\n \"subregistries\",\n (t) => ({\n /**\n * Subregistry ID\n *\n * Identifies the chainId and address of the smart contract associated\n * with the subregistry.\n *\n * Guaranteed to be a fully lowercase string formatted according to\n * the CAIP-10 standard.\n *\n * @see https://chainagnostic.org/CAIPs/caip-10\n */\n subregistryId: t.text().primaryKey(),\n\n /**\n * The node (namehash) of the name the subregistry manages subnames of.\n * Example subregistry managed names:\n * - `eth`\n * - `base.eth`\n * - `linea.eth`\n *\n * Guaranteed to be a fully lowercase hex string representation of 32-bytes.\n */\n node: t.hex().notNull(),\n }),\n (t) => ({\n uniqueNode: uniqueIndex().on(t.node),\n }),\n);\n\n/**\n * Registration Lifecycles\n *\n * A \"registration lifecycle\" represents a single cycle of a name being\n * registered once followed by renewals (expiry date extensions) any number of\n * times.\n *\n * Note that this data model only tracks the *most recently created*\n * \"registration lifecycle\" record for a name and doesn't track\n * *all* \"registration lifecycle\" records for a name across time.\n * Therefore, if a name goes through multiple cycles of:\n * (registration -> expiry -> release) ->\n * (registration -> expiry -> release) -> etc..\n * this data model only stores data of the most recently created\n * \"registration lifecycle\".\n *\n * For now we make the following simplifying assumptions:\n * 1. That no two subregistries hold state for the same node.\n * 2. That the subregistry associated with the name X in the ENS root registry\n * exclusively holds state for subnames of X.\n *\n * These simplifying assumptions happen to be true for the scope of our\n * current indexing logic, but nothing in the ENS protocol fundamentally\n * forces this to always be true. Therefore this data model will need\n * refactoring in the future as our indexing logic expands to handle\n * more complex scenarios.\n */\nexport const registrationLifecycles = onchainTable(\n \"registration_lifecycles\",\n (t) => ({\n /**\n * The node (namehash) of the FQDN of the domain the registration lifecycle\n * is associated with.\n *\n * Guaranteed to be a subname of the node (namehash) of the subregistry\n * identified by `subregistryId`.\n *\n * Guaranteed to be a fully lowercase hex string representation of 32-bytes.\n */\n node: t.hex().primaryKey(),\n\n /**\n * Subregistry ID\n *\n * Identifies the chainId and address of the subregistry smart contract\n * that manages the registration lifecycle.\n *\n * Guaranteed to be a fully lowercase string formatted according to\n * the CAIP-10 standard.\n *\n * @see https://chainagnostic.org/CAIPs/caip-10\n */\n subregistryId: t.text().notNull(),\n\n /**\n * Expires at\n *\n * Unix timestamp when the Registration Lifecycle is scheduled to expire.\n */\n expiresAt: t.bigint().notNull(),\n }),\n (t) => ({\n bySubregistry: index().on(t.subregistryId),\n }),\n);\n\n/**\n * \"Logical registrar action type\" enum\n *\n * Types of \"logical registrar action\".\n */\nexport const registrarActionType = onchainEnum(\"registrar_action_type\", [\n \"registration\",\n \"renewal\",\n]);\n\n/**\n * \"Logical registrar actions\"\n *\n * This table models \"logical actions\" rather than \"events\" because a single\n * \"logical action\", such as a single registration or renewal, may emit\n * multiple onchain events from multiple contracts where each of those\n * individual events may only provide a subset of the data about the full\n * \"logical action\". Therefore, here we aggregate data about each\n * \"logical action\" that may be sourced from multiple onchain events from\n * multiple contracts.\n *\n * Each \"logical action\" in this table is associated with a single transaction.\n * However, it should be noted that a single transaction may perform any number\n * of \"logical actions\".\n *\n * For example, consider the \"logical registrar action\" of registering a direct\n * subname of .eth. This \"logical action\" spans interactions across multiple\n * contracts that emit multiple onchain events:\n *\n * 1. The \"EthBaseRegistrar\" contract emits a `NameRegistered` event enabling\n * the tracking of data including:\n * - `node`\n * - `incrementalDuration`\n * - `registrant`\n * 2. A \"RegistrarController\" contract emits its own `NameRegistered` event\n * enabling the tracking of data that may include:\n * - `baseCost`\n * - `premium`\n * - `total`\n * - `encodedReferrer`\n *\n * Here we aggregate the state from both of these events into a single\n * \"logical registrar action\".\n */\nexport const registrarActions = onchainTable(\n \"registrar_actions\",\n (t) => ({\n /**\n * \"Logical registrar action\" ID\n *\n * The `id` value is a deterministic and globally unique identifier for\n * the \"logical registrar action\".\n *\n * The `id` value represents the *initial* onchain event associated with\n * the \"logical registrar action\", but the full state of\n * the \"logical registrar action\" is an aggregate across each of\n * the onchain events referenced in the `eventIds` field.\n *\n * Guaranteed to be the very first element in `eventIds` array.\n */\n id: t.text().primaryKey(),\n\n /**\n * The type of the \"logical registrar action\".\n */\n type: registrarActionType().notNull(),\n\n /**\n * Subregistry ID\n *\n * The ID of the subregistry the \"logical registrar action\" was taken on.\n *\n * Identifies the chainId and address of the associated subregistry smart\n * contract.\n *\n * Guaranteed to be a fully lowercase string formatted according to\n * the CAIP-10 standard.\n *\n * @see https://chainagnostic.org/CAIPs/caip-10\n */\n subregistryId: t.text().notNull(),\n\n /**\n * The node (namehash) of the FQDN of the domain associated with\n * the \"logical registrar action\".\n *\n * Guaranteed to be a fully lowercase hex string representation of 32-bytes.\n */\n node: t.hex().notNull(),\n\n /**\n * Incremental Duration\n *\n * If `type` is \"registration\":\n * - Represents the duration between `blockTimestamp` and\n * the initial `expiresAt` value that the associated\n * \"registration lifecycle\" will be initialized with.\n * If `type` is \"renewal\":\n * - Represents the incremental increase in duration made to\n * the `expiresAt` value in the associated \"registration lifecycle\".\n *\n * A \"registration lifecycle\" may be extended via renewal even after it\n * expires if it is still within its grace period.\n *\n * Consider the following scenario:\n *\n * The \"registration lifecycle\" of a direct subname of .eth is scheduled to\n * expire on Jan 1, midnight UTC. It is currently 30 days after this\n * expiration time. Therefore, there are currently another 60 days of grace\n * period remaining for this name. Anyone can still make a renewal to\n * extend the \"registration lifecycle\" of this name.\n *\n * Given this scenario, consider the following examples:\n *\n * 1. If a renewal is made with 10 days incremental duration,\n * the \"registration lifecycle\" for this name will remain in\n * an \"expired\" state, but it will now have another 70 days of\n * grace period remaining.\n *\n * 2. If a renewal is made with 50 days incremental duration,\n * the \"registration lifecycle\" for this name will no longer be\n * \"expired\" and will become \"active\", but the \"registration lifecycle\"\n * will now be scheduled to expire again in 20 days.\n *\n * After the \"registration lifecycle\" for a name becomes expired by more\n * than its grace period, it can no longer be renewed by anyone and is\n * considered \"released\". The name must first be registered again, starting\n * a new \"registration lifecycle\" of\n * active / expired / grace period / released.\n *\n * May be 0.\n *\n * Guaranteed to be a non-negative bigint value.\n */\n incrementalDuration: t.bigint().notNull(),\n\n /**\n * Base cost\n *\n * Base cost (before any `premium`) of Ether measured in units of Wei\n * paid to execute the \"logical registrar action\".\n *\n * May be 0.\n *\n * Guaranteed to be:\n * 1) null if and only if `total` is null.\n * 2) Otherwise, a non-negative bigint value.\n */\n baseCost: t.bigint(),\n\n /**\n * Premium\n *\n * \"premium\" cost (in excesses of the `baseCost`) of Ether measured in\n * units of Wei paid to execute the \"logical registrar action\".\n *\n * May be 0.\n *\n * Guaranteed to be:\n * 1) null if and only if `total` is null.\n * 2) Otherwise, zero when `type` is `renewal`.\n * 3) Otherwise, a non-negative bigint value.\n */\n premium: t.bigint(),\n\n /**\n * Total\n *\n * Total cost of Ether measured in units of Wei paid to execute\n * the \"logical registrar action\".\n *\n * May be 0.\n *\n * Guaranteed to be:\n * 1) null if and only if both `baseCost` and `premium` are null.\n * 2) Otherwise, a non-negative bigint value, equal to the sum of\n * `baseCost` and `premium`.\n */\n total: t.bigint(),\n\n /**\n * Registrant\n *\n * Identifies the address that initiated the \"logical registrar action\" and\n * is paying the `total` cost (if applicable).\n *\n * It may not be the owner of the name:\n * 1. When a name is registered, the initial owner of the name may be\n * distinct from the registrant.\n * 2. There are no restrictions on who may renew a name.\n * Therefore the owner of the name may be distinct from the registrant.\n *\n *\n * The \"chainId\" of this address is the same as is referenced in `subregistryId`.\n *\n * Guaranteed to be a fully lowercase address\n */\n registrant: t.hex().notNull(),\n\n /**\n * Encoded Referrer\n *\n * Represents the \"raw\" 32-byte \"referrer\" value emitted onchain in\n * association with the registrar action.\n *\n * Guaranteed to be:\n * 1) null if the emitted `eventIds` contain no information about a referrer.\n * 2) Otherwise, a fully lowercase hex string representation of 32-bytes.\n */\n encodedReferrer: t.hex(),\n\n /**\n * Decoded referrer\n *\n * Decoded referrer according to the subjective interpretation of\n * `encodedReferrer` defined for ENS Holiday Awards.\n *\n * Identifies the interpreted address of the referrer.\n * The \"chainId\" of this address is the same as is referenced in\n * `subregistryId`.\n *\n * Guaranteed to be:\n * 1) null if `encodedReferrer` is null.\n * 2) Otherwise, a fully lowercase address.\n * 3) May be the \"zero address\" to represent that an `encodedReferrer` is\n * defined but that it is interpreted as no referrer.\n */\n decodedReferrer: t.hex(),\n\n /**\n * Number of the block that includes the \"logical registrar action\".\n *\n * The \"chainId\" of this block is the same as is referenced in\n * `subregistryId`.\n *\n * Guaranteed to be a non-negative bigint value.\n */\n blockNumber: t.bigint().notNull(),\n\n /**\n * Unix timestamp of the block referenced by `blockNumber` that includes\n * the \"logical registrar action\".\n */\n timestamp: t.bigint().notNull(),\n\n /**\n * Transaction hash of the transaction associated with\n * the \"logical registrar action\".\n *\n * The \"chainId\" of this transaction is the same as is referenced in\n * `subregistryId`.\n *\n * Note that a single transaction may be associated with any number of\n * \"logical registrar actions\".\n *\n * Guaranteed to be a fully lowercase hex string representation of 32-bytes.\n */\n transactionHash: t.hex().notNull(),\n\n /**\n * Event IDs\n *\n * Array of the eventIds that have contributed to the state of\n * the \"logical registrar action\" record.\n *\n * Each eventId is a deterministic and globally unique onchain event\n * identifier.\n *\n * Guarantees:\n * - Each eventId is of events that occurred within the block\n * referenced by `blockNumber`.\n * - At least 1 eventId.\n * - Ordered chronologically (ascending) by logIndex within `blockNumber`.\n * - The first element in the array is equal to the `id` of\n * the overall \"logical registrar action\" record.\n *\n * The following ideas are not generalized for ENS overall but happen to\n * be a characteristic of the scope of our current indexing logic:\n * 1. These id's always reference events emitted by\n * a related \"BaseRegistrar\" contract.\n * 2. These id's optionally reference events emitted by\n * a related \"Registrar Controller\" contract. This is because our\n * current indexing logic doesn't guarantee to index\n * all \"Registrar Controller\" contracts.\n */\n eventIds: t.text().array().notNull(),\n }),\n (t) => ({\n byDecodedReferrer: index().on(t.decodedReferrer),\n byTimestamp: index().on(t.timestamp),\n }),\n);\n\n/**\n * Logical Registrar Action Metadata\n *\n * NOTE: This table is an internal implementation detail of ENSIndexer and\n * should not be queried outside of ENSIndexer.\n *\n * Building a \"logical registrar action\" record may require data from\n * multiple onchain events. To help aggregate data from multiple events into\n * a single \"logical registrar action\" ENSIndexer may temporarily store data\n * here to achieve this data aggregation.\n *\n * Note how multiple \"logical registrar actions\" may be taken on\n * the same `node` in the same `transactionHash`. For example, consider\n * a case of a single transaction registering a name and subsequently renewing\n * it twice. While this may be silly it is technically possible and therefore\n * such cases must be considered. To support such cases, when\n * the last event handler for a \"logical registrar action\" has completed its\n * processing the record referenced by the `logicalEventKey` must be removed.\n */\nexport const internal_registrarActionMetadata = onchainTable(\n \"_ensindexer_registrar_action_metadata\",\n (t) => ({\n /**\n * Logical Event Key\n *\n * A fully lowercase string formatted as:\n * `{chainId}:{subregistryAddress}:{node}:{transactionHash}`\n */\n logicalEventKey: t.text().primaryKey(),\n\n /**\n * Logical Event ID\n *\n * A string holding the `id` value of the existing \"logical registrar action\"\n * record that is currently being built as an aggregation of onchain events.\n *\n * May be used by subsequent event handlers to identify which\n * \"logical registrar action\" to aggregate additional indexed state into.\n */\n logicalEventId: t.text().notNull(),\n }),\n);\n\n/// Relations\n\n/**\n * Subregistry Relations\n *\n * Each Subregistry is related to:\n * - 0 or more RegistrationLifecycles\n */\nexport const subregistryRelations = relations(subregistries, ({ many }) => ({\n registrationLifecycle: many(registrationLifecycles),\n}));\n\n/**\n * Registration Lifecycle Relations\n *\n * Each Registration Lifecycle is related to:\n * - exactly one Subregistry\n * - 0 or more \"logical registrar action\"\n */\nexport const registrationLifecycleRelations = relations(\n registrationLifecycles,\n ({ one, many }) => ({\n subregistry: one(subregistries, {\n fields: [registrationLifecycles.subregistryId],\n references: [subregistries.subregistryId],\n }),\n\n registrarAction: many(registrarActions),\n }),\n);\n\n/**\n * \"Logical registrar action\" Relations\n *\n * Each \"logical registrar action\" is related to:\n * - exactly one Registration Lifecycle (note the docs on\n * Registration Lifecycle explaining how these records may\n * be recycled across time).\n */\nexport const registrarActionRelations = relations(registrarActions, ({ one }) => ({\n registrationLifecycle: one(registrationLifecycles, {\n fields: [registrarActions.node],\n references: [registrationLifecycles.node],\n }),\n}));\n","import { index, onchainTable, relations } from \"ponder\";\nimport type { Address } from \"viem\";\n\nimport { monkeypatchCollate } from \"../lib/collate\";\n\n/**\n * This file specifies an Legacy-ENS-Subgraph-Compatible Ponder Schema.\n *\n * When the subgraph_prefix is stripped and the resulting schema is paired with @ensnode/ponder-subgraph,\n * the resulting GraphQL API is fully compatible with the legacy ENS Subgraph.\n */\n\n/**\n * Domain\n */\n\nexport const subgraph_domain = onchainTable(\n \"subgraph_domains\",\n (t) => ({\n // The namehash of the name\n id: t.hex().primaryKey(),\n\n /**\n * The ENS Name that this Domain represents.\n *\n * If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:\n * a) null (in the case of the root node), or\n * b) a Subgraph Interpreted Name.\n *\n * @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation\n *\n * Otherwise, this value is guaranteed to be an Interpreted Name, which is either:\n * a) a normalized Name, or\n * b) a Name entirely consisting of Interpreted Labels.\n *\n * Note that the type of the column will remain string | null, for legacy subgraph compatibility,\n * but in practice will never be null. The Root node's name will be '' (empty string).\n *\n * @see https://ensnode.io/docs/reference/terminology#interpreted-name\n */\n name: t.text(),\n\n /**\n * The Label associated with the Domain.\n *\n * If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:\n * a) null, in the case of the root Node or a name whose childmost label is subgraph-unindexable, or\n * b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).\n *\n * @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation\n *\n * Otherwise, this value is guaranteed to be an Interpreted Label which is either:\n * a) null, exclusively in the case of the root Node,\n * b) a normalized Label, or\n * c) an Encoded LabelHash, which encodes either\n * i. in the case of an Unknown Label, the LabelHash emitted onchain, or\n * ii. in the case of an Unnormalized Label, the LabelHash of the Literal Label value found onchain.\n *\n * @see https://ensnode.io/docs/reference/terminology#interpreted-label\n */\n labelName: t.text(),\n\n // keccak256(labelName)\n labelhash: t.hex(),\n // The namehash (id) of the parent name\n parentId: t.hex(),\n\n // The number of subdomains\n subdomainCount: t.integer().notNull().default(0),\n\n // Address logged from current resolver, if any\n resolvedAddressId: t.hex(),\n\n // The resolver that controls the domain's settings\n resolverId: t.text(),\n\n // The time-to-live (TTL) value of the domain's records\n ttl: t.bigint(),\n\n // Indicates whether the domain has been migrated to a new registrar\n isMigrated: t.boolean().notNull().default(false),\n // The time when the domain was created\n createdAt: t.bigint().notNull(),\n\n // The account that owns the domain\n ownerId: t.hex().notNull(),\n // The account that owns the ERC721 NFT for the domain\n registrantId: t.hex(),\n // The account that owns the wrapped domain\n wrappedOwnerId: t.hex(),\n\n // The expiry date for the domain, from either the registration, or the wrapped domain if PCC is burned\n expiryDate: t.bigint(),\n }),\n (t) => ({\n byLabelhash: index().on(t.labelhash),\n byParentId: index().on(t.parentId),\n byOwnerId: index().on(t.ownerId),\n byRegistrantId: index().on(t.registrantId),\n byWrappedOwnerId: index().on(t.wrappedOwnerId),\n }),\n);\n\n// monkeypatch drizzle's column (necessary to match graph-node default collation \"C\")\n// https://github.com/drizzle-team/drizzle-orm/issues/638\nmonkeypatchCollate(subgraph_domain.name, '\"C\"');\nmonkeypatchCollate(subgraph_domain.labelName, '\"C\"');\n\nexport const subgraph_domainRelations = relations(subgraph_domain, ({ one, many }) => ({\n resolvedAddress: one(subgraph_account, {\n fields: [subgraph_domain.resolvedAddressId],\n references: [subgraph_account.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_domain.ownerId],\n references: [subgraph_account.id],\n }),\n parent: one(subgraph_domain, {\n fields: [subgraph_domain.parentId],\n references: [subgraph_domain.id],\n }),\n resolver: one(subgraph_resolver, {\n fields: [subgraph_domain.resolverId],\n references: [subgraph_resolver.id],\n }),\n subdomains: many(subgraph_domain, { relationName: \"parent\" }),\n registrant: one(subgraph_account, {\n fields: [subgraph_domain.registrantId],\n references: [subgraph_account.id],\n }),\n wrappedOwner: one(subgraph_account, {\n fields: [subgraph_domain.wrappedOwnerId],\n references: [subgraph_account.id],\n }),\n wrappedDomain: one(subgraph_wrappedDomain, {\n fields: [subgraph_domain.id],\n references: [subgraph_wrappedDomain.domainId],\n }),\n registration: one(subgraph_registration, {\n fields: [subgraph_domain.id],\n references: [subgraph_registration.domainId],\n }),\n\n // event relations\n transfers: many(subgraph_transfer),\n newOwners: many(subgraph_newOwner),\n newResolvers: many(subgraph_newResolver),\n newTTLs: many(subgraph_newTTL),\n wrappedTransfers: many(subgraph_wrappedTransfer),\n nameWrappeds: many(subgraph_nameWrapped),\n nameUnwrappeds: many(subgraph_nameUnwrapped),\n fusesSets: many(subgraph_fusesSet),\n expiryExtendeds: many(subgraph_expiryExtended),\n}));\n\n/**\n * Account\n */\n\nexport const subgraph_account = onchainTable(\"subgraph_accounts\", (t) => ({\n id: t.hex().primaryKey(),\n}));\n\nexport const subgraph_accountRelations = relations(subgraph_account, ({ many }) => ({\n domains: many(subgraph_domain),\n wrappedDomains: many(subgraph_wrappedDomain),\n registrations: many(subgraph_registration),\n}));\n\n/**\n * Resolver\n */\n\nexport const subgraph_resolver = onchainTable(\n \"subgraph_resolvers\",\n (t) => ({\n // The unique identifier for this resolver, which is a concatenation of the domain namehash and the resolver address\n id: t.text().primaryKey(),\n // The domain that this resolver is associated with\n domainId: t.hex().notNull(),\n // The address of the resolver contract\n address: t.hex().notNull().$type<Address>(),\n\n // The current value of the 'addr' record for this resolver, as determined by the associated events\n addrId: t.hex(),\n // The content hash for this resolver, in binary format\n contentHash: t.text(),\n // The set of observed text record keys for this resolver\n // NOTE: we avoid .notNull.default([]) to match subgraph behavior\n texts: t.text().array(),\n // The set of observed SLIP-44 coin types for this resolver\n // NOTE: we avoid .notNull.default([]) to match subgraph behavior\n coinTypes: t.bigint().array(),\n }),\n (t) => ({\n byDomainId: index().on(t.domainId),\n }),\n);\n\nexport const subgraph_resolverRelations = relations(subgraph_resolver, ({ one, many }) => ({\n addr: one(subgraph_account, {\n fields: [subgraph_resolver.addrId],\n references: [subgraph_account.id],\n }),\n domain: one(subgraph_domain, {\n fields: [subgraph_resolver.domainId],\n references: [subgraph_domain.id],\n }),\n\n // event relations\n addrChangeds: many(subgraph_addrChanged),\n multicoinAddrChangeds: many(subgraph_multicoinAddrChanged),\n nameChangeds: many(subgraph_nameChanged),\n abiChangeds: many(subgraph_abiChanged),\n pubkeyChangeds: many(subgraph_pubkeyChanged),\n textChangeds: many(subgraph_textChanged),\n contenthashChangeds: many(subgraph_contenthashChanged),\n interfaceChangeds: many(subgraph_interfaceChanged),\n authorisationChangeds: many(subgraph_authorisationChanged),\n versionChangeds: many(subgraph_versionChanged),\n}));\n\n/**\n * Registration\n */\n\nexport const subgraph_registration = onchainTable(\n \"subgraph_registrations\",\n (t) => ({\n // The unique identifier of the registration\n id: t.hex().primaryKey(),\n // The domain name associated with the registration\n domainId: t.hex().notNull(),\n // The registration date of the domain\n registrationDate: t.bigint().notNull(),\n // The expiry date of the domain\n expiryDate: t.bigint().notNull(),\n // The cost associated with the domain registration\n cost: t.bigint(),\n // The account that registered the domain\n registrantId: t.hex().notNull(),\n /**\n * The Label associated with the domain registration.\n *\n * If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:\n * a) null, in the case of the root Node or a Domain whose label is subgraph-unindexable, or\n * b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).\n *\n * @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation\n *\n * Otherwise, this value is guaranteed to be an Interpreted Label which is either:\n * a) a normalized Label, or\n * b) in the case of an Unnormalized Label, an Encoded LabelHash of the Literal Label value found onchain.\n *\n * Note that the type of the column will remain string | null, for legacy subgraph compatibility.\n * In practice however, because there is no Registration entity for the root Node (the only Node\n * with a null labelName) this field will never be null.\n *\n * @see https://ensnode.io/docs/reference/terminology#interpreted-label\n */\n labelName: t.text(),\n }),\n (t) => ({\n byDomainId: index().on(t.domainId),\n byRegistrationDate: index().on(t.registrationDate),\n }),\n);\n\nexport const subgraph_registrationRelations = relations(subgraph_registration, ({ one, many }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_registration.domainId],\n references: [subgraph_domain.id],\n }),\n registrant: one(subgraph_account, {\n fields: [subgraph_registration.registrantId],\n references: [subgraph_account.id],\n }),\n\n // event relations\n nameRegistereds: many(subgraph_nameRegistered),\n nameReneweds: many(subgraph_nameRenewed),\n nameTransferreds: many(subgraph_nameTransferred),\n}));\n\n/**\n * Wrapped Domain\n */\n\nexport const subgraph_wrappedDomain = onchainTable(\n \"subgraph_wrapped_domains\",\n (t) => ({\n // The unique identifier for each instance of the WrappedDomain entity\n id: t.hex().primaryKey(),\n // The domain that is wrapped by this WrappedDomain\n domainId: t.hex().notNull(),\n // The expiry date of the wrapped domain\n expiryDate: t.bigint().notNull(),\n // The number of fuses remaining on the wrapped domain\n fuses: t.integer().notNull(),\n // The account that owns this WrappedDomain\n ownerId: t.hex().notNull(),\n /**\n * The Name that this WrappedDomain represents. Names are emitted by the NameWrapper contract as\n * DNS-Encoded Names which may be malformed, which will result in this field being `null`.\n *\n * If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:\n * a) null (in the case of a DNS-Encoded Name that is malformed or contains subgraph-unindexable labels), or\n * b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).\n *\n * @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation\n *\n * Otherwise, this value is guaranteed to be either:\n * a) null (in the case of a malformed DNS-Encoded Name),\n * b) an Interpreted Name.\n *\n * @see https://ensnode.io/docs/reference/terminology#interpreted-name\n */\n name: t.text(),\n }),\n (t) => ({\n byDomainId: index().on(t.domainId),\n }),\n);\n\nexport const subgraph_wrappedDomainRelations = relations(subgraph_wrappedDomain, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_wrappedDomain.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_wrappedDomain.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\n/**\n * Events\n */\n\nconst sharedEventColumns = (t: any) => ({\n id: t.text().primaryKey(),\n blockNumber: t.integer().notNull(),\n transactionID: t.hex().notNull(),\n});\n\nconst domainEvent = (t: any) => ({\n ...sharedEventColumns(t),\n domainId: t.hex().notNull(),\n});\n\nconst domainEventIndex = (t: any) => ({\n // primary reverse lookup\n idx: index().on(t.domainId),\n // sorting index\n idx_compound: index().on(t.domainId, t.id),\n});\n\n// Domain Event Entities\n\nexport const subgraph_transfer = onchainTable(\n \"subgraph_transfers\",\n (t) => ({\n ...domainEvent(t),\n ownerId: t.hex().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_newOwner = onchainTable(\n \"subgraph_new_owners\",\n (t) => ({\n ...domainEvent(t),\n ownerId: t.hex().notNull(),\n parentDomainId: t.hex().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_newResolver = onchainTable(\n \"subgraph_new_resolvers\",\n (t) => ({\n ...domainEvent(t),\n resolverId: t.text().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_newTTL = onchainTable(\n \"subgraph_new_ttls\",\n (t) => ({\n ...domainEvent(t),\n ttl: t.bigint().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_wrappedTransfer = onchainTable(\n \"subgraph_wrapped_transfers\",\n (t) => ({\n ...domainEvent(t),\n ownerId: t.hex().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_nameWrapped = onchainTable(\n \"subgraph_name_wrapped\",\n (t) => ({\n ...domainEvent(t),\n name: t.text(),\n fuses: t.integer().notNull(),\n ownerId: t.hex().notNull(),\n expiryDate: t.bigint().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_nameUnwrapped = onchainTable(\n \"subgraph_name_unwrapped\",\n (t) => ({\n ...domainEvent(t),\n ownerId: t.hex().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_fusesSet = onchainTable(\n \"subgraph_fuses_set\",\n (t) => ({\n ...domainEvent(t),\n fuses: t.integer().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_expiryExtended = onchainTable(\n \"subgraph_expiry_extended\",\n (t) => ({\n ...domainEvent(t),\n expiryDate: t.bigint().notNull(),\n }),\n domainEventIndex,\n);\n\n// Registration Event Entities\n\nconst registrationEvent = (t: any) => ({\n ...sharedEventColumns(t),\n registrationId: t.hex().notNull(),\n});\n\nconst registrationEventIndex = (t: any) => ({\n // primary reverse lookup\n idx: index().on(t.registrationId),\n // sorting index\n idx_compound: index().on(t.registrationId, t.id),\n});\n\nexport const subgraph_nameRegistered = onchainTable(\n \"subgraph_name_registered\",\n (t) => ({\n ...registrationEvent(t),\n registrantId: t.hex().notNull(),\n expiryDate: t.bigint().notNull(),\n }),\n registrationEventIndex,\n);\n\nexport const subgraph_nameRenewed = onchainTable(\n \"subgraph_name_renewed\",\n (t) => ({\n ...registrationEvent(t),\n expiryDate: t.bigint().notNull(),\n }),\n registrationEventIndex,\n);\n\nexport const subgraph_nameTransferred = onchainTable(\n \"subgraph_name_transferred\",\n (t) => ({\n ...registrationEvent(t),\n newOwnerId: t.hex().notNull(),\n }),\n registrationEventIndex,\n);\n\n// Resolver Event Entities\n\nconst resolverEvent = (t: any) => ({\n ...sharedEventColumns(t),\n resolverId: t.text().notNull(),\n});\n\nconst resolverEventIndex = (t: any) => ({\n // primary reverse lookup\n idx: index().on(t.resolverId),\n // sorting index\n idx_compound: index().on(t.resolverId, t.id),\n});\n\nexport const subgraph_addrChanged = onchainTable(\n \"subgraph_addr_changed\",\n (t) => ({\n ...resolverEvent(t),\n addrId: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_multicoinAddrChanged = onchainTable(\n \"subgraph_multicoin_addr_changed\",\n (t) => ({\n ...resolverEvent(t),\n coinType: t.bigint().notNull(),\n addr: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_nameChanged = onchainTable(\n \"subgraph_name_changed\",\n (t) => ({\n ...resolverEvent(t),\n name: t.text().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_abiChanged = onchainTable(\n \"subgraph_abi_changed\",\n (t) => ({\n ...resolverEvent(t),\n contentType: t.bigint().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_pubkeyChanged = onchainTable(\n \"subgraph_pubkey_changed\",\n (t) => ({\n ...resolverEvent(t),\n x: t.hex().notNull(),\n y: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_textChanged = onchainTable(\n \"subgraph_text_changed\",\n (t) => ({\n ...resolverEvent(t),\n key: t.text().notNull(),\n value: t.text(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_contenthashChanged = onchainTable(\n \"subgraph_contenthash_changed\",\n (t) => ({\n ...resolverEvent(t),\n hash: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_interfaceChanged = onchainTable(\n \"subgraph_interface_changed\",\n (t) => ({\n ...resolverEvent(t),\n interfaceID: t.hex().notNull(),\n implementer: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_authorisationChanged = onchainTable(\n \"subgraph_authorisation_changed\",\n (t) => ({\n ...resolverEvent(t),\n owner: t.hex().notNull(),\n target: t.hex().notNull(),\n isAuthorized: t.boolean().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_versionChanged = onchainTable(\n \"subgraph_version_changed\",\n (t) => ({\n ...resolverEvent(t),\n version: t.bigint().notNull(),\n }),\n resolverEventIndex,\n);\n\n/**\n * Event Relations\n */\n\n// Domain Event Relations\n\nexport const subgraph_transferRelations = relations(subgraph_transfer, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_transfer.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_transfer.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_newOwnerRelations = relations(subgraph_newOwner, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_newOwner.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_newOwner.ownerId],\n references: [subgraph_account.id],\n }),\n parentDomain: one(subgraph_domain, {\n fields: [subgraph_newOwner.parentDomainId],\n references: [subgraph_domain.id],\n }),\n}));\n\nexport const subgraph_newResolverRelations = relations(subgraph_newResolver, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_newResolver.domainId],\n references: [subgraph_domain.id],\n }),\n resolver: one(subgraph_resolver, {\n fields: [subgraph_newResolver.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_newTTLRelations = relations(subgraph_newTTL, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_newTTL.domainId],\n references: [subgraph_domain.id],\n }),\n}));\n\nexport const subgraph_wrappedTransferRelations = relations(subgraph_wrappedTransfer, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_wrappedTransfer.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_wrappedTransfer.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_nameWrappedRelations = relations(subgraph_nameWrapped, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_nameWrapped.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_nameWrapped.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_nameUnwrappedRelations = relations(subgraph_nameUnwrapped, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_nameUnwrapped.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_nameUnwrapped.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_fusesSetRelations = relations(subgraph_fusesSet, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_fusesSet.domainId],\n references: [subgraph_domain.id],\n }),\n}));\n\nexport const subgraph_expiryExtendedRelations = relations(subgraph_expiryExtended, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_expiryExtended.domainId],\n references: [subgraph_domain.id],\n }),\n}));\n\n// Registration Event Relations\n\nexport const subgraph_nameRegisteredRelations = relations(subgraph_nameRegistered, ({ one }) => ({\n registration: one(subgraph_registration, {\n fields: [subgraph_nameRegistered.registrationId],\n references: [subgraph_registration.id],\n }),\n registrant: one(subgraph_account, {\n fields: [subgraph_nameRegistered.registrantId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_nameRenewedRelations = relations(subgraph_nameRenewed, ({ one }) => ({\n registration: one(subgraph_registration, {\n fields: [subgraph_nameRenewed.registrationId],\n references: [subgraph_registration.id],\n }),\n}));\n\nexport const subgraph_nameTransferredRelations = relations(subgraph_nameTransferred, ({ one }) => ({\n registration: one(subgraph_registration, {\n fields: [subgraph_nameTransferred.registrationId],\n references: [subgraph_registration.id],\n }),\n newOwner: one(subgraph_account, {\n fields: [subgraph_nameTransferred.newOwnerId],\n references: [subgraph_account.id],\n }),\n}));\n\n// Resolver Event Relations\n\nexport const subgraph_addrChangedRelations = relations(subgraph_addrChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_addrChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n addr: one(subgraph_account, {\n fields: [subgraph_addrChanged.addrId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_multicoinAddrChangedRelations = relations(\n subgraph_multicoinAddrChanged,\n ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_multicoinAddrChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n }),\n);\n\nexport const subgraph_nameChangedRelations = relations(subgraph_nameChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_nameChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_abiChangedRelations = relations(subgraph_abiChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_abiChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_pubkeyChangedRelations = relations(subgraph_pubkeyChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_pubkeyChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_textChangedRelations = relations(subgraph_textChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_textChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_contenthashChangedRelations = relations(\n subgraph_contenthashChanged,\n ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_contenthashChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n }),\n);\n\nexport const subgraph_interfaceChangedRelations = relations(\n subgraph_interfaceChanged,\n ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_interfaceChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n }),\n);\n\nexport const subgraph_authorisationChangedRelations = relations(\n subgraph_authorisationChanged,\n ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_authorisationChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n }),\n);\n\nexport const subgraph_versionChangedRelations = relations(subgraph_versionChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_versionChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n","// https://github.com/drizzle-team/drizzle-orm/issues/638\nexport function monkeypatchCollate(col: any, collation: string) {\n col.getSQLType = function (this: any) {\n return `${Object.getPrototypeOf(this).getSQLType.call(this)} COLLATE ${collation}`;\n };\n return col;\n}\n","import { index, onchainTable } from \"ponder\";\n\nexport const nameSales = onchainTable(\n \"name_sales\",\n (t) => ({\n /**\n * Unique and deterministic identifier of the onchain event associated with the sale.\n *\n * Composite key format: \"{chainId}-{blockNumber}-{logIndex}\" (e.g., \"1-1234567-5\")\n */\n id: t.text().primaryKey(),\n\n /**\n * The chain where the sale occurred.\n */\n chainId: t.integer().notNull(),\n\n /**\n * The block number on chainId where the sale occurred.\n */\n blockNumber: t.bigint().notNull(),\n\n /**\n * The log index position of the sale event within blockNumber.\n */\n logIndex: t.integer().notNull(),\n\n /**\n * The EVM transaction hash on chainId associated with the sale.\n */\n transactionHash: t.hex().notNull(),\n\n /**\n * The Seaport order hash.\n */\n orderHash: t.hex().notNull(),\n\n /**\n * The address of the contract on chainId that manages tokenId.\n */\n contractAddress: t.hex().notNull(),\n\n /**\n * The tokenId managed by contractAddress that was sold.\n *\n * In a general context (outside of TokenScope) ERC1155 NFTs may have\n * multiple copies, however TokenScope guarantees that all indexed NFTs\n * never have an amount / balance > 1.\n */\n tokenId: t.bigint().notNull(),\n\n /**\n * The CAIP-19 Asset Namespace of the token that was sold. Either `erc721` or `erc1155`.\n *\n * @see https://chainagnostic.org/CAIPs/caip-19\n */\n assetNamespace: t.text().notNull(),\n\n /**\n * The CAIP-19 Asset ID of token that was sold. This is a globally unique reference to the\n * specific asset in question.\n *\n * @see https://chainagnostic.org/CAIPs/caip-19\n */\n assetId: t.text().notNull(),\n\n /**\n * The namehash (Node) of the ENS domain that was sold.\n */\n domainId: t.hex().notNull(),\n\n /**\n * The account that bought the token controlling ownership of domainId from\n * the seller for the amount of currency associated with the sale.\n */\n buyer: t.hex().notNull(),\n\n /**\n * The account that sold the token controlling ownership of domainId to\n * buyer for the amount of currency associated with the sale.\n */\n seller: t.hex().notNull(),\n\n /**\n * Currency of the payment (ETH, USDC or DAI) from buyer to seller in exchange for tokenId.\n */\n currency: t.text().notNull(),\n\n /**\n * The amount of currency paid from buyer to seller in exchange for tokenId.\n *\n * Denominated in the smallest unit of currency.\n *\n * Amount interpretation depends on currency:\n * - ETH/WETH: Amount in wei (1 ETH = 10^18 wei)\n * - USDC: Amount in micro-units (1 USDC = 10^6 units)\n * - DAI: Amount in wei-equivalent (1 DAI = 10^18 units)\n */\n amount: t.bigint().notNull(),\n\n /**\n * Unix timestamp of the block timestamp when the sale occurred.\n */\n timestamp: t.bigint().notNull(),\n }),\n (t) => ({\n idx_domainId: index().on(t.domainId),\n idx_assetId: index().on(t.assetId),\n idx_buyer: index().on(t.buyer),\n idx_seller: index().on(t.seller),\n idx_timestamp: index().on(t.timestamp),\n }),\n);\n\nexport const nameTokens = onchainTable(\n \"name_tokens\",\n (t) => ({\n /**\n * The CAIP-19 Asset ID of the token.\n *\n * This is a globally unique reference to the token.\n *\n * @see https://chainagnostic.org/CAIPs/caip-19\n */\n id: t.text().primaryKey(),\n\n /**\n * The namehash (Node) of the ENS name associated with the token.\n *\n * Note: An ENS name may have more than one distinct token across time. It is\n * also possible for multiple distinct tokens for an ENS name to have\n * a mintStatus of `minted` at the same time. For example:\n * - When a direct subname of .eth is wrapped by the NameWrapper. This state\n * has one minted token for the name managed by the BaseRegistrar (this\n * token will be owned by the NameWrapper) and another minted token for\n * the name managed by the NameWrapper (owned by the effective owner of\n * the name).\n * - When a direct subname of .eth is wrapped by the NameWrapper and then\n * unwrapped. This state has one minted token (managed by the BaseRegistrar)\n * and another burned token (managed by the NameWrapper).\n */\n domainId: t.hex().notNull(),\n\n /**\n * The chain that manages the token.\n */\n chainId: t.integer().notNull(),\n\n /**\n * The address of the contract on chainId that manages the token.\n */\n contractAddress: t.hex().notNull(),\n\n /**\n * The tokenId of the token managed by contractAddress.\n *\n * In a general context (outside of TokenScope) ERC1155 NFTs may have\n * multiple copies, however TokenScope guarantees that all indexed NFTs\n * never have an amount / balance > 1.\n */\n tokenId: t.bigint().notNull(),\n\n /**\n * The CAIP-19 Asset Namespace of the token. Either `erc721` or `erc1155`.\n *\n * @see https://chainagnostic.org/CAIPs/caip-19\n */\n assetNamespace: t.text().notNull(),\n\n /**\n * The account that owns the token.\n *\n * Value is zeroAddress if and only if mintStatus is `burned`.\n *\n * Note: The owner of the token for a given domainId may differ from the\n * owner of the associated node in the registry. For example:\n * - Consider the case where address X owns the ENS name `foo.eth` in\n * both the BaseRegistrar and the Registry. If X sends a request directly\n * to the Registry to transfer ownership to Y, ownership of `foo.eth` will\n * be transferred to Y in the Registry but not in the BaseRegistrar.\n * - ... for the case above, the BaseRegistrar implements a `reclaim`\n * allowing the owner of the name in the BaseRegistrar to reclaim ownership\n * of the name in the Registry.\n *\n * Note: When a name is wrapped by the NameWrapper, the owner of the token\n * in the BaseRegistrar is the NameWrapper, while a new token for the name is\n * minted by the NameWrapper and owned by the effective owner of the name.\n */\n owner: t.hex().notNull(),\n\n /**\n * The mint status of the token. Either `minted` or `burned`.\n *\n * After we index a NFT we never delete it from our index. Instead, when an\n * indexed NFT is burned onchain we retain its record and update its mint\n * status as `burned`. If a NFT is minted again after it is burned its mint\n * status is updated to `minted`.\n */\n mintStatus: t.text().notNull(),\n }),\n (t) => ({\n idx_domainId: index().on(t.domainId),\n idx_owner: index().on(t.owner),\n }),\n);\n"],"mappings":";AAIA,SAAS,cAAc,YAAY,iBAAiB;AAe7C,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA,CAAC,OAAO;AAAA;AAAA,IAEN,SAAS,EAAE,IAAI,EAAE,QAAQ;AAAA,IACzB,UAAU,EAAE,OAAO,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAW7B,OAAO,EAAE,KAAK,EAAE,QAAQ;AAAA,EAC1B;AAAA,EACA,CAAC,OAAO;AAAA,IACN,IAAI,WAAW,EAAE,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;AAAA,EACrD;AACF;AAcO,IAAM,uBAAuB;AAAA,EAClC;AAAA,EACA,CAAC,OAAO;AAAA;AAAA,IAEN,SAAS,EAAE,QAAQ,EAAE,QAAQ;AAAA,IAC7B,UAAU,EAAE,IAAI,EAAE,QAAQ;AAAA,IAC1B,MAAM,EAAE,IAAI,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,IAMtB,UAAU,EAAE,IAAI,EAAE,QAAQ;AAAA,EAC5B;AAAA,EACA,CAAC,OAAO;AAAA,IACN,IAAI,WAAW,EAAE,SAAS,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AAAA,EAC7D;AACF;A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AC7B,YAAYA,OAAM,EAAE,GAAG,EAAE,MAAM;AAAA,IAC/B,eAAeA,OAAM,EAAE,GAAG,EAAE,SAAS;AAAA,EACvC;AACF;AAEO,IAAM,aAAaC;AAAA,EACxB;AAAA,EACA,CAAC,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQN,IAAI,EAAE,KAAK,EAAE,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBxB,UAAU,EAAE,IAAI,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,IAK1B,SAAS,EAAE,QAAQ,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA,IAK7B,iBAAiB,EAAE,IAAI,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASjC,SAAS,EAAE,OAAO,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAO5B,gBAAgB,EAAE,KAAK,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAqBjC,OAAO,EAAE,IAAI,EAAE,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUvB,YAAY,EAAE,KAAK,EAAE,QAAQ;AAAA,EAC/B;AAAA,EACA,CAAC,OAAO;AAAA,IACN,cAAcD,OAAM,EAAE,GAAG,EAAE,QAAQ;AAAA,IACnC,WAAWA,OAAM,EAAE,GAAG,EAAE,KAAK;AAAA,EAC/B;AACF;","names":["onchainTable","relations","index","onchainTable","relations","onchainTable","index","relations","index","onchainTable"]}
|
|
1
|
+
{"version":3,"sources":["../src/schemas/ensv2.schema.ts","../src/schemas/protocol-acceleration.schema.ts","../src/schemas/registrars.schema.ts","../src/schemas/subgraph.schema.ts","../src/lib/collate.ts","../src/schemas/tokenscope.schema.ts"],"sourcesContent":["import { index, onchainEnum, onchainTable, relations, uniqueIndex } from \"ponder\";\nimport type { Address, Hash } from \"viem\";\n\nimport type {\n ChainId,\n DomainId,\n ENSv1DomainId,\n ENSv2DomainId,\n EncodedReferrer,\n InterpretedLabel,\n LabelHash,\n PermissionsId,\n PermissionsResourceId,\n PermissionsUserId,\n RegistrationId,\n RegistryId,\n RenewalId,\n} from \"@ensnode/ensnode-sdk\";\n\n/**\n * The ENSv2 Schema\n *\n * While the initial approach was a highly materialized view of the ENS protocol, abstracting away\n * as many on-chain details as possible, in practice—due to the sheer complexity of the protocol at\n * resolution-time—it becomes more or less impossible to appropriately materialize the canonical\n * namegraph.\n *\n * As a result, this schema takes a balanced approach. It mimics on-chain state as closely as possible,\n * with the obvious exception of materializing specific state that must trivially filterable. Then,\n * resolution-time logic is applied on _top_ of this index, at query-time, mimicking ENS's own resolution-time\n * behavior. This forces our implementation to match the protocol as closely as possible, with the\n * obvious note that the performance tradeoffs of evm code and our app are different. For example,\n * it's more expensive for us to recursively traverse the namegraph (like evm code does) because our\n * individual roundtrips from the db are relatively more expensive.\n *\n * For the datamodel, this means that instead of a polymorphic Domain entity, representing both v1\n * and v2 Domains, this schema employs separate (but overlapping) v1Domains and v2Domains entities.\n * This avoids resolution-time complications and more accurately represents the on-chain state.\n * Domain polymorphism is applied at the API later, via GraphQL Interfaces, to simplify queries.\n *\n * In general: the indexed schema should match on-chain state as closely as possible, and\n * resolution-time behavior within the ENS protocol should _also_ be implemented at resolution time\n * in ENSApi. The current obvious exception to this is that v1Domain.owner is the _materialized_\n * _effective_ owner of the v1Domain. ENSv1 includes a mind-boggling number of ways to 'own' a v1Domain,\n * including the ENSv1 Registry, various Registrars, and the NameWrapper. The ENSv1 indexing logic\n * within this ENSv2 plugin materialize the v1Domain's effective owner to simplify this aspect of ENS,\n * and enable efficient queries against v1Domain.owner.\n *\n * Many datamodels are shared between ENSv1 and ENSv2, including Registrations, Renewals, and Resolvers.\n *\n * Registrations are polymorphic between the defined RegistrationTypes, depending on the associated\n * guarantees (for example, ENSv1 BaseRegistrar Registrations may have a gracePeriod, but ENSv2\n * Registry Registrations do not).\n *\n * Instead of materializing a Domain's name at any point, we maintain an internal rainbow table of\n * labelHash -> InterpretedLabel (the Label entity). This ensures that regardless of how or when a\n * new label is encountered onchain, all Domains that use that label are automatically healed at\n * resolution-time.\n *\n * v1Domains exist in a flat namespace and are absolutely addressed by `node`. As such, they describe\n * a simple tree datamodel of:\n * v1Domain -> v1Domain(s) -> v1Domain(s) -> ...etc\n *\n * v2Domains exist in a set of namegraphs. Each namegraph is a possibly cicular directed graph of\n * (Root)Registry -> v2Domain(s) -> (sub)Regsitry -> v2Domain(s) -> ...etc\n * with exactly one RootRegistry on the ENS Root Chain establishing the beginning of the _canonical_\n * namegraph. As discussed above, the canonical namegraph is never materialized, only _navigated_\n * at resolution-time, in order to correctly implement the complexities of the ENS protocol.\n *\n * Note also that the Protocol Acceleration plugin is a hard requirement for the ENSv2 plugin. This\n * allows us to rely on the shared logic for indexing:\n * a) ENSv1RegistryOld -> ENSv1Registry migration status\n * b) Domain-Resolver Relations for both v1Domains and v2Domains\n * As such, none of that information is present in this ensv2.schema.ts file.\n *\n * In general, entities are keyed by a nominally-typed `id` that uniquely references them. This\n * allows us to trivially implement cursor-based pagination and allow consumers to reference these\n * deeply nested entities by a straightforward string ID. In cases where an entity's `id` is composed\n * of multiple pieces of information (for example, a Registry is identified by (chainId, address)),\n * then that information is, as well, included in the entity's columns, not just encoded in the id.\n *\n * Many entities may directly reference an Event, which represents the metadata associated with the\n * on-chain event responsible for its existence.\n */\n\n/////////\n// Event\n/////////\n\nexport const event = onchainTable(\"events\", (t) => ({\n // Ponder's event.id\n id: t.text().primaryKey(),\n\n // Event Metadata\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n blockHash: t.hex().notNull().$type<Hash>(),\n timestamp: t.bigint().notNull(),\n transactionHash: t.hex().notNull().$type<Hash>(),\n logIndex: t.integer().notNull().$type<number>(),\n}));\n\n///////////\n// Account\n///////////\n\nexport const account = onchainTable(\"accounts\", (t) => ({\n id: t.hex().primaryKey().$type<Address>(),\n}));\n\nexport const account_relations = relations(account, ({ many }) => ({\n registrations: many(registration, { relationName: \"registrant\" }),\n domains: many(v2Domain),\n permissions: many(permissionsUser),\n}));\n\n////////////\n// Registry\n////////////\n\nexport const registry = onchainTable(\n \"registries\",\n (t) => ({\n // see RegistryId for guarantees\n id: t.text().primaryKey().$type<RegistryId>(),\n\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n }),\n (t) => ({\n byId: uniqueIndex().on(t.chainId, t.address),\n }),\n);\n\nexport const relations_registry = relations(registry, ({ one, many }) => ({\n domain: one(v2Domain, {\n relationName: \"subregistry\",\n fields: [registry.id],\n references: [v2Domain.registryId],\n }),\n domains: many(v2Domain, { relationName: \"registry\" }),\n permissions: one(permissions, {\n relationName: \"permissions\",\n fields: [registry.chainId, registry.address],\n references: [permissions.chainId, permissions.address],\n }),\n}));\n\n///////////\n// Domains\n///////////\n\nexport const v1Domain = onchainTable(\n \"v1_domains\",\n (t) => ({\n // keyed by node, see ENSv1DomainId for guarantees.\n id: t.text().primaryKey().$type<ENSv1DomainId>(),\n\n // must have a parent v1Domain (note: root node does not exist in index)\n parentId: t.text().notNull().$type<ENSv1DomainId>(),\n\n // may have an owner\n ownerId: t.hex().$type<Address>(),\n\n // represents a labelHash\n labelHash: t.hex().notNull().$type<LabelHash>(),\n\n // NOTE: Domain-Resolver Relations tracked via Protocol Acceleration plugin\n }),\n (t) => ({\n byParent: index().on(t.parentId),\n byOwner: index().on(t.ownerId),\n }),\n);\n\nexport const relations_v1Domain = relations(v1Domain, ({ one, many }) => ({\n // v1Domain\n parent: one(v1Domain, {\n fields: [v1Domain.parentId],\n references: [v1Domain.id],\n }),\n children: many(v1Domain, { relationName: \"parent\" }),\n\n // shared\n owner: one(account, {\n relationName: \"owner\",\n fields: [v1Domain.ownerId],\n references: [account.id],\n }),\n label: one(label, {\n relationName: \"label\",\n fields: [v1Domain.labelHash],\n references: [label.labelHash],\n }),\n registrations: many(registration),\n}));\n\nexport const v2Domain = onchainTable(\n \"v2_domains\",\n (t) => ({\n // see ENSv2DomainId for guarantees\n id: t.text().primaryKey().$type<ENSv2DomainId>(),\n\n // has a tokenId\n tokenId: t.bigint().notNull(),\n\n // belongs to registry\n registryId: t.text().notNull().$type<RegistryId>(),\n\n // may have one subregistry\n subregistryId: t.text().$type<RegistryId>(),\n\n // may have an owner\n ownerId: t.hex().$type<Address>(),\n\n // represents a labelHash\n labelHash: t.hex().notNull().$type<LabelHash>(),\n\n // NOTE: Domain-Resolver Relations tracked via Protocol Acceleration plugin\n }),\n (t) => ({\n byRegistry: index().on(t.registryId),\n byOwner: index().on(t.ownerId),\n }),\n);\n\nexport const relations_v2Domain = relations(v2Domain, ({ one, many }) => ({\n // v2Domain\n registry: one(registry, {\n relationName: \"registry\",\n fields: [v2Domain.registryId],\n references: [registry.id],\n }),\n subregistry: one(registry, {\n relationName: \"subregistry\",\n fields: [v2Domain.subregistryId],\n references: [registry.id],\n }),\n\n // shared\n owner: one(account, {\n relationName: \"owner\",\n fields: [v2Domain.ownerId],\n references: [account.id],\n }),\n label: one(label, {\n relationName: \"label\",\n fields: [v2Domain.labelHash],\n references: [label.labelHash],\n }),\n registrations: many(registration),\n}));\n\n/////////////////\n// Registrations\n/////////////////\n\nexport const registrationType = onchainEnum(\"RegistrationType\", [\n // TODO: prefix these with ENSv1, maybe excluding ThreeDNS\n \"NameWrapper\",\n \"BaseRegistrar\",\n \"ThreeDNS\",\n \"ENSv2Registry\",\n]);\n\nexport const registration = onchainTable(\n \"registrations\",\n (t) => ({\n // keyed by (domainId, index)\n id: t.text().primaryKey().$type<RegistrationId>(),\n\n domainId: t.text().notNull().$type<DomainId>(),\n index: t.integer().notNull().default(0),\n\n // has a type\n type: registrationType().notNull(),\n\n // must have a start timestamp\n start: t.bigint().notNull(),\n // may have an expiry\n expiry: t.bigint(),\n // maybe have a grace period (BaseRegistrar)\n gracePeriod: t.bigint(),\n\n // registrar AccountId\n registrarChainId: t.integer().notNull().$type<ChainId>(),\n registrarAddress: t.hex().notNull().$type<Address>(),\n\n // references registrant\n registrantId: t.hex().$type<Address>(),\n\n // may have a referrer\n referrer: t.hex().$type<EncodedReferrer>(),\n\n // may have fuses (NameWrapper, Wrapped BaseRegistrar)\n fuses: t.integer(),\n\n // TODO(paymentToken): add payment token tracking here\n\n // may have base cost (BaseRegistrar, ENSv2Registrar)\n base: t.bigint(),\n\n // may have a premium (BaseRegistrar)\n premium: t.bigint(),\n\n // may be Wrapped (BaseRegistrar)\n wrapped: t.boolean().default(false),\n\n // has an event\n eventId: t.text().notNull(),\n }),\n (t) => ({\n byId: uniqueIndex().on(t.domainId, t.index),\n }),\n);\n\nexport const registration_relations = relations(registration, ({ one, many }) => ({\n // belongs to either v1Domain or v2Domain\n v1Domain: one(v1Domain, {\n fields: [registration.domainId],\n references: [v1Domain.id],\n }),\n v2Domain: one(v2Domain, {\n fields: [registration.domainId],\n references: [v2Domain.id],\n }),\n\n // has one registrant\n registrant: one(account, {\n fields: [registration.registrantId],\n references: [account.id],\n relationName: \"registrant\",\n }),\n\n // has many renewals\n renewals: many(renewal),\n\n // has an event\n event: one(event, {\n fields: [registration.eventId],\n references: [event.id],\n }),\n}));\n\n////////////\n// Renewals\n////////////\n\nexport const renewal = onchainTable(\n \"renewals\",\n (t) => ({\n // keyed by (registrationId, index)\n id: t.text().primaryKey().$type<RenewalId>(),\n\n domainId: t.text().notNull().$type<DomainId>(),\n registrationIndex: t.integer().notNull().default(0),\n index: t.integer().notNull().default(0),\n\n // all renewals have a duration\n duration: t.bigint().notNull(),\n\n // may have a referrer\n referrer: t.hex().$type<EncodedReferrer>(),\n\n // TODO(paymentToken): add payment token tracking here\n\n // may have base cost\n base: t.bigint(),\n\n // may have a premium (ENSv1 RegistrarControllers)\n premium: t.bigint(),\n\n // has an event\n eventId: t.text().notNull(),\n }),\n (t) => ({\n byId: uniqueIndex().on(t.domainId, t.registrationIndex, t.index),\n }),\n);\n\nexport const renewal_relations = relations(renewal, ({ one }) => ({\n // belongs to registration\n registration: one(registration, {\n fields: [renewal.domainId, renewal.registrationIndex],\n references: [registration.domainId, registration.index],\n }),\n\n // has an event\n event: one(event, {\n fields: [renewal.eventId],\n references: [event.id],\n }),\n}));\n\n///////////////\n// Permissions\n///////////////\n\nexport const permissions = onchainTable(\n \"permissions\",\n (t) => ({\n id: t.text().primaryKey().$type<PermissionsId>(),\n\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n }),\n (t) => ({\n byId: uniqueIndex().on(t.chainId, t.address),\n }),\n);\n\nexport const relations_permissions = relations(permissions, ({ many }) => ({\n resources: many(permissionsResource),\n users: many(permissionsUser),\n}));\n\nexport const permissionsResource = onchainTable(\n \"permissions_resources\",\n (t) => ({\n id: t.text().primaryKey().$type<PermissionsResourceId>(),\n\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n resource: t.bigint().notNull(),\n }),\n (t) => ({\n byId: uniqueIndex().on(t.chainId, t.address, t.resource),\n }),\n);\n\nexport const relations_permissionsResource = relations(permissionsResource, ({ one }) => ({\n permissions: one(permissions, {\n fields: [permissionsResource.chainId, permissionsResource.address],\n references: [permissions.chainId, permissions.address],\n }),\n}));\n\nexport const permissionsUser = onchainTable(\n \"permissions_users\",\n (t) => ({\n id: t.text().primaryKey().$type<PermissionsUserId>(),\n\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n resource: t.bigint().notNull(),\n user: t.hex().notNull().$type<Address>(),\n\n // has one roles bitmap\n roles: t.bigint().notNull(),\n }),\n (t) => ({\n byId: uniqueIndex().on(t.chainId, t.address, t.resource, t.user),\n }),\n);\n\nexport const relations_permissionsUser = relations(permissionsUser, ({ one }) => ({\n account: one(account, {\n fields: [permissionsUser.user],\n references: [account.id],\n }),\n permissions: one(permissions, {\n fields: [permissionsUser.chainId, permissionsUser.address],\n references: [permissions.chainId, permissions.address],\n }),\n resource: one(permissionsResource, {\n fields: [permissionsUser.chainId, permissionsUser.address, permissionsUser.resource],\n references: [\n permissionsResource.chainId,\n permissionsResource.address,\n permissionsResource.resource,\n ],\n }),\n}));\n\n//////////\n// Labels\n//////////\n\nexport const label = onchainTable(\"labels\", (t) => ({\n labelHash: t.hex().primaryKey().$type<LabelHash>(),\n value: t.text().notNull().$type<InterpretedLabel>(),\n}));\n\nexport const label_relations = relations(label, ({ many }) => ({\n domains: many(v2Domain),\n}));\n","/**\n * Schema Definitions that power Protocol Acceleration in the Resolution API.\n */\n\nimport { onchainTable, primaryKey, relations, uniqueIndex } from \"ponder\";\nimport type { Address } from \"viem\";\n\nimport type { ChainId, DomainId, Node, ResolverId, ResolverRecordsId } from \"@ensnode/ensnode-sdk\";\n\n/**\n * Tracks an Account's ENSIP-19 Reverse Name Records by CoinType.\n *\n * NOTE: this is NOT a cohesive, materialized index of ALL of an account's Primary Names, it is ONLY\n * an index of its ENSIP-19 Reverse Name _Records_ stored by a StandaloneReverseRegistrar:\n * - default.reverse\n * - [coinType].reverse\n * - NOT *.addr.reverse\n *\n * So these records CANNOT be queried directly and used as a source of truth — you MUST perform\n * Forward Resolution to resolve a consistent set of an Account's ENSIP-19 Primary Names. These records\n * are used to power Protocol Acceleration for those ReverseResolvers backed by a StandloneReverseRegistrar.\n */\nexport const reverseNameRecord = onchainTable(\n \"reverse_name_records\",\n (t) => ({\n // keyed by (address, coinType)\n address: t.hex().notNull().$type<Address>(),\n coinType: t.bigint().notNull(),\n\n /**\n * Represents the ENSIP-19 Reverse Name Record for a given (address, coinType).\n *\n * The value of this field is guaranteed to be a non-empty-string normalized ENS name (see\n * `interpretNameRecordValue` for additional context and specific guarantees). Unnormalized\n * names and empty string values are interpreted as a deletion of the associated Reverse Name\n * Record entity (represented in the schema as the _absence_ of a relevant Reverse Name Record\n * entity).\n */\n value: t.text().notNull(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.address, t.coinType] }),\n }),\n);\n\n/**\n * Tracks Domain-Resolver Relationships. This powers:\n * 1. Domain-Resolver Realtionships within the GraphQL API, and\n * 2. Accelerated lookups of a Domain's Resolver within the Resolution API.\n *\n * It is keyed by (chainId, address, domainId) to match the on-chain datamodel of\n * Registry/(shadow)Registry Domain-Resolver relationships.\n */\nexport const domainResolverRelation = onchainTable(\n \"domain_resolver_relations\",\n (t) => ({\n // keyed by (chainId, registry, node)\n chainId: t.integer().notNull().$type<ChainId>(),\n\n // The Registry (ENSv1Registry or ENSv2Registry)'s AccountId.\n address: t.hex().notNull().$type<Address>(),\n domainId: t.hex().notNull().$type<DomainId>(),\n\n // The Domain's assigned Resolver's address (NOTE: always scoped to chainId)\n resolver: t.hex().notNull().$type<Address>(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.chainId, t.address, t.domainId] }),\n }),\n);\n\nexport const domainResolverRelation_relations = relations(domainResolverRelation, ({ one }) => ({\n resolver: one(resolver, {\n fields: [domainResolverRelation.chainId, domainResolverRelation.resolver],\n references: [resolver.chainId, resolver.address],\n }),\n}));\n\n/**\n * Resolver represents an individual IResolver contract that has emitted at least 1 event.\n * Note that Resolver contracts can exist on-chain but not emit any events and still function\n * properly, so checks against a Resolver's existence and metadata must be done at runtime.\n */\nexport const resolver = onchainTable(\n \"resolvers\",\n (t) => ({\n // keyed by (chainId, address)\n id: t.text().primaryKey().$type<ResolverId>(),\n\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n }),\n (t) => ({\n byId: uniqueIndex().on(t.chainId, t.address),\n }),\n);\n\nexport const resolver_relations = relations(resolver, ({ many }) => ({\n records: many(resolverRecords),\n}));\n\n/**\n * Tracks a set of records for a specified `node` within a `resolver` contract on `chainId`.\n *\n * ResolverRecords is keyed by (chainId, resolver, node) and:\n * - has one `name` record (see ENSIP-3)\n * - has many `addressRecords` (unique by coinType) (see ENSIP-9)\n * - has many `textRecords` (unique by key) (see ENSIP-5)\n *\n * It is keyed by (chainId, resolver, node) to match the on-chain datamodel of Resolver contract storage.\n *\n * WARNING: These record values do NOT allow the caller to confidently resolve records for names\n * without following Forward Resolution according to the ENS protocol: a direct query to the database\n * for a record's value is not ENSIP-10 nor CCIP-Read compliant.\n */\nexport const resolverRecords = onchainTable(\n \"resolver_records\",\n (t) => ({\n // keyed by (chainId, resolver, node)\n id: t.text().primaryKey().$type<ResolverRecordsId>(),\n\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n node: t.hex().notNull().$type<Node>(),\n\n /**\n * Represents the value of the reverse-resolution (ENSIP-3) name() record, used for Reverse Resolution.\n *\n * The emitted record values are interpreted according to `interpretNameRecordValue` — unnormalized\n * names and empty string values are interpreted as a deletion of the associated record (represented\n * here as `null`).\n *\n * If set, the value of this field is guaranteed to be a non-empty-string normalized ENS name\n * (see `interpretNameRecordValue` for additional context and specific guarantees).\n */\n name: t.text(),\n }),\n (t) => ({\n byId: uniqueIndex().on(t.chainId, t.address, t.node),\n }),\n);\n\nexport const resolverRecords_relations = relations(resolverRecords, ({ one, many }) => ({\n // belongs to resolver\n resolver: one(resolver, {\n fields: [resolverRecords.chainId, resolverRecords.address],\n references: [resolver.chainId, resolver.address],\n }),\n\n // resolverRecord has many address records\n addressRecords: many(resolverAddressRecord),\n\n // resolverRecord has many text records\n textRecords: many(resolverTextRecord),\n}));\n\n/**\n * Tracks address records for a `node` by `coinType` within a `resolver` on `chainId`.\n *\n * ResolverAddressRecord is keyed by (chainId, resolver, node, coinType), where the composite key\n * segment (chainId, resolver, node) describes a ResolverRecord entity. A ResolverAddressRecord is\n * then additionally keyed by (coinType).\n */\nexport const resolverAddressRecord = onchainTable(\n \"resolver_address_records\",\n (t) => ({\n // keyed by ((chainId, resolver, node), coinType)\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n node: t.hex().notNull().$type<Node>(),\n // NOTE: all well-known CoinTypes fit into javascript number but NOT postgres .integer, must be\n // stored as BigInt\n coinType: t.bigint().notNull(),\n\n /**\n * Represents the value of the Addresss Record specified by ((chainId, resolver, node), coinType).\n *\n * The value of this field is interpreted by `interpretAddressRecordValue` — see its implementation\n * for additional context and specific guarantees.\n */\n value: t.text().notNull(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.chainId, t.address, t.node, t.coinType] }),\n }),\n);\n\nexport const resolverAddressRecordRelations = relations(resolverAddressRecord, ({ one }) => ({\n // belongs to resolverRecord\n resolver: one(resolverRecords, {\n fields: [\n resolverAddressRecord.chainId,\n resolverAddressRecord.address,\n resolverAddressRecord.node,\n ],\n references: [resolverRecords.chainId, resolverRecords.address, resolverRecords.node],\n }),\n}));\n\n/**\n * Tracks text records for a `node` by `key` within a `resolver` on `chainId`.\n *\n * ResolverTextRecord is keyed by (chainId, resolver, node, key), where the composite key\n * segment (chainId, resolver, node) describes a ResolverRecord entity. A ResolverTextRecord is\n * then additionally keyed by (key).\n */\nexport const resolverTextRecord = onchainTable(\n \"resolver_text_records\",\n (t) => ({\n // keyed by ((chainId, resolver, node), key)\n chainId: t.integer().notNull().$type<ChainId>(),\n address: t.hex().notNull().$type<Address>(),\n node: t.hex().notNull().$type<Node>(),\n key: t.text().notNull(),\n\n /**\n * Represents the value of the Text Record specified by ((chainId, resolver, node), key).\n *\n * The value of this field is interpreted by `interpretTextRecordValue` — see its implementation\n * for additional context and specific guarantees.\n */\n value: t.text().notNull(),\n }),\n (t) => ({\n pk: primaryKey({ columns: [t.chainId, t.address, t.node, t.key] }),\n }),\n);\n\nexport const resolverTextRecordRelations = relations(resolverTextRecord, ({ one }) => ({\n // belongs to resolverRecord\n resolver: one(resolverRecords, {\n fields: [resolverTextRecord.chainId, resolverTextRecord.address, resolverTextRecord.node],\n references: [resolverRecords.chainId, resolverRecords.address, resolverRecords.node],\n }),\n}));\n\n/**\n * Tracks the migration status of a node.\n *\n * Due to a security issue, ENS migrated from the RegistryOld contract to a new Registry\n * contract. When indexing events, the indexer must ignore any events on the RegistryOld for domains\n * that have since been migrated to the new Registry.\n *\n * To store the necessary information required to implement this behavior, we track the set of nodes\n * that have been registered in the (new) Registry contract on the ENS Root Chain. When an event is\n * encountered on the RegistryOld contract, if the relevant node exists in this set, the event should\n * be ignored, as the node is considered migrated.\n *\n * Note that this logic is only necessary for the ENS Root Chain, the only chain that includes the\n * Registry migration: we do not track nodes in the the Basenames and Lineanames deployments of the\n * Registry on their respective chains, for example.\n *\n * Note also that this Registry migration tracking is isolated to the Protocol Acceleration schema/plugin.\n * That is, the subgraph core plugin implements its own Registry migration logic, and the future\n * ensv2 core plugin will likely do the same. By isolating this logic to the Protocol Acceleration\n * plugin, we allow the Protocol acceleration plugin to be run independently of a core plugin\n * (and could be run _without_ a core plugin, for example).\n */\nexport const migratedNode = onchainTable(\"migrated_nodes\", (t) => ({\n node: t.hex().primaryKey(),\n}));\n","/**\n * Schema Definitions for tracking of ENS registrars.\n */\n\nimport { index, onchainEnum, onchainTable, relations, uniqueIndex } from \"ponder\";\n\n/**\n * Subregistries\n *\n * @see https://ensnode.io/docs/reference/terminology/#subregistry\n */\nexport const subregistries = onchainTable(\n \"subregistries\",\n (t) => ({\n /**\n * Subregistry ID\n *\n * Identifies the chainId and address of the smart contract associated\n * with the subregistry.\n *\n * Guaranteed to be a fully lowercase string formatted according to\n * the CAIP-10 standard.\n *\n * @see https://chainagnostic.org/CAIPs/caip-10\n */\n subregistryId: t.text().primaryKey(),\n\n /**\n * The node (namehash) of the name the subregistry manages subnames of.\n * Example subregistry managed names:\n * - `eth`\n * - `base.eth`\n * - `linea.eth`\n *\n * Guaranteed to be a fully lowercase hex string representation of 32-bytes.\n */\n node: t.hex().notNull(),\n }),\n (t) => ({\n uniqueNode: uniqueIndex().on(t.node),\n }),\n);\n\n/**\n * Registration Lifecycles\n *\n * A \"registration lifecycle\" represents a single cycle of a name being\n * registered once followed by renewals (expiry date extensions) any number of\n * times.\n *\n * Note that this data model only tracks the *most recently created*\n * \"registration lifecycle\" record for a name and doesn't track\n * *all* \"registration lifecycle\" records for a name across time.\n * Therefore, if a name goes through multiple cycles of:\n * (registration -> expiry -> release) ->\n * (registration -> expiry -> release) -> etc..\n * this data model only stores data of the most recently created\n * \"registration lifecycle\".\n *\n * For now we make the following simplifying assumptions:\n * 1. That no two subregistries hold state for the same node.\n * 2. That the subregistry associated with the name X in the ENS root registry\n * exclusively holds state for subnames of X.\n *\n * These simplifying assumptions happen to be true for the scope of our\n * current indexing logic, but nothing in the ENS protocol fundamentally\n * forces this to always be true. Therefore this data model will need\n * refactoring in the future as our indexing logic expands to handle\n * more complex scenarios.\n */\nexport const registrationLifecycles = onchainTable(\n \"registration_lifecycles\",\n (t) => ({\n /**\n * The node (namehash) of the FQDN of the domain the registration lifecycle\n * is associated with.\n *\n * Guaranteed to be a subname of the node (namehash) of the subregistry\n * identified by `subregistryId`.\n *\n * Guaranteed to be a fully lowercase hex string representation of 32-bytes.\n */\n node: t.hex().primaryKey(),\n\n /**\n * Subregistry ID\n *\n * Identifies the chainId and address of the subregistry smart contract\n * that manages the registration lifecycle.\n *\n * Guaranteed to be a fully lowercase string formatted according to\n * the CAIP-10 standard.\n *\n * @see https://chainagnostic.org/CAIPs/caip-10\n */\n subregistryId: t.text().notNull(),\n\n /**\n * Expires at\n *\n * Unix timestamp when the Registration Lifecycle is scheduled to expire.\n */\n expiresAt: t.bigint().notNull(),\n }),\n (t) => ({\n bySubregistry: index().on(t.subregistryId),\n }),\n);\n\n/**\n * \"Logical registrar action type\" enum\n *\n * Types of \"logical registrar action\".\n */\nexport const registrarActionType = onchainEnum(\"registrar_action_type\", [\n \"registration\",\n \"renewal\",\n]);\n\n/**\n * \"Logical registrar actions\"\n *\n * This table models \"logical actions\" rather than \"events\" because a single\n * \"logical action\", such as a single registration or renewal, may emit\n * multiple onchain events from multiple contracts where each of those\n * individual events may only provide a subset of the data about the full\n * \"logical action\". Therefore, here we aggregate data about each\n * \"logical action\" that may be sourced from multiple onchain events from\n * multiple contracts.\n *\n * Each \"logical action\" in this table is associated with a single transaction.\n * However, it should be noted that a single transaction may perform any number\n * of \"logical actions\".\n *\n * For example, consider the \"logical registrar action\" of registering a direct\n * subname of .eth. This \"logical action\" spans interactions across multiple\n * contracts that emit multiple onchain events:\n *\n * 1. The \"EthBaseRegistrar\" contract emits a `NameRegistered` event enabling\n * the tracking of data including:\n * - `node`\n * - `incrementalDuration`\n * - `registrant`\n * 2. A \"RegistrarController\" contract emits its own `NameRegistered` event\n * enabling the tracking of data that may include:\n * - `baseCost`\n * - `premium`\n * - `total`\n * - `encodedReferrer`\n *\n * Here we aggregate the state from both of these events into a single\n * \"logical registrar action\".\n */\nexport const registrarActions = onchainTable(\n \"registrar_actions\",\n (t) => ({\n /**\n * \"Logical registrar action\" ID\n *\n * The `id` value is a deterministic and globally unique identifier for\n * the \"logical registrar action\".\n *\n * The `id` value represents the *initial* onchain event associated with\n * the \"logical registrar action\", but the full state of\n * the \"logical registrar action\" is an aggregate across each of\n * the onchain events referenced in the `eventIds` field.\n *\n * Guaranteed to be the very first element in `eventIds` array.\n */\n id: t.text().primaryKey(),\n\n /**\n * The type of the \"logical registrar action\".\n */\n type: registrarActionType().notNull(),\n\n /**\n * Subregistry ID\n *\n * The ID of the subregistry the \"logical registrar action\" was taken on.\n *\n * Identifies the chainId and address of the associated subregistry smart\n * contract.\n *\n * Guaranteed to be a fully lowercase string formatted according to\n * the CAIP-10 standard.\n *\n * @see https://chainagnostic.org/CAIPs/caip-10\n */\n subregistryId: t.text().notNull(),\n\n /**\n * The node (namehash) of the FQDN of the domain associated with\n * the \"logical registrar action\".\n *\n * Guaranteed to be a fully lowercase hex string representation of 32-bytes.\n */\n node: t.hex().notNull(),\n\n /**\n * Incremental Duration\n *\n * If `type` is \"registration\":\n * - Represents the duration between `blockTimestamp` and\n * the initial `expiresAt` value that the associated\n * \"registration lifecycle\" will be initialized with.\n * If `type` is \"renewal\":\n * - Represents the incremental increase in duration made to\n * the `expiresAt` value in the associated \"registration lifecycle\".\n *\n * A \"registration lifecycle\" may be extended via renewal even after it\n * expires if it is still within its grace period.\n *\n * Consider the following scenario:\n *\n * The \"registration lifecycle\" of a direct subname of .eth is scheduled to\n * expire on Jan 1, midnight UTC. It is currently 30 days after this\n * expiration time. Therefore, there are currently another 60 days of grace\n * period remaining for this name. Anyone can still make a renewal to\n * extend the \"registration lifecycle\" of this name.\n *\n * Given this scenario, consider the following examples:\n *\n * 1. If a renewal is made with 10 days incremental duration,\n * the \"registration lifecycle\" for this name will remain in\n * an \"expired\" state, but it will now have another 70 days of\n * grace period remaining.\n *\n * 2. If a renewal is made with 50 days incremental duration,\n * the \"registration lifecycle\" for this name will no longer be\n * \"expired\" and will become \"active\", but the \"registration lifecycle\"\n * will now be scheduled to expire again in 20 days.\n *\n * After the \"registration lifecycle\" for a name becomes expired by more\n * than its grace period, it can no longer be renewed by anyone and is\n * considered \"released\". The name must first be registered again, starting\n * a new \"registration lifecycle\" of\n * active / expired / grace period / released.\n *\n * May be 0.\n *\n * Guaranteed to be a non-negative bigint value.\n */\n incrementalDuration: t.bigint().notNull(),\n\n /**\n * Base cost\n *\n * Base cost (before any `premium`) of Ether measured in units of Wei\n * paid to execute the \"logical registrar action\".\n *\n * May be 0.\n *\n * Guaranteed to be:\n * 1) null if and only if `total` is null.\n * 2) Otherwise, a non-negative bigint value.\n */\n baseCost: t.bigint(),\n\n /**\n * Premium\n *\n * \"premium\" cost (in excesses of the `baseCost`) of Ether measured in\n * units of Wei paid to execute the \"logical registrar action\".\n *\n * May be 0.\n *\n * Guaranteed to be:\n * 1) null if and only if `total` is null.\n * 2) Otherwise, zero when `type` is `renewal`.\n * 3) Otherwise, a non-negative bigint value.\n */\n premium: t.bigint(),\n\n /**\n * Total\n *\n * Total cost of Ether measured in units of Wei paid to execute\n * the \"logical registrar action\".\n *\n * May be 0.\n *\n * Guaranteed to be:\n * 1) null if and only if both `baseCost` and `premium` are null.\n * 2) Otherwise, a non-negative bigint value, equal to the sum of\n * `baseCost` and `premium`.\n */\n total: t.bigint(),\n\n /**\n * Registrant\n *\n * Identifies the address that initiated the \"logical registrar action\" and\n * is paying the `total` cost (if applicable).\n *\n * It may not be the owner of the name:\n * 1. When a name is registered, the initial owner of the name may be\n * distinct from the registrant.\n * 2. There are no restrictions on who may renew a name.\n * Therefore the owner of the name may be distinct from the registrant.\n *\n *\n * The \"chainId\" of this address is the same as is referenced in `subregistryId`.\n *\n * Guaranteed to be a fully lowercase address\n */\n registrant: t.hex().notNull(),\n\n /**\n * Encoded Referrer\n *\n * Represents the \"raw\" 32-byte \"referrer\" value emitted onchain in\n * association with the registrar action.\n *\n * Guaranteed to be:\n * 1) null if the emitted `eventIds` contain no information about a referrer.\n * 2) Otherwise, a fully lowercase hex string representation of 32-bytes.\n */\n encodedReferrer: t.hex(),\n\n /**\n * Decoded referrer\n *\n * Decoded referrer according to the subjective interpretation of\n * `encodedReferrer` defined for ENS Holiday Awards.\n *\n * Identifies the interpreted address of the referrer.\n * The \"chainId\" of this address is the same as is referenced in\n * `subregistryId`.\n *\n * Guaranteed to be:\n * 1) null if `encodedReferrer` is null.\n * 2) Otherwise, a fully lowercase address.\n * 3) May be the \"zero address\" to represent that an `encodedReferrer` is\n * defined but that it is interpreted as no referrer.\n */\n decodedReferrer: t.hex(),\n\n /**\n * Number of the block that includes the \"logical registrar action\".\n *\n * The \"chainId\" of this block is the same as is referenced in\n * `subregistryId`.\n *\n * Guaranteed to be a non-negative bigint value.\n */\n blockNumber: t.bigint().notNull(),\n\n /**\n * Unix timestamp of the block referenced by `blockNumber` that includes\n * the \"logical registrar action\".\n */\n timestamp: t.bigint().notNull(),\n\n /**\n * Transaction hash of the transaction associated with\n * the \"logical registrar action\".\n *\n * The \"chainId\" of this transaction is the same as is referenced in\n * `subregistryId`.\n *\n * Note that a single transaction may be associated with any number of\n * \"logical registrar actions\".\n *\n * Guaranteed to be a fully lowercase hex string representation of 32-bytes.\n */\n transactionHash: t.hex().notNull(),\n\n /**\n * Event IDs\n *\n * Array of the eventIds that have contributed to the state of\n * the \"logical registrar action\" record.\n *\n * Each eventId is a deterministic and globally unique onchain event\n * identifier.\n *\n * Guarantees:\n * - Each eventId is of events that occurred within the block\n * referenced by `blockNumber`.\n * - At least 1 eventId.\n * - Ordered chronologically (ascending) by logIndex within `blockNumber`.\n * - The first element in the array is equal to the `id` of\n * the overall \"logical registrar action\" record.\n *\n * The following ideas are not generalized for ENS overall but happen to\n * be a characteristic of the scope of our current indexing logic:\n * 1. These id's always reference events emitted by\n * a related \"BaseRegistrar\" contract.\n * 2. These id's optionally reference events emitted by\n * a related \"Registrar Controller\" contract. This is because our\n * current indexing logic doesn't guarantee to index\n * all \"Registrar Controller\" contracts.\n */\n eventIds: t.text().array().notNull(),\n }),\n (t) => ({\n byDecodedReferrer: index().on(t.decodedReferrer),\n byTimestamp: index().on(t.timestamp),\n }),\n);\n\n/**\n * Logical Registrar Action Metadata Type Enum\n *\n * Types of internal registrar action metadata.\n *\n * NOTE: This enum is an internal implementation detail of ENSIndexer and\n * should not be used outside of ENSIndexer.\n */\nexport const internal_registrarActionMetadataType = onchainEnum(\n \"_ensindexer_registrar_action_metadata_type\",\n [\"CURRENT_LOGICAL_REGISTRAR_ACTION\"],\n);\n\n/**\n * Logical Registrar Action Metadata\n *\n * NOTE: This table is an internal implementation detail of ENSIndexer and\n * should not be queried outside of ENSIndexer.\n *\n * Building a \"logical registrar action\" record may require data from\n * multiple onchain events. To help aggregate data from multiple events into\n * a single \"logical registrar action\" ENSIndexer may temporarily store data\n * here to achieve this data aggregation.\n *\n * Note how multiple \"logical registrar actions\" may be taken on\n * the same `node` in the same `transactionHash`. For example, consider\n * a case of a single transaction registering a name and subsequently renewing\n * it twice. While this may be silly it is technically possible and therefore\n * such cases must be considered. To support such cases, when\n * the last event handler for a \"logical registrar action\" has completed its\n * processing the record referenced by the `logicalEventKey` must be removed.\n */\nexport const internal_registrarActionMetadata = onchainTable(\n \"_ensindexer_registrar_action_metadata\",\n (t) => ({\n /**\n * Registrar Action Metadata Type\n *\n * The type of internal registrar action metadata being stored.\n */\n metadataType: internal_registrarActionMetadataType().primaryKey(),\n\n /**\n * Logical Event Key\n *\n * A fully lowercase string formatted as:\n * `{domainId}:{transactionHash}`\n */\n logicalEventKey: t.text().notNull(),\n\n /**\n * Logical Event ID\n *\n * A string holding the `id` value of the existing \"logical registrar action\"\n * record that is currently being built as an aggregation of onchain events.\n *\n * May be used by subsequent event handlers to identify which\n * \"logical registrar action\" to aggregate additional indexed state into.\n */\n logicalEventId: t.text().notNull(),\n }),\n);\n\n/// Relations\n\n/**\n * Subregistry Relations\n *\n * Each Subregistry is related to:\n * - 0 or more RegistrationLifecycles\n */\nexport const subregistryRelations = relations(subregistries, ({ many }) => ({\n registrationLifecycle: many(registrationLifecycles),\n}));\n\n/**\n * Registration Lifecycle Relations\n *\n * Each Registration Lifecycle is related to:\n * - exactly one Subregistry\n * - 0 or more \"logical registrar action\"\n */\nexport const registrationLifecycleRelations = relations(\n registrationLifecycles,\n ({ one, many }) => ({\n subregistry: one(subregistries, {\n fields: [registrationLifecycles.subregistryId],\n references: [subregistries.subregistryId],\n }),\n\n registrarAction: many(registrarActions),\n }),\n);\n\n/**\n * \"Logical registrar action\" Relations\n *\n * Each \"logical registrar action\" is related to:\n * - exactly one Registration Lifecycle (note the docs on\n * Registration Lifecycle explaining how these records may\n * be recycled across time).\n */\nexport const registrarActionRelations = relations(registrarActions, ({ one }) => ({\n registrationLifecycle: one(registrationLifecycles, {\n fields: [registrarActions.node],\n references: [registrationLifecycles.node],\n }),\n}));\n","import { index, onchainTable, relations } from \"ponder\";\nimport type { Address } from \"viem\";\n\nimport { monkeypatchCollate } from \"../lib/collate\";\n\n/**\n * This file specifies an Legacy-ENS-Subgraph-Compatible Ponder Schema.\n *\n * When the subgraph_prefix is stripped and the resulting schema is paired with @ensnode/ponder-subgraph,\n * the resulting GraphQL API is fully compatible with the legacy ENS Subgraph.\n */\n\n/**\n * Domain\n */\n\nexport const subgraph_domain = onchainTable(\n \"subgraph_domains\",\n (t) => ({\n // The namehash of the name\n id: t.hex().primaryKey(),\n\n /**\n * The ENS Name that this Domain represents.\n *\n * If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:\n * a) null (in the case of the root node), or\n * b) a Subgraph Interpreted Name.\n *\n * @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation\n *\n * Otherwise, this value is guaranteed to be an Interpreted Name, which is either:\n * a) a normalized Name, or\n * b) a Name entirely consisting of Interpreted Labels.\n *\n * Note that the type of the column will remain string | null, for legacy subgraph compatibility,\n * but in practice will never be null. The Root node's name will be '' (empty string).\n *\n * @see https://ensnode.io/docs/reference/terminology#interpreted-name\n */\n name: t.text(),\n\n /**\n * The Label associated with the Domain.\n *\n * If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:\n * a) null, in the case of the root Node or a name whose childmost label is subgraph-unindexable, or\n * b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).\n *\n * @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation\n *\n * Otherwise, this value is guaranteed to be an Interpreted Label which is either:\n * a) null, exclusively in the case of the root Node,\n * b) a normalized Label, or\n * c) an Encoded LabelHash, which encodes either\n * i. in the case of an Unknown Label, the LabelHash emitted onchain, or\n * ii. in the case of an Unnormalized Label, the LabelHash of the Literal Label value found onchain.\n *\n * @see https://ensnode.io/docs/reference/terminology#interpreted-label\n */\n labelName: t.text(),\n\n // keccak256(labelName)\n labelhash: t.hex(),\n // The namehash (id) of the parent name\n parentId: t.hex(),\n\n // The number of subdomains\n subdomainCount: t.integer().notNull().default(0),\n\n // Address logged from current resolver, if any\n resolvedAddressId: t.hex(),\n\n // The resolver that controls the domain's settings\n resolverId: t.text(),\n\n // The time-to-live (TTL) value of the domain's records\n ttl: t.bigint(),\n\n // Indicates whether the domain has been migrated to a new registrar\n isMigrated: t.boolean().notNull().default(false),\n // The time when the domain was created\n createdAt: t.bigint().notNull(),\n\n // The account that owns the domain\n ownerId: t.hex().notNull(),\n // The account that owns the ERC721 NFT for the domain\n registrantId: t.hex(),\n // The account that owns the wrapped domain\n wrappedOwnerId: t.hex(),\n\n // The expiry date for the domain, from either the registration, or the wrapped domain if PCC is burned\n expiryDate: t.bigint(),\n }),\n (t) => ({\n byLabelhash: index().on(t.labelhash),\n byParentId: index().on(t.parentId),\n byOwnerId: index().on(t.ownerId),\n byRegistrantId: index().on(t.registrantId),\n byWrappedOwnerId: index().on(t.wrappedOwnerId),\n }),\n);\n\n// monkeypatch drizzle's column (necessary to match graph-node default collation \"C\")\n// https://github.com/drizzle-team/drizzle-orm/issues/638\nmonkeypatchCollate(subgraph_domain.name, '\"C\"');\nmonkeypatchCollate(subgraph_domain.labelName, '\"C\"');\n\nexport const subgraph_domainRelations = relations(subgraph_domain, ({ one, many }) => ({\n resolvedAddress: one(subgraph_account, {\n fields: [subgraph_domain.resolvedAddressId],\n references: [subgraph_account.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_domain.ownerId],\n references: [subgraph_account.id],\n }),\n parent: one(subgraph_domain, {\n fields: [subgraph_domain.parentId],\n references: [subgraph_domain.id],\n }),\n resolver: one(subgraph_resolver, {\n fields: [subgraph_domain.resolverId],\n references: [subgraph_resolver.id],\n }),\n subdomains: many(subgraph_domain, { relationName: \"parent\" }),\n registrant: one(subgraph_account, {\n fields: [subgraph_domain.registrantId],\n references: [subgraph_account.id],\n }),\n wrappedOwner: one(subgraph_account, {\n fields: [subgraph_domain.wrappedOwnerId],\n references: [subgraph_account.id],\n }),\n wrappedDomain: one(subgraph_wrappedDomain, {\n fields: [subgraph_domain.id],\n references: [subgraph_wrappedDomain.domainId],\n }),\n registration: one(subgraph_registration, {\n fields: [subgraph_domain.id],\n references: [subgraph_registration.domainId],\n }),\n\n // event relations\n transfers: many(subgraph_transfer),\n newOwners: many(subgraph_newOwner),\n newResolvers: many(subgraph_newResolver),\n newTTLs: many(subgraph_newTTL),\n wrappedTransfers: many(subgraph_wrappedTransfer),\n nameWrappeds: many(subgraph_nameWrapped),\n nameUnwrappeds: many(subgraph_nameUnwrapped),\n fusesSets: many(subgraph_fusesSet),\n expiryExtendeds: many(subgraph_expiryExtended),\n}));\n\n/**\n * Account\n */\n\nexport const subgraph_account = onchainTable(\"subgraph_accounts\", (t) => ({\n id: t.hex().primaryKey(),\n}));\n\nexport const subgraph_accountRelations = relations(subgraph_account, ({ many }) => ({\n domains: many(subgraph_domain),\n wrappedDomains: many(subgraph_wrappedDomain),\n registrations: many(subgraph_registration),\n}));\n\n/**\n * Resolver\n */\n\nexport const subgraph_resolver = onchainTable(\n \"subgraph_resolvers\",\n (t) => ({\n // The unique identifier for this resolver, which is a concatenation of the domain namehash and the resolver address\n id: t.text().primaryKey(),\n // The domain that this resolver is associated with\n domainId: t.hex().notNull(),\n // The address of the resolver contract\n address: t.hex().notNull().$type<Address>(),\n\n // The current value of the 'addr' record for this resolver, as determined by the associated events\n addrId: t.hex(),\n // The content hash for this resolver, in binary format\n contentHash: t.text(),\n // The set of observed text record keys for this resolver\n // NOTE: we avoid .notNull.default([]) to match subgraph behavior\n texts: t.text().array(),\n // The set of observed SLIP-44 coin types for this resolver\n // NOTE: we avoid .notNull.default([]) to match subgraph behavior\n coinTypes: t.bigint().array(),\n }),\n (t) => ({\n byDomainId: index().on(t.domainId),\n }),\n);\n\nexport const subgraph_resolverRelations = relations(subgraph_resolver, ({ one, many }) => ({\n addr: one(subgraph_account, {\n fields: [subgraph_resolver.addrId],\n references: [subgraph_account.id],\n }),\n domain: one(subgraph_domain, {\n fields: [subgraph_resolver.domainId],\n references: [subgraph_domain.id],\n }),\n\n // event relations\n addrChangeds: many(subgraph_addrChanged),\n multicoinAddrChangeds: many(subgraph_multicoinAddrChanged),\n nameChangeds: many(subgraph_nameChanged),\n abiChangeds: many(subgraph_abiChanged),\n pubkeyChangeds: many(subgraph_pubkeyChanged),\n textChangeds: many(subgraph_textChanged),\n contenthashChangeds: many(subgraph_contenthashChanged),\n interfaceChangeds: many(subgraph_interfaceChanged),\n authorisationChangeds: many(subgraph_authorisationChanged),\n versionChangeds: many(subgraph_versionChanged),\n}));\n\n/**\n * Registration\n */\n\nexport const subgraph_registration = onchainTable(\n \"subgraph_registrations\",\n (t) => ({\n // The unique identifier of the registration\n id: t.hex().primaryKey(),\n // The domain name associated with the registration\n domainId: t.hex().notNull(),\n // The registration date of the domain\n registrationDate: t.bigint().notNull(),\n // The expiry date of the domain\n expiryDate: t.bigint().notNull(),\n // The cost associated with the domain registration\n cost: t.bigint(),\n // The account that registered the domain\n registrantId: t.hex().notNull(),\n /**\n * The Label associated with the domain registration.\n *\n * If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:\n * a) null, in the case of the root Node or a Domain whose label is subgraph-unindexable, or\n * b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).\n *\n * @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation\n *\n * Otherwise, this value is guaranteed to be an Interpreted Label which is either:\n * a) a normalized Label, or\n * b) in the case of an Unnormalized Label, an Encoded LabelHash of the Literal Label value found onchain.\n *\n * Note that the type of the column will remain string | null, for legacy subgraph compatibility.\n * In practice however, because there is no Registration entity for the root Node (the only Node\n * with a null labelName) this field will never be null.\n *\n * @see https://ensnode.io/docs/reference/terminology#interpreted-label\n */\n labelName: t.text(),\n }),\n (t) => ({\n byDomainId: index().on(t.domainId),\n byRegistrationDate: index().on(t.registrationDate),\n }),\n);\n\nexport const subgraph_registrationRelations = relations(subgraph_registration, ({ one, many }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_registration.domainId],\n references: [subgraph_domain.id],\n }),\n registrant: one(subgraph_account, {\n fields: [subgraph_registration.registrantId],\n references: [subgraph_account.id],\n }),\n\n // event relations\n nameRegistereds: many(subgraph_nameRegistered),\n nameReneweds: many(subgraph_nameRenewed),\n nameTransferreds: many(subgraph_nameTransferred),\n}));\n\n/**\n * Wrapped Domain\n */\n\nexport const subgraph_wrappedDomain = onchainTable(\n \"subgraph_wrapped_domains\",\n (t) => ({\n // The unique identifier for each instance of the WrappedDomain entity\n id: t.hex().primaryKey(),\n // The domain that is wrapped by this WrappedDomain\n domainId: t.hex().notNull(),\n // The expiry date of the wrapped domain\n expiryDate: t.bigint().notNull(),\n // The number of fuses remaining on the wrapped domain\n fuses: t.integer().notNull(),\n // The account that owns this WrappedDomain\n ownerId: t.hex().notNull(),\n /**\n * The Name that this WrappedDomain represents. Names are emitted by the NameWrapper contract as\n * DNS-Encoded Names which may be malformed, which will result in this field being `null`.\n *\n * If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:\n * a) null (in the case of a DNS-Encoded Name that is malformed or contains subgraph-unindexable labels), or\n * b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).\n *\n * @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation\n *\n * Otherwise, this value is guaranteed to be either:\n * a) null (in the case of a malformed DNS-Encoded Name),\n * b) an Interpreted Name.\n *\n * @see https://ensnode.io/docs/reference/terminology#interpreted-name\n */\n name: t.text(),\n }),\n (t) => ({\n byDomainId: index().on(t.domainId),\n }),\n);\n\nexport const subgraph_wrappedDomainRelations = relations(subgraph_wrappedDomain, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_wrappedDomain.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_wrappedDomain.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\n/**\n * Events\n */\n\nconst sharedEventColumns = (t: any) => ({\n id: t.text().primaryKey(),\n blockNumber: t.integer().notNull(),\n transactionID: t.hex().notNull(),\n});\n\nconst domainEvent = (t: any) => ({\n ...sharedEventColumns(t),\n domainId: t.hex().notNull(),\n});\n\nconst domainEventIndex = (t: any) => ({\n // primary reverse lookup\n idx: index().on(t.domainId),\n // sorting index\n idx_compound: index().on(t.domainId, t.id),\n});\n\n// Domain Event Entities\n\nexport const subgraph_transfer = onchainTable(\n \"subgraph_transfers\",\n (t) => ({\n ...domainEvent(t),\n ownerId: t.hex().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_newOwner = onchainTable(\n \"subgraph_new_owners\",\n (t) => ({\n ...domainEvent(t),\n ownerId: t.hex().notNull(),\n parentDomainId: t.hex().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_newResolver = onchainTable(\n \"subgraph_new_resolvers\",\n (t) => ({\n ...domainEvent(t),\n resolverId: t.text().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_newTTL = onchainTable(\n \"subgraph_new_ttls\",\n (t) => ({\n ...domainEvent(t),\n ttl: t.bigint().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_wrappedTransfer = onchainTable(\n \"subgraph_wrapped_transfers\",\n (t) => ({\n ...domainEvent(t),\n ownerId: t.hex().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_nameWrapped = onchainTable(\n \"subgraph_name_wrapped\",\n (t) => ({\n ...domainEvent(t),\n name: t.text(),\n fuses: t.integer().notNull(),\n ownerId: t.hex().notNull(),\n expiryDate: t.bigint().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_nameUnwrapped = onchainTable(\n \"subgraph_name_unwrapped\",\n (t) => ({\n ...domainEvent(t),\n ownerId: t.hex().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_fusesSet = onchainTable(\n \"subgraph_fuses_set\",\n (t) => ({\n ...domainEvent(t),\n fuses: t.integer().notNull(),\n }),\n domainEventIndex,\n);\n\nexport const subgraph_expiryExtended = onchainTable(\n \"subgraph_expiry_extended\",\n (t) => ({\n ...domainEvent(t),\n expiryDate: t.bigint().notNull(),\n }),\n domainEventIndex,\n);\n\n// Registration Event Entities\n\nconst registrationEvent = (t: any) => ({\n ...sharedEventColumns(t),\n registrationId: t.hex().notNull(),\n});\n\nconst registrationEventIndex = (t: any) => ({\n // primary reverse lookup\n idx: index().on(t.registrationId),\n // sorting index\n idx_compound: index().on(t.registrationId, t.id),\n});\n\nexport const subgraph_nameRegistered = onchainTable(\n \"subgraph_name_registered\",\n (t) => ({\n ...registrationEvent(t),\n registrantId: t.hex().notNull(),\n expiryDate: t.bigint().notNull(),\n }),\n registrationEventIndex,\n);\n\nexport const subgraph_nameRenewed = onchainTable(\n \"subgraph_name_renewed\",\n (t) => ({\n ...registrationEvent(t),\n expiryDate: t.bigint().notNull(),\n }),\n registrationEventIndex,\n);\n\nexport const subgraph_nameTransferred = onchainTable(\n \"subgraph_name_transferred\",\n (t) => ({\n ...registrationEvent(t),\n newOwnerId: t.hex().notNull(),\n }),\n registrationEventIndex,\n);\n\n// Resolver Event Entities\n\nconst resolverEvent = (t: any) => ({\n ...sharedEventColumns(t),\n resolverId: t.text().notNull(),\n});\n\nconst resolverEventIndex = (t: any) => ({\n // primary reverse lookup\n idx: index().on(t.resolverId),\n // sorting index\n idx_compound: index().on(t.resolverId, t.id),\n});\n\nexport const subgraph_addrChanged = onchainTable(\n \"subgraph_addr_changed\",\n (t) => ({\n ...resolverEvent(t),\n addrId: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_multicoinAddrChanged = onchainTable(\n \"subgraph_multicoin_addr_changed\",\n (t) => ({\n ...resolverEvent(t),\n coinType: t.bigint().notNull(),\n addr: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_nameChanged = onchainTable(\n \"subgraph_name_changed\",\n (t) => ({\n ...resolverEvent(t),\n name: t.text().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_abiChanged = onchainTable(\n \"subgraph_abi_changed\",\n (t) => ({\n ...resolverEvent(t),\n contentType: t.bigint().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_pubkeyChanged = onchainTable(\n \"subgraph_pubkey_changed\",\n (t) => ({\n ...resolverEvent(t),\n x: t.hex().notNull(),\n y: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_textChanged = onchainTable(\n \"subgraph_text_changed\",\n (t) => ({\n ...resolverEvent(t),\n key: t.text().notNull(),\n value: t.text(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_contenthashChanged = onchainTable(\n \"subgraph_contenthash_changed\",\n (t) => ({\n ...resolverEvent(t),\n hash: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_interfaceChanged = onchainTable(\n \"subgraph_interface_changed\",\n (t) => ({\n ...resolverEvent(t),\n interfaceID: t.hex().notNull(),\n implementer: t.hex().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_authorisationChanged = onchainTable(\n \"subgraph_authorisation_changed\",\n (t) => ({\n ...resolverEvent(t),\n owner: t.hex().notNull(),\n target: t.hex().notNull(),\n isAuthorized: t.boolean().notNull(),\n }),\n resolverEventIndex,\n);\n\nexport const subgraph_versionChanged = onchainTable(\n \"subgraph_version_changed\",\n (t) => ({\n ...resolverEvent(t),\n version: t.bigint().notNull(),\n }),\n resolverEventIndex,\n);\n\n/**\n * Event Relations\n */\n\n// Domain Event Relations\n\nexport const subgraph_transferRelations = relations(subgraph_transfer, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_transfer.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_transfer.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_newOwnerRelations = relations(subgraph_newOwner, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_newOwner.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_newOwner.ownerId],\n references: [subgraph_account.id],\n }),\n parentDomain: one(subgraph_domain, {\n fields: [subgraph_newOwner.parentDomainId],\n references: [subgraph_domain.id],\n }),\n}));\n\nexport const subgraph_newResolverRelations = relations(subgraph_newResolver, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_newResolver.domainId],\n references: [subgraph_domain.id],\n }),\n resolver: one(subgraph_resolver, {\n fields: [subgraph_newResolver.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_newTTLRelations = relations(subgraph_newTTL, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_newTTL.domainId],\n references: [subgraph_domain.id],\n }),\n}));\n\nexport const subgraph_wrappedTransferRelations = relations(subgraph_wrappedTransfer, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_wrappedTransfer.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_wrappedTransfer.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_nameWrappedRelations = relations(subgraph_nameWrapped, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_nameWrapped.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_nameWrapped.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_nameUnwrappedRelations = relations(subgraph_nameUnwrapped, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_nameUnwrapped.domainId],\n references: [subgraph_domain.id],\n }),\n owner: one(subgraph_account, {\n fields: [subgraph_nameUnwrapped.ownerId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_fusesSetRelations = relations(subgraph_fusesSet, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_fusesSet.domainId],\n references: [subgraph_domain.id],\n }),\n}));\n\nexport const subgraph_expiryExtendedRelations = relations(subgraph_expiryExtended, ({ one }) => ({\n domain: one(subgraph_domain, {\n fields: [subgraph_expiryExtended.domainId],\n references: [subgraph_domain.id],\n }),\n}));\n\n// Registration Event Relations\n\nexport const subgraph_nameRegisteredRelations = relations(subgraph_nameRegistered, ({ one }) => ({\n registration: one(subgraph_registration, {\n fields: [subgraph_nameRegistered.registrationId],\n references: [subgraph_registration.id],\n }),\n registrant: one(subgraph_account, {\n fields: [subgraph_nameRegistered.registrantId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_nameRenewedRelations = relations(subgraph_nameRenewed, ({ one }) => ({\n registration: one(subgraph_registration, {\n fields: [subgraph_nameRenewed.registrationId],\n references: [subgraph_registration.id],\n }),\n}));\n\nexport const subgraph_nameTransferredRelations = relations(subgraph_nameTransferred, ({ one }) => ({\n registration: one(subgraph_registration, {\n fields: [subgraph_nameTransferred.registrationId],\n references: [subgraph_registration.id],\n }),\n newOwner: one(subgraph_account, {\n fields: [subgraph_nameTransferred.newOwnerId],\n references: [subgraph_account.id],\n }),\n}));\n\n// Resolver Event Relations\n\nexport const subgraph_addrChangedRelations = relations(subgraph_addrChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_addrChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n addr: one(subgraph_account, {\n fields: [subgraph_addrChanged.addrId],\n references: [subgraph_account.id],\n }),\n}));\n\nexport const subgraph_multicoinAddrChangedRelations = relations(\n subgraph_multicoinAddrChanged,\n ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_multicoinAddrChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n }),\n);\n\nexport const subgraph_nameChangedRelations = relations(subgraph_nameChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_nameChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_abiChangedRelations = relations(subgraph_abiChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_abiChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_pubkeyChangedRelations = relations(subgraph_pubkeyChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_pubkeyChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_textChangedRelations = relations(subgraph_textChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_textChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n\nexport const subgraph_contenthashChangedRelations = relations(\n subgraph_contenthashChanged,\n ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_contenthashChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n }),\n);\n\nexport const subgraph_interfaceChangedRelations = relations(\n subgraph_interfaceChanged,\n ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_interfaceChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n }),\n);\n\nexport const subgraph_authorisationChangedRelations = relations(\n subgraph_authorisationChanged,\n ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_authorisationChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n }),\n);\n\nexport const subgraph_versionChangedRelations = relations(subgraph_versionChanged, ({ one }) => ({\n resolver: one(subgraph_resolver, {\n fields: [subgraph_versionChanged.resolverId],\n references: [subgraph_resolver.id],\n }),\n}));\n","// https://github.com/drizzle-team/drizzle-orm/issues/638\nexport function monkeypatchCollate(col: any, collation: string) {\n col.getSQLType = function (this: any) {\n return `${Object.getPrototypeOf(this).getSQLType.call(this)} COLLATE ${collation}`;\n };\n return col;\n}\n","import { index, onchainTable } from \"ponder\";\n\nexport const nameSales = onchainTable(\n \"name_sales\",\n (t) => ({\n /**\n * Unique and deterministic identifier of the onchain event associated with the sale.\n *\n * Composite key format: \"{chainId}-{blockNumber}-{logIndex}\" (e.g., \"1-1234567-5\")\n */\n id: t.text().primaryKey(),\n\n /**\n * The chain where the sale occurred.\n */\n chainId: t.integer().notNull(),\n\n /**\n * The block number on chainId where the sale occurred.\n */\n blockNumber: t.bigint().notNull(),\n\n /**\n * The log index position of the sale event within blockNumber.\n */\n logIndex: t.integer().notNull(),\n\n /**\n * The EVM transaction hash on chainId associated with the sale.\n */\n transactionHash: t.hex().notNull(),\n\n /**\n * The Seaport order hash.\n */\n orderHash: t.hex().notNull(),\n\n /**\n * The address of the contract on chainId that manages tokenId.\n */\n contractAddress: t.hex().notNull(),\n\n /**\n * The tokenId managed by contractAddress that was sold.\n *\n * In a general context (outside of TokenScope) ERC1155 NFTs may have\n * multiple copies, however TokenScope guarantees that all indexed NFTs\n * never have an amount / balance > 1.\n */\n tokenId: t.bigint().notNull(),\n\n /**\n * The CAIP-19 Asset Namespace of the token that was sold. Either `erc721` or `erc1155`.\n *\n * @see https://chainagnostic.org/CAIPs/caip-19\n */\n assetNamespace: t.text().notNull(),\n\n /**\n * The CAIP-19 Asset ID of token that was sold. This is a globally unique reference to the\n * specific asset in question.\n *\n * @see https://chainagnostic.org/CAIPs/caip-19\n */\n assetId: t.text().notNull(),\n\n /**\n * The namehash (Node) of the ENS domain that was sold.\n */\n domainId: t.hex().notNull(),\n\n /**\n * The account that bought the token controlling ownership of domainId from\n * the seller for the amount of currency associated with the sale.\n */\n buyer: t.hex().notNull(),\n\n /**\n * The account that sold the token controlling ownership of domainId to\n * buyer for the amount of currency associated with the sale.\n */\n seller: t.hex().notNull(),\n\n /**\n * Currency of the payment (ETH, USDC or DAI) from buyer to seller in exchange for tokenId.\n */\n currency: t.text().notNull(),\n\n /**\n * The amount of currency paid from buyer to seller in exchange for tokenId.\n *\n * Denominated in the smallest unit of currency.\n *\n * Amount interpretation depends on currency:\n * - ETH/WETH: Amount in wei (1 ETH = 10^18 wei)\n * - USDC: Amount in micro-units (1 USDC = 10^6 units)\n * - DAI: Amount in wei-equivalent (1 DAI = 10^18 units)\n */\n amount: t.bigint().notNull(),\n\n /**\n * Unix timestamp of the block timestamp when the sale occurred.\n */\n timestamp: t.bigint().notNull(),\n }),\n (t) => ({\n idx_domainId: index().on(t.domainId),\n idx_assetId: index().on(t.assetId),\n idx_buyer: index().on(t.buyer),\n idx_seller: index().on(t.seller),\n idx_timestamp: index().on(t.timestamp),\n }),\n);\n\nexport const nameTokens = onchainTable(\n \"name_tokens\",\n (t) => ({\n /**\n * The CAIP-19 Asset ID of the token.\n *\n * This is a globally unique reference to the token.\n *\n * @see https://chainagnostic.org/CAIPs/caip-19\n */\n id: t.text().primaryKey(),\n\n /**\n * The namehash (Node) of the ENS name associated with the token.\n *\n * Note: An ENS name may have more than one distinct token across time. It is\n * also possible for multiple distinct tokens for an ENS name to have\n * a mintStatus of `minted` at the same time. For example:\n * - When a direct subname of .eth is wrapped by the NameWrapper. This state\n * has one minted token for the name managed by the BaseRegistrar (this\n * token will be owned by the NameWrapper) and another minted token for\n * the name managed by the NameWrapper (owned by the effective owner of\n * the name).\n * - When a direct subname of .eth is wrapped by the NameWrapper and then\n * unwrapped. This state has one minted token (managed by the BaseRegistrar)\n * and another burned token (managed by the NameWrapper).\n */\n domainId: t.hex().notNull(),\n\n /**\n * The chain that manages the token.\n */\n chainId: t.integer().notNull(),\n\n /**\n * The address of the contract on chainId that manages the token.\n */\n contractAddress: t.hex().notNull(),\n\n /**\n * The tokenId of the token managed by contractAddress.\n *\n * In a general context (outside of TokenScope) ERC1155 NFTs may have\n * multiple copies, however TokenScope guarantees that all indexed NFTs\n * never have an amount / balance > 1.\n */\n tokenId: t.bigint().notNull(),\n\n /**\n * The CAIP-19 Asset Namespace of the token. Either `erc721` or `erc1155`.\n *\n * @see https://chainagnostic.org/CAIPs/caip-19\n */\n assetNamespace: t.text().notNull(),\n\n /**\n * The account that owns the token.\n *\n * Value is zeroAddress if and only if mintStatus is `burned`.\n *\n * Note: The owner of the token for a given domainId may differ from the\n * owner of the associated node in the registry. For example:\n * - Consider the case where address X owns the ENS name `foo.eth` in\n * both the BaseRegistrar and the Registry. If X sends a request directly\n * to the Registry to transfer ownership to Y, ownership of `foo.eth` will\n * be transferred to Y in the Registry but not in the BaseRegistrar.\n * - ... for the case above, the BaseRegistrar implements a `reclaim`\n * allowing the owner of the name in the BaseRegistrar to reclaim ownership\n * of the name in the Registry.\n *\n * Note: When a name is wrapped by the NameWrapper, the owner of the token\n * in the BaseRegistrar is the NameWrapper, while a new token for the name is\n * minted by the NameWrapper and owned by the effective owner of the name.\n */\n owner: t.hex().notNull(),\n\n /**\n * The mint status of the token. Either `minted` or `burned`.\n *\n * After we index a NFT we never delete it from our index. Instead, when an\n * indexed NFT is burned onchain we retain its record and update its mint\n * status as `burned`. If a NFT is minted again after it is burned its mint\n * status is updated to `minted`.\n */\n mintStatus: t.text().notNull(),\n }),\n (t) => ({\n idx_domainId: index().on(t.domainId),\n idx_owner: index().on(t.owner),\n }),\n);\n"],"mappings":";AAAA,SAAS,OAAO,aAAa,cAAc,WAAW,mBAAmB;AAyFlE,IAAM,QAAQ,aAAa,UAAU,CAAC,OAAO;AAAA;AAAA,EAElD,IAAI,EAAE,KAAK,EAAE,WAAW;AAAA;AAAA,EAGxB,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAe;AAAA,EAC9C,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAe;AAAA,EAC1C,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAY;AAAA,EACzC,WAAW,EAAE,OAAO,EAAE,QAAQ;AAAA,EAC9B,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAY;AAAA,EAC/C,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAc;AAChD,EAAE;AAMK,IAAM,UAAU,aAAa,YAAY,CAAC,OAAO;AAAA,EACtD,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAe;AAC1C,EAAE;AAEK,IAAM,oBAAoB,UAAU,SAAS,CAAC,EAAE,KAAK,OAAO;AAAA,EACjE,eAAe,KAAK,cAAc,EAAE,cAAc,aAAa,CAAC;AAAA,EAChE,SAAS,KAAK,QAAQ;AAAA,EACtB,aAAa,KAAK,eAAe;AACnC,EAAE;AAMK,IAAM,WAAW;AAAA,EACtB;AAAA,EACA,CAAC,OAAO;AAAA;AAA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AAE,QAAQ;AAAA,EAC/B;AAAA,EACA,CAAC,OAAO;AAAA,IACN,cAAcD,OAAM,EAAE,GAAG,EAAE,QAAQ;AAAA,IACnC,WAAWA,OAAM,EAAE,GAAG,EAAE,KAAK;AAAA,EAC/B;AACF;","names":["onchainTable","relations","uniqueIndex","index","onchainEnum","onchainTable","relations","uniqueIndex","index","onchainTable","relations","onchainTable","index","relations","index","onchainTable"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ensnode/ensnode-schema",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The ponder schema for ENSNode",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,13 +26,14 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"ponder": "0.
|
|
29
|
+
"ponder": "0.16.1",
|
|
30
30
|
"viem": "^2.22.13"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
+
"@ensnode/ensnode-sdk": "",
|
|
33
34
|
"tsup": "^8.3.6",
|
|
34
35
|
"typescript": "^5.7.3",
|
|
35
|
-
"@ensnode/shared-configs": "1.
|
|
36
|
+
"@ensnode/shared-configs": "1.5.0"
|
|
36
37
|
},
|
|
37
38
|
"scripts": {
|
|
38
39
|
"prepublish": "tsup",
|