@ensnode/ensdb-sdk 1.15.2 → 1.17.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.
@@ -1,6 +1,138 @@
1
+ // src/ensindexer-abstract/efp.schema.ts
2
+ import { index, onchainTable } from "ponder";
3
+ var efpLists = onchainTable(
4
+ "efp_lists",
5
+ (t) => ({
6
+ /** ERC-721 token id of the list NFT (a uint256), the list's primary key. */
7
+ id: t.bigint().primaryKey().$type(),
8
+ /** Current ERC-721 owner of the list NFT. */
9
+ owner: t.hex().notNull().$type(),
10
+ /** Chain id of the `ListRegistry` NFT (Base / 8453 on mainnet; the active namespace's EFP deployment chain otherwise). */
11
+ nftChainId: t.int8({ mode: "number" }).notNull().$type(),
12
+ /** `ListRegistry` contract address on `nftChainId`. */
13
+ nftContractAddress: t.hex().notNull().$type(),
14
+ /** Raw `UpdateListStorageLocation` payload. */
15
+ listStorageLocation: t.hex(),
16
+ /** Decoded list storage location: target chain id. */
17
+ listStorageLocationChainId: t.int8({ mode: "number" }).$type(),
18
+ /** Decoded list storage location: target contract address. */
19
+ listStorageLocationContractAddress: t.hex().$type(),
20
+ /** Decoded list storage location: target slot (bytes32). */
21
+ listStorageLocationSlot: t.hex(),
22
+ /** Address allowed to post records to this list (the EFP "user"). */
23
+ user: t.hex().$type(),
24
+ /** Address allowed to administer this list (the EFP "manager"). */
25
+ manager: t.hex().$type(),
26
+ createdAt: t.bigint().notNull().$type(),
27
+ updatedAt: t.bigint().notNull().$type()
28
+ }),
29
+ (t) => ({
30
+ idx_owner: index().on(t.owner),
31
+ idx_user: index().on(t.user),
32
+ idx_manager: index().on(t.manager),
33
+ idx_storageLocation: index().on(
34
+ t.listStorageLocationChainId,
35
+ t.listStorageLocationContractAddress,
36
+ t.listStorageLocationSlot
37
+ )
38
+ // `id` is a `bigint` (Postgres `numeric`) primary key, so its implicit unique index already
39
+ // orders numerically — `efp.lists` / `Account.efp.lists` pagination needs no extra index.
40
+ })
41
+ );
42
+ var efpListStorageLocations = onchainTable("efp_list_storage_locations", (t) => ({
43
+ /** Composite key "chainId-contractAddress-slot". */
44
+ id: t.text().primaryKey(),
45
+ chainId: t.int8({ mode: "number" }).notNull().$type(),
46
+ contractAddress: t.hex().notNull().$type(),
47
+ slot: t.hex().notNull(),
48
+ /**
49
+ * Token id of the list NFT that owns this storage location's reverse mapping. The slot is
50
+ * arbitrary, attacker-settable bytes, so multiple list NFTs can point at the same
51
+ * `(chainId, contract, slot)`; this records the FIRST list to claim it (first writer wins), and
52
+ * the `UpdateListStorageLocation` handler gates every write/delete of this row on that ownership.
53
+ * A consequence: when lists share a slot, only the owner's `EfpListRecord.list` back-ref and
54
+ * `user`/`manager` role routing track that slot.
55
+ */
56
+ tokenId: t.bigint().notNull().$type(),
57
+ updatedAt: t.bigint().notNull().$type()
58
+ }));
59
+ var efpListRecords = onchainTable(
60
+ "efp_list_records",
61
+ (t) => ({
62
+ /** Composite key "chainId-contractAddress-slot-record". */
63
+ id: t.text().primaryKey(),
64
+ chainId: t.int8({ mode: "number" }).notNull().$type(),
65
+ contractAddress: t.hex().notNull().$type(),
66
+ slot: t.hex().notNull(),
67
+ /** Canonical record prefix `version | type | address` (22 bytes). */
68
+ record: t.hex().notNull(),
69
+ /** Decoded record header — version byte. */
70
+ recordVersion: t.integer().notNull(),
71
+ /** Decoded record header — type byte. */
72
+ recordType: t.integer().notNull(),
73
+ /** Decoded record data. Only address records (type 1) are indexed, so exactly a 20-byte address. */
74
+ recordData: t.hex().notNull().$type(),
75
+ /** UTF-8 tags attached to this record (a set; NULL bytes stripped). */
76
+ tags: t.text().array().notNull().default([]),
77
+ createdAt: t.bigint().notNull().$type()
78
+ }),
79
+ (t) => ({
80
+ idx_slot: index().on(t.chainId, t.contractAddress, t.slot),
81
+ idx_recordData: index().on(t.recordData)
82
+ })
83
+ );
84
+ var efpAccountMetadata = onchainTable(
85
+ "efp_account_metadata",
86
+ (t) => ({
87
+ /** Composite key "chainId-address-key". */
88
+ id: t.text().primaryKey(),
89
+ chainId: t.int8({ mode: "number" }).notNull().$type(),
90
+ contractAddress: t.hex().notNull().$type(),
91
+ /** Account whose metadata this is. */
92
+ address: t.hex().notNull().$type(),
93
+ /** Metadata key (UTF-8 string). */
94
+ key: t.text().notNull(),
95
+ /** Metadata value (raw bytes). */
96
+ value: t.hex().notNull(),
97
+ /**
98
+ * For the `primary-list` key only: the decoded token id of the account's primary list (the
99
+ * `value` is `abi.encodePacked(uint256)`, which Postgres can't compare to the numeric
100
+ * `efp_lists.id`). Decoding it at index time makes the validated follower/following social graph
101
+ * a pure SQL join. `null` for any other key, or a malformed `primary-list` value.
102
+ */
103
+ primaryListTokenId: t.bigint().$type(),
104
+ createdAt: t.bigint().notNull().$type(),
105
+ updatedAt: t.bigint().notNull().$type()
106
+ }),
107
+ (t) => ({
108
+ idx_address: index().on(t.address),
109
+ // Account-metadata lookups (primary-list validation, `metadata(key:)`) filter by `(address, key)`;
110
+ // a composite index makes that a point lookup rather than an address-partition scan.
111
+ idx_address_key: index().on(t.address, t.key),
112
+ // The followers join filters lists by `(user, primaryListTokenId)`; index it for the social graph.
113
+ idx_primaryListTokenId: index().on(t.primaryListTokenId)
114
+ })
115
+ );
116
+ var efpListMetadata = onchainTable(
117
+ "efp_list_metadata",
118
+ (t) => ({
119
+ /** Composite key "chainId-contractAddress-slot-key". */
120
+ id: t.text().primaryKey(),
121
+ chainId: t.int8({ mode: "number" }).notNull().$type(),
122
+ contractAddress: t.hex().notNull().$type(),
123
+ slot: t.hex().notNull(),
124
+ key: t.text().notNull(),
125
+ value: t.hex().notNull(),
126
+ createdAt: t.bigint().notNull().$type()
127
+ }),
128
+ (t) => ({
129
+ idx_slot: index().on(t.chainId, t.contractAddress, t.slot)
130
+ })
131
+ );
132
+
1
133
  // src/ensindexer-abstract/migrated-nodes.schema.ts
2
- import { onchainTable, primaryKey } from "ponder";
3
- var migratedNodeByParent = onchainTable(
134
+ import { onchainTable as onchainTable2, primaryKey } from "ponder";
135
+ var migratedNodeByParent = onchainTable2(
4
136
  "migrated_nodes_by_parent",
5
137
  (t) => ({
6
138
  // keyed by (parentNode, labelHash)
@@ -11,17 +143,19 @@ var migratedNodeByParent = onchainTable(
11
143
  pk: primaryKey({ columns: [t.parentNode, t.labelHash] })
12
144
  })
13
145
  );
14
- var migratedNodeByNode = onchainTable("migrated_nodes_by_node", (t) => ({
146
+ var migratedNodeByNode = onchainTable2("migrated_nodes_by_node", (t) => ({
15
147
  node: t.hex().primaryKey().$type()
16
148
  }));
17
149
 
18
150
  // src/ensindexer-abstract/protocol-acceleration.schema.ts
19
- import { index, onchainTable as onchainTable2, primaryKey as primaryKey2, relations, uniqueIndex } from "ponder";
20
- var reverseNameRecord = onchainTable2(
151
+ import { index as index2, onchainTable as onchainTable3, primaryKey as primaryKey2, relations, uniqueIndex } from "ponder";
152
+ var reverseNameRecord = onchainTable3(
21
153
  "reverse_name_records",
22
154
  (t) => ({
23
155
  // keyed by (address, coinType)
24
156
  address: t.hex().notNull().$type(),
157
+ // @TODO(cointype-bigint): store as `t.int8({ mode: "number" }).$type<CoinType>()` (like chainId
158
+ // elsewhere) so reads/writes use CoinType directly without bigint round-trips. See #2293.
25
159
  coinType: t.bigint().notNull(),
26
160
  /**
27
161
  * Represents the ENSIP-19 Reverse Name Record for a given (address, coinType).
@@ -34,7 +168,7 @@ var reverseNameRecord = onchainTable2(
34
168
  pk: primaryKey2({ columns: [t.address, t.coinType] })
35
169
  })
36
170
  );
37
- var domainResolverRelation = onchainTable2(
171
+ var domainResolverRelation = onchainTable3(
38
172
  "domain_resolver_relations",
39
173
  (t) => ({
40
174
  // keyed by (chainId, address, node)
@@ -47,7 +181,7 @@ var domainResolverRelation = onchainTable2(
47
181
  }),
48
182
  (t) => ({
49
183
  pk: primaryKey2({ columns: [t.chainId, t.address, t.domainId] }),
50
- byDomain: index().on(t.domainId)
184
+ byDomain: index2().on(t.domainId)
51
185
  })
52
186
  );
53
187
  var domainResolverRelation_relations = relations(domainResolverRelation, ({ one }) => ({
@@ -56,7 +190,7 @@ var domainResolverRelation_relations = relations(domainResolverRelation, ({ one
56
190
  references: [resolver.chainId, resolver.address]
57
191
  })
58
192
  }));
59
- var resolver = onchainTable2(
193
+ var resolver = onchainTable3(
60
194
  "resolvers",
61
195
  (t) => ({
62
196
  // keyed by (chainId, address)
@@ -77,7 +211,7 @@ var resolver = onchainTable2(
77
211
  var resolver_relations = relations(resolver, ({ many }) => ({
78
212
  records: many(resolverRecords)
79
213
  }));
80
- var resolverRecords = onchainTable2(
214
+ var resolverRecords = onchainTable3(
81
215
  "resolver_records",
82
216
  (t) => ({
83
217
  // keyed by (chainId, resolver, node)
@@ -128,7 +262,7 @@ var resolverRecords_relations = relations(resolverRecords, ({ one, many }) => ({
128
262
  // resolverRecord has many text records
129
263
  textRecords: many(resolverTextRecord)
130
264
  }));
131
- var resolverAddressRecord = onchainTable2(
265
+ var resolverAddressRecord = onchainTable3(
132
266
  "resolver_address_records",
133
267
  (t) => ({
134
268
  // keyed by ((chainId, resolver, node), coinType)
@@ -137,6 +271,8 @@ var resolverAddressRecord = onchainTable2(
137
271
  node: t.hex().notNull().$type(),
138
272
  // NOTE: all well-known CoinTypes fit into javascript number but NOT postgres .integer, must be
139
273
  // stored as BigInt
274
+ // @TODO(cointype-bigint): use `t.int8({ mode: "number" }).$type<CoinType>()` like `chainId` above
275
+ // to drop bigint round-trips at every read/write boundary. See #2293.
140
276
  coinType: t.bigint().notNull(),
141
277
  /**
142
278
  * Represents the value of the Address Record specified by ((chainId, resolver, node), coinType).
@@ -147,7 +283,12 @@ var resolverAddressRecord = onchainTable2(
147
283
  value: t.hex().notNull()
148
284
  }),
149
285
  (t) => ({
150
- pk: primaryKey2({ columns: [t.chainId, t.address, t.node, t.coinType] })
286
+ pk: primaryKey2({ columns: [t.chainId, t.address, t.node, t.coinType] }),
287
+ // supports the reverse lookup powering `Account.nameReferences`:
288
+ // `WHERE value = <address> [AND coin_type = <coinType>] ORDER BY (node, coinType, chainId, address)`.
289
+ // The `value` prefix seeks the filter; the remaining columns match the keyset ORDER BY tuple so
290
+ // rows are yielded already sorted, letting pagination range-scan to the cursor instead of sorting.
291
+ byValueKeyset: index2().on(t.value, t.node, t.coinType, t.chainId, t.address)
151
292
  })
152
293
  );
153
294
  var resolverAddressRecordRelations = relations(resolverAddressRecord, ({ one }) => ({
@@ -161,7 +302,7 @@ var resolverAddressRecordRelations = relations(resolverAddressRecord, ({ one })
161
302
  references: [resolverRecords.chainId, resolverRecords.address, resolverRecords.node]
162
303
  })
163
304
  }));
164
- var resolverTextRecord = onchainTable2(
305
+ var resolverTextRecord = onchainTable3(
165
306
  "resolver_text_records",
166
307
  (t) => ({
167
308
  // keyed by ((chainId, resolver, node), key)
@@ -190,8 +331,8 @@ var resolverTextRecordRelations = relations(resolverTextRecord, ({ one }) => ({
190
331
  }));
191
332
 
192
333
  // src/ensindexer-abstract/registrars.schema.ts
193
- import { index as index2, onchainEnum, onchainTable as onchainTable3, relations as relations2, uniqueIndex as uniqueIndex2 } from "ponder";
194
- var subregistries = onchainTable3(
334
+ import { index as index3, onchainEnum, onchainTable as onchainTable4, relations as relations2, uniqueIndex as uniqueIndex2 } from "ponder";
335
+ var subregistries = onchainTable4(
195
336
  "subregistries",
196
337
  (t) => ({
197
338
  /**
@@ -221,7 +362,7 @@ var subregistries = onchainTable3(
221
362
  uniqueNode: uniqueIndex2().on(t.node)
222
363
  })
223
364
  );
224
- var registrationLifecycles = onchainTable3(
365
+ var registrationLifecycles = onchainTable4(
225
366
  "registration_lifecycles",
226
367
  (t) => ({
227
368
  /**
@@ -254,14 +395,14 @@ var registrationLifecycles = onchainTable3(
254
395
  expiresAt: t.bigint().notNull()
255
396
  }),
256
397
  (t) => ({
257
- bySubregistry: index2().on(t.subregistryId)
398
+ bySubregistry: index3().on(t.subregistryId)
258
399
  })
259
400
  );
260
401
  var registrarActionType = onchainEnum("registrar_action_type", [
261
402
  "registration",
262
403
  "renewal"
263
404
  ]);
264
- var registrarActions = onchainTable3(
405
+ var registrarActions = onchainTable4(
265
406
  "registrar_actions",
266
407
  (t) => ({
267
408
  /**
@@ -510,15 +651,15 @@ var registrarActions = onchainTable3(
510
651
  eventIds: t.text().array().notNull()
511
652
  }),
512
653
  (t) => ({
513
- byDecodedReferrer: index2().on(t.decodedReferrer),
514
- byTimestamp: index2().on(t.timestamp)
654
+ byDecodedReferrer: index3().on(t.decodedReferrer),
655
+ byTimestamp: index3().on(t.timestamp)
515
656
  })
516
657
  );
517
658
  var internal_registrarActionMetadataType = onchainEnum(
518
659
  "_ensindexer_registrar_action_metadata_type",
519
660
  ["CURRENT_LOGICAL_REGISTRAR_ACTION"]
520
661
  );
521
- var internal_registrarActionMetadata = onchainTable3(
662
+ var internal_registrarActionMetadata = onchainTable4(
522
663
  "_ensindexer_registrar_action_metadata",
523
664
  (t) => ({
524
665
  /**
@@ -567,7 +708,7 @@ var registrarActionRelations = relations2(registrarActions, ({ one }) => ({
567
708
  }));
568
709
 
569
710
  // src/ensindexer-abstract/subgraph.schema.ts
570
- import { index as index3, onchainTable as onchainTable4, relations as relations3, sql } from "ponder";
711
+ import { index as index4, onchainTable as onchainTable5, relations as relations3, sql } from "ponder";
571
712
 
572
713
  // src/lib/collate.ts
573
714
  function monkeypatchCollate(col, collation) {
@@ -578,7 +719,7 @@ function monkeypatchCollate(col, collation) {
578
719
  }
579
720
 
580
721
  // src/ensindexer-abstract/subgraph.schema.ts
581
- var subgraph_domain = onchainTable4(
722
+ var subgraph_domain = onchainTable5(
582
723
  "subgraph_domains",
583
724
  (t) => ({
584
725
  // The namehash of the name
@@ -648,17 +789,17 @@ var subgraph_domain = onchainTable4(
648
789
  }),
649
790
  (t) => ({
650
791
  // uses a hash index because some name values exceed the btree max row size (8191 bytes)
651
- byExactName: index3().using("hash", t.name),
792
+ byExactName: index4().using("hash", t.name),
652
793
  // GIN trigram index for partial-match filters (_contains, _starts_with, _ends_with).
653
794
  // (inline `gin_trgm_ops` via `sql` because passing it through `.op()` gets dropped by Ponder,
654
795
  // producing `USING gin (name)` with no opclass)
655
- byFuzzyName: index3().using("gin", sql`${t.name} gin_trgm_ops`),
656
- byLabelhash: index3().on(t.labelhash),
657
- byParentId: index3().on(t.parentId),
658
- byOwnerId: index3().on(t.ownerId),
659
- byRegistrantId: index3().on(t.registrantId),
660
- byWrappedOwnerId: index3().on(t.wrappedOwnerId),
661
- byResolvedAddressId: index3().on(t.resolvedAddressId)
796
+ byFuzzyName: index4().using("gin", sql`${t.name} gin_trgm_ops`),
797
+ byLabelhash: index4().on(t.labelhash),
798
+ byParentId: index4().on(t.parentId),
799
+ byOwnerId: index4().on(t.ownerId),
800
+ byRegistrantId: index4().on(t.registrantId),
801
+ byWrappedOwnerId: index4().on(t.wrappedOwnerId),
802
+ byResolvedAddressId: index4().on(t.resolvedAddressId)
662
803
  })
663
804
  );
664
805
  monkeypatchCollate(subgraph_domain.name, '"C"');
@@ -708,7 +849,7 @@ var subgraph_domainRelations = relations3(subgraph_domain, ({ one, many }) => ({
708
849
  fusesSets: many(subgraph_fusesSet),
709
850
  expiryExtendeds: many(subgraph_expiryExtended)
710
851
  }));
711
- var subgraph_account = onchainTable4("subgraph_accounts", (t) => ({
852
+ var subgraph_account = onchainTable5("subgraph_accounts", (t) => ({
712
853
  id: t.hex().primaryKey()
713
854
  }));
714
855
  var subgraph_accountRelations = relations3(subgraph_account, ({ many }) => ({
@@ -716,7 +857,7 @@ var subgraph_accountRelations = relations3(subgraph_account, ({ many }) => ({
716
857
  wrappedDomains: many(subgraph_wrappedDomain),
717
858
  registrations: many(subgraph_registration)
718
859
  }));
719
- var subgraph_resolver = onchainTable4(
860
+ var subgraph_resolver = onchainTable5(
720
861
  "subgraph_resolvers",
721
862
  (t) => ({
722
863
  // The unique identifier for this resolver, which is a concatenation of the domain namehash and the resolver address
@@ -737,7 +878,7 @@ var subgraph_resolver = onchainTable4(
737
878
  coinTypes: t.bigint().array()
738
879
  }),
739
880
  (t) => ({
740
- byDomainId: index3().on(t.domainId)
881
+ byDomainId: index4().on(t.domainId)
741
882
  })
742
883
  );
743
884
  var subgraph_resolverRelations = relations3(subgraph_resolver, ({ one, many }) => ({
@@ -761,7 +902,7 @@ var subgraph_resolverRelations = relations3(subgraph_resolver, ({ one, many }) =
761
902
  authorisationChangeds: many(subgraph_authorisationChanged),
762
903
  versionChangeds: many(subgraph_versionChanged)
763
904
  }));
764
- var subgraph_registration = onchainTable4(
905
+ var subgraph_registration = onchainTable5(
765
906
  "subgraph_registrations",
766
907
  (t) => ({
767
908
  // The unique identifier of the registration
@@ -798,9 +939,9 @@ var subgraph_registration = onchainTable4(
798
939
  labelName: t.text()
799
940
  }),
800
941
  (t) => ({
801
- byDomainId: index3().on(t.domainId),
802
- byRegistrationDate: index3().on(t.registrationDate),
803
- byExpiryDate: index3().on(t.expiryDate)
942
+ byDomainId: index4().on(t.domainId),
943
+ byRegistrationDate: index4().on(t.registrationDate),
944
+ byExpiryDate: index4().on(t.expiryDate)
804
945
  })
805
946
  );
806
947
  var subgraph_registrationRelations = relations3(subgraph_registration, ({ one, many }) => ({
@@ -817,7 +958,7 @@ var subgraph_registrationRelations = relations3(subgraph_registration, ({ one, m
817
958
  nameReneweds: many(subgraph_nameRenewed),
818
959
  nameTransferreds: many(subgraph_nameTransferred)
819
960
  }));
820
- var subgraph_wrappedDomain = onchainTable4(
961
+ var subgraph_wrappedDomain = onchainTable5(
821
962
  "subgraph_wrapped_domains",
822
963
  (t) => ({
823
964
  // The unique identifier for each instance of the WrappedDomain entity
@@ -849,7 +990,7 @@ var subgraph_wrappedDomain = onchainTable4(
849
990
  name: t.text()
850
991
  }),
851
992
  (t) => ({
852
- byDomainId: index3().on(t.domainId)
993
+ byDomainId: index4().on(t.domainId)
853
994
  })
854
995
  );
855
996
  var subgraph_wrappedDomainRelations = relations3(subgraph_wrappedDomain, ({ one }) => ({
@@ -873,11 +1014,11 @@ var domainEvent = (t) => ({
873
1014
  });
874
1015
  var domainEventIndex = (t) => ({
875
1016
  // primary reverse lookup
876
- idx: index3().on(t.domainId),
1017
+ idx: index4().on(t.domainId),
877
1018
  // sorting index
878
- idx_compound: index3().on(t.domainId, t.id)
1019
+ idx_compound: index4().on(t.domainId, t.id)
879
1020
  });
880
- var subgraph_transfer = onchainTable4(
1021
+ var subgraph_transfer = onchainTable5(
881
1022
  "subgraph_transfers",
882
1023
  (t) => ({
883
1024
  ...domainEvent(t),
@@ -885,7 +1026,7 @@ var subgraph_transfer = onchainTable4(
885
1026
  }),
886
1027
  domainEventIndex
887
1028
  );
888
- var subgraph_newOwner = onchainTable4(
1029
+ var subgraph_newOwner = onchainTable5(
889
1030
  "subgraph_new_owners",
890
1031
  (t) => ({
891
1032
  ...domainEvent(t),
@@ -894,7 +1035,7 @@ var subgraph_newOwner = onchainTable4(
894
1035
  }),
895
1036
  domainEventIndex
896
1037
  );
897
- var subgraph_newResolver = onchainTable4(
1038
+ var subgraph_newResolver = onchainTable5(
898
1039
  "subgraph_new_resolvers",
899
1040
  (t) => ({
900
1041
  ...domainEvent(t),
@@ -902,7 +1043,7 @@ var subgraph_newResolver = onchainTable4(
902
1043
  }),
903
1044
  domainEventIndex
904
1045
  );
905
- var subgraph_newTTL = onchainTable4(
1046
+ var subgraph_newTTL = onchainTable5(
906
1047
  "subgraph_new_ttls",
907
1048
  (t) => ({
908
1049
  ...domainEvent(t),
@@ -910,7 +1051,7 @@ var subgraph_newTTL = onchainTable4(
910
1051
  }),
911
1052
  domainEventIndex
912
1053
  );
913
- var subgraph_wrappedTransfer = onchainTable4(
1054
+ var subgraph_wrappedTransfer = onchainTable5(
914
1055
  "subgraph_wrapped_transfers",
915
1056
  (t) => ({
916
1057
  ...domainEvent(t),
@@ -918,7 +1059,7 @@ var subgraph_wrappedTransfer = onchainTable4(
918
1059
  }),
919
1060
  domainEventIndex
920
1061
  );
921
- var subgraph_nameWrapped = onchainTable4(
1062
+ var subgraph_nameWrapped = onchainTable5(
922
1063
  "subgraph_name_wrapped",
923
1064
  (t) => ({
924
1065
  ...domainEvent(t),
@@ -929,7 +1070,7 @@ var subgraph_nameWrapped = onchainTable4(
929
1070
  }),
930
1071
  domainEventIndex
931
1072
  );
932
- var subgraph_nameUnwrapped = onchainTable4(
1073
+ var subgraph_nameUnwrapped = onchainTable5(
933
1074
  "subgraph_name_unwrapped",
934
1075
  (t) => ({
935
1076
  ...domainEvent(t),
@@ -937,7 +1078,7 @@ var subgraph_nameUnwrapped = onchainTable4(
937
1078
  }),
938
1079
  domainEventIndex
939
1080
  );
940
- var subgraph_fusesSet = onchainTable4(
1081
+ var subgraph_fusesSet = onchainTable5(
941
1082
  "subgraph_fuses_set",
942
1083
  (t) => ({
943
1084
  ...domainEvent(t),
@@ -945,7 +1086,7 @@ var subgraph_fusesSet = onchainTable4(
945
1086
  }),
946
1087
  domainEventIndex
947
1088
  );
948
- var subgraph_expiryExtended = onchainTable4(
1089
+ var subgraph_expiryExtended = onchainTable5(
949
1090
  "subgraph_expiry_extended",
950
1091
  (t) => ({
951
1092
  ...domainEvent(t),
@@ -959,11 +1100,11 @@ var registrationEvent = (t) => ({
959
1100
  });
960
1101
  var registrationEventIndex = (t) => ({
961
1102
  // primary reverse lookup
962
- idx: index3().on(t.registrationId),
1103
+ idx: index4().on(t.registrationId),
963
1104
  // sorting index
964
- idx_compound: index3().on(t.registrationId, t.id)
1105
+ idx_compound: index4().on(t.registrationId, t.id)
965
1106
  });
966
- var subgraph_nameRegistered = onchainTable4(
1107
+ var subgraph_nameRegistered = onchainTable5(
967
1108
  "subgraph_name_registered",
968
1109
  (t) => ({
969
1110
  ...registrationEvent(t),
@@ -972,7 +1113,7 @@ var subgraph_nameRegistered = onchainTable4(
972
1113
  }),
973
1114
  registrationEventIndex
974
1115
  );
975
- var subgraph_nameRenewed = onchainTable4(
1116
+ var subgraph_nameRenewed = onchainTable5(
976
1117
  "subgraph_name_renewed",
977
1118
  (t) => ({
978
1119
  ...registrationEvent(t),
@@ -980,7 +1121,7 @@ var subgraph_nameRenewed = onchainTable4(
980
1121
  }),
981
1122
  registrationEventIndex
982
1123
  );
983
- var subgraph_nameTransferred = onchainTable4(
1124
+ var subgraph_nameTransferred = onchainTable5(
984
1125
  "subgraph_name_transferred",
985
1126
  (t) => ({
986
1127
  ...registrationEvent(t),
@@ -994,11 +1135,11 @@ var resolverEvent = (t) => ({
994
1135
  });
995
1136
  var resolverEventIndex = (t) => ({
996
1137
  // primary reverse lookup
997
- idx: index3().on(t.resolverId),
1138
+ idx: index4().on(t.resolverId),
998
1139
  // sorting index
999
- idx_compound: index3().on(t.resolverId, t.id)
1140
+ idx_compound: index4().on(t.resolverId, t.id)
1000
1141
  });
1001
- var subgraph_addrChanged = onchainTable4(
1142
+ var subgraph_addrChanged = onchainTable5(
1002
1143
  "subgraph_addr_changed",
1003
1144
  (t) => ({
1004
1145
  ...resolverEvent(t),
@@ -1006,7 +1147,7 @@ var subgraph_addrChanged = onchainTable4(
1006
1147
  }),
1007
1148
  resolverEventIndex
1008
1149
  );
1009
- var subgraph_multicoinAddrChanged = onchainTable4(
1150
+ var subgraph_multicoinAddrChanged = onchainTable5(
1010
1151
  "subgraph_multicoin_addr_changed",
1011
1152
  (t) => ({
1012
1153
  ...resolverEvent(t),
@@ -1015,7 +1156,7 @@ var subgraph_multicoinAddrChanged = onchainTable4(
1015
1156
  }),
1016
1157
  resolverEventIndex
1017
1158
  );
1018
- var subgraph_nameChanged = onchainTable4(
1159
+ var subgraph_nameChanged = onchainTable5(
1019
1160
  "subgraph_name_changed",
1020
1161
  (t) => ({
1021
1162
  ...resolverEvent(t),
@@ -1023,7 +1164,7 @@ var subgraph_nameChanged = onchainTable4(
1023
1164
  }),
1024
1165
  resolverEventIndex
1025
1166
  );
1026
- var subgraph_abiChanged = onchainTable4(
1167
+ var subgraph_abiChanged = onchainTable5(
1027
1168
  "subgraph_abi_changed",
1028
1169
  (t) => ({
1029
1170
  ...resolverEvent(t),
@@ -1031,7 +1172,7 @@ var subgraph_abiChanged = onchainTable4(
1031
1172
  }),
1032
1173
  resolverEventIndex
1033
1174
  );
1034
- var subgraph_pubkeyChanged = onchainTable4(
1175
+ var subgraph_pubkeyChanged = onchainTable5(
1035
1176
  "subgraph_pubkey_changed",
1036
1177
  (t) => ({
1037
1178
  ...resolverEvent(t),
@@ -1040,7 +1181,7 @@ var subgraph_pubkeyChanged = onchainTable4(
1040
1181
  }),
1041
1182
  resolverEventIndex
1042
1183
  );
1043
- var subgraph_textChanged = onchainTable4(
1184
+ var subgraph_textChanged = onchainTable5(
1044
1185
  "subgraph_text_changed",
1045
1186
  (t) => ({
1046
1187
  ...resolverEvent(t),
@@ -1049,7 +1190,7 @@ var subgraph_textChanged = onchainTable4(
1049
1190
  }),
1050
1191
  resolverEventIndex
1051
1192
  );
1052
- var subgraph_contenthashChanged = onchainTable4(
1193
+ var subgraph_contenthashChanged = onchainTable5(
1053
1194
  "subgraph_contenthash_changed",
1054
1195
  (t) => ({
1055
1196
  ...resolverEvent(t),
@@ -1057,7 +1198,7 @@ var subgraph_contenthashChanged = onchainTable4(
1057
1198
  }),
1058
1199
  resolverEventIndex
1059
1200
  );
1060
- var subgraph_interfaceChanged = onchainTable4(
1201
+ var subgraph_interfaceChanged = onchainTable5(
1061
1202
  "subgraph_interface_changed",
1062
1203
  (t) => ({
1063
1204
  ...resolverEvent(t),
@@ -1066,7 +1207,7 @@ var subgraph_interfaceChanged = onchainTable4(
1066
1207
  }),
1067
1208
  resolverEventIndex
1068
1209
  );
1069
- var subgraph_authorisationChanged = onchainTable4(
1210
+ var subgraph_authorisationChanged = onchainTable5(
1070
1211
  "subgraph_authorisation_changed",
1071
1212
  (t) => ({
1072
1213
  ...resolverEvent(t),
@@ -1076,7 +1217,7 @@ var subgraph_authorisationChanged = onchainTable4(
1076
1217
  }),
1077
1218
  resolverEventIndex
1078
1219
  );
1079
- var subgraph_versionChanged = onchainTable4(
1220
+ var subgraph_versionChanged = onchainTable5(
1080
1221
  "subgraph_version_changed",
1081
1222
  (t) => ({
1082
1223
  ...resolverEvent(t),
@@ -1270,8 +1411,8 @@ var subgraph_versionChangedRelations = relations3(subgraph_versionChanged, ({ on
1270
1411
  }));
1271
1412
 
1272
1413
  // src/ensindexer-abstract/tokenscope.schema.ts
1273
- import { index as index4, onchainTable as onchainTable5 } from "ponder";
1274
- var nameSales = onchainTable5(
1414
+ import { index as index5, onchainTable as onchainTable6 } from "ponder";
1415
+ var nameSales = onchainTable6(
1275
1416
  "name_sales",
1276
1417
  (t) => ({
1277
1418
  /**
@@ -1360,14 +1501,14 @@ var nameSales = onchainTable5(
1360
1501
  timestamp: t.bigint().notNull()
1361
1502
  }),
1362
1503
  (t) => ({
1363
- idx_domainId: index4().on(t.domainId),
1364
- idx_assetId: index4().on(t.assetId),
1365
- idx_buyer: index4().on(t.buyer),
1366
- idx_seller: index4().on(t.seller),
1367
- idx_timestamp: index4().on(t.timestamp)
1504
+ idx_domainId: index5().on(t.domainId),
1505
+ idx_assetId: index5().on(t.assetId),
1506
+ idx_buyer: index5().on(t.buyer),
1507
+ idx_seller: index5().on(t.seller),
1508
+ idx_timestamp: index5().on(t.timestamp)
1368
1509
  })
1369
1510
  );
1370
- var nameTokens = onchainTable5(
1511
+ var nameTokens = onchainTable6(
1371
1512
  "name_tokens",
1372
1513
  (t) => ({
1373
1514
  /**
@@ -1447,14 +1588,14 @@ var nameTokens = onchainTable5(
1447
1588
  mintStatus: t.text().notNull()
1448
1589
  }),
1449
1590
  (t) => ({
1450
- idx_domainId: index4().on(t.domainId),
1451
- idx_owner: index4().on(t.owner)
1591
+ idx_domainId: index5().on(t.domainId),
1592
+ idx_owner: index5().on(t.owner)
1452
1593
  })
1453
1594
  );
1454
1595
 
1455
1596
  // src/ensindexer-abstract/unigraph.schema.ts
1456
- import { index as index5, onchainEnum as onchainEnum2, onchainTable as onchainTable6, primaryKey as primaryKey3, relations as relations4, sql as sql2, uniqueIndex as uniqueIndex3 } from "ponder";
1457
- var event = onchainTable6(
1597
+ import { index as index6, onchainEnum as onchainEnum2, onchainTable as onchainTable7, primaryKey as primaryKey3, relations as relations4, sql as sql2, uniqueIndex as uniqueIndex3 } from "ponder";
1598
+ var event = onchainTable7(
1458
1599
  "events",
1459
1600
  (t) => ({
1460
1601
  // Ponder's event.id
@@ -1484,13 +1625,13 @@ var event = onchainTable6(
1484
1625
  data: t.hex().notNull()
1485
1626
  }),
1486
1627
  (t) => ({
1487
- bySelector: index5().on(t.selector),
1488
- byFrom: index5().on(t.from),
1489
- bySender: index5().on(t.sender),
1490
- byTimestamp: index5().on(t.timestamp)
1628
+ bySelector: index6().on(t.selector),
1629
+ byFrom: index6().on(t.from),
1630
+ bySender: index6().on(t.sender),
1631
+ byTimestamp: index6().on(t.timestamp)
1491
1632
  })
1492
1633
  );
1493
- var domainEvent2 = onchainTable6(
1634
+ var domainEvent2 = onchainTable7(
1494
1635
  "domain_events",
1495
1636
  (t) => ({
1496
1637
  domainId: t.text().notNull().$type(),
@@ -1498,7 +1639,7 @@ var domainEvent2 = onchainTable6(
1498
1639
  }),
1499
1640
  (t) => ({ pk: primaryKey3({ columns: [t.domainId, t.eventId] }) })
1500
1641
  );
1501
- var resolverEvent2 = onchainTable6(
1642
+ var resolverEvent2 = onchainTable7(
1502
1643
  "resolver_events",
1503
1644
  (t) => ({
1504
1645
  resolverId: t.text().notNull().$type(),
@@ -1506,7 +1647,7 @@ var resolverEvent2 = onchainTable6(
1506
1647
  }),
1507
1648
  (t) => ({ pk: primaryKey3({ columns: [t.resolverId, t.eventId] }) })
1508
1649
  );
1509
- var permissionsEvent = onchainTable6(
1650
+ var permissionsEvent = onchainTable7(
1510
1651
  "permissions_events",
1511
1652
  (t) => ({
1512
1653
  permissionsId: t.text().notNull().$type(),
@@ -1514,7 +1655,7 @@ var permissionsEvent = onchainTable6(
1514
1655
  }),
1515
1656
  (t) => ({ pk: primaryKey3({ columns: [t.permissionsId, t.eventId] }) })
1516
1657
  );
1517
- var permissionsUserEvent = onchainTable6(
1658
+ var permissionsUserEvent = onchainTable7(
1518
1659
  "permissions_user_events",
1519
1660
  (t) => ({
1520
1661
  permissionsUserId: t.text().notNull().$type(),
@@ -1522,7 +1663,7 @@ var permissionsUserEvent = onchainTable6(
1522
1663
  }),
1523
1664
  (t) => ({ pk: primaryKey3({ columns: [t.permissionsUserId, t.eventId] }) })
1524
1665
  );
1525
- var account = onchainTable6("accounts", (t) => ({
1666
+ var account = onchainTable7("accounts", (t) => ({
1526
1667
  id: t.hex().primaryKey().$type()
1527
1668
  }));
1528
1669
  var account_relations = relations4(account, ({ many }) => ({
@@ -1535,7 +1676,7 @@ var registryType = onchainEnum2("RegistryType", [
1535
1676
  "ENSv1VirtualRegistry",
1536
1677
  "ENSv2Registry"
1537
1678
  ]);
1538
- var registry = onchainTable6(
1679
+ var registry = onchainTable7(
1539
1680
  "registries",
1540
1681
  (t) => ({
1541
1682
  // see RegistryId for guarantees
@@ -1561,7 +1702,7 @@ var registry = onchainTable6(
1561
1702
  }),
1562
1703
  (t) => ({
1563
1704
  // NOTE: non-unique index because multiple rows can share (chainId, address) across virtual registries
1564
- byChainAddress: index5().on(t.chainId, t.address)
1705
+ byChainAddress: index6().on(t.chainId, t.address)
1565
1706
  })
1566
1707
  );
1567
1708
  var relations_registry = relations4(registry, ({ one, many }) => ({
@@ -1588,7 +1729,7 @@ function truncateCanonicalNamePrefix(name) {
1588
1729
  }
1589
1730
  return prefix;
1590
1731
  }
1591
- var domain = onchainTable6(
1732
+ var domain = onchainTable7(
1592
1733
  "domains",
1593
1734
  (t) => ({
1594
1735
  // see DomainId for guarantees (ENSv1DomainId: `${ENSv1RegistryId}/${node}`, ENSv2DomainId: CAIP-19)
@@ -1685,31 +1826,31 @@ var domain = onchainTable6(
1685
1826
  // NOTE: Domain-Resolver Relations tracked via Protocol Acceleration plugin
1686
1827
  }),
1687
1828
  (t) => ({
1688
- byType: index5().on(t.type),
1689
- bySubregistry: index5().on(t.subregistryId).where(sql2`${t.subregistryId} IS NOT NULL`),
1690
- byOwner: index5().on(t.ownerId),
1691
- byLabelHash: index5().on(t.labelHash),
1829
+ byType: index6().on(t.type),
1830
+ bySubregistry: index6().on(t.subregistryId).where(sql2`${t.subregistryId} IS NOT NULL`),
1831
+ byOwner: index6().on(t.ownerId),
1832
+ byLabelHash: index6().on(t.labelHash),
1692
1833
  // Composite for `(registry_id, label_hash)` lookups (namegraph walk in
1693
1834
  // get-domain-by-interpreted-name.ts). The leading `registry_id` column also serves
1694
1835
  // `WHERE registry_id = X` lookups via prefix scan.
1695
- byRegistryAndLabelHash: index5().on(t.registryId, t.labelHash),
1836
+ byRegistryAndLabelHash: index6().on(t.registryId, t.labelHash),
1696
1837
  // composite for `WHERE registry_id = X ORDER BY __canonical_name_prefix LIMIT N` (Domain.subdomains
1697
1838
  // and other find-domains queries when ordering by NAME). The length-capped prefix keeps the
1698
1839
  // index tuple under btree's per-tuple max (~2712 bytes); 64 code points × max 4-byte UTF-8 =
1699
1840
  // 256 bytes, leaving ample room for the registry_id and id columns.
1700
- byRegistryAndCanonicalNamePrefix: index5().on(t.registryId, t.__canonicalNamePrefix, t.id),
1841
+ byRegistryAndCanonicalNamePrefix: index6().on(t.registryId, t.__canonicalNamePrefix, t.id),
1701
1842
  // hash index avoids the btree 8191-byte row-size hazard for spam names
1702
- byCanonicalNameExact: index5().using("hash", t.canonicalName),
1843
+ byCanonicalNameExact: index6().using("hash", t.canonicalName),
1703
1844
  // GIN trigram on the length-capped prefix for left-anchored (`LIKE 'vit%'`) and substring
1704
1845
  // search (inline `gin_trgm_ops` via `sql` because passing it through `.op()` gets dropped by
1705
1846
  // Ponder)
1706
- byCanonicalNamePrefixFuzzy: index5().using("gin", sql2`${t.__canonicalNamePrefix} gin_trgm_ops`),
1847
+ byCanonicalNamePrefixFuzzy: index6().using("gin", sql2`${t.__canonicalNamePrefix} gin_trgm_ops`),
1707
1848
  // GIN containment for `cascadeLabelHeal`'s `canonical_label_hash_path @> ARRAY[lh]` lookup
1708
- byCanonicalLabelHashPath: index5().using("gin", t.canonicalLabelHashPath),
1849
+ byCanonicalLabelHashPath: index6().using("gin", t.canonicalLabelHashPath),
1709
1850
  // hash index for resolver-record → canonical-domain joins
1710
- byCanonicalNode: index5().using("hash", t.canonicalNode),
1851
+ byCanonicalNode: index6().using("hash", t.canonicalNode),
1711
1852
  // btree for ORDER BY canonical_depth (typeahead and DEPTH-ordered browse)
1712
- byCanonicalDepth: index5().on(t.canonicalDepth),
1853
+ byCanonicalDepth: index6().on(t.canonicalDepth),
1713
1854
  // Composites for `WHERE registry_id = X ORDER BY <latest registration value> LIMIT N`
1714
1855
  // (REGISTRATION_TIMESTAMP / REGISTRATION_EXPIRY ordering in find-domains queries). The latest
1715
1856
  // registration's start/expiry is mirrored onto the Domain row (see `__latestRegistration*`) so
@@ -1717,12 +1858,12 @@ var domain = onchainTable6(
1717
1858
  // `registrations` followed by a sort. The columns are NOT NULL (absent → `REGISTRATION_SORT_SENTINEL`),
1718
1859
  // so a single plain composite per column serves both ASC and DESC (forward / backward scan) with
1719
1860
  // a plain keyset tuple — see find-domains-resolver-helpers.ts.
1720
- byRegistryAndLatestRegistrationStart: index5().on(
1861
+ byRegistryAndLatestRegistrationStart: index6().on(
1721
1862
  t.registryId,
1722
1863
  t.__latestRegistrationStart,
1723
1864
  t.id
1724
1865
  ),
1725
- byRegistryAndLatestRegistrationExpiry: index5().on(
1866
+ byRegistryAndLatestRegistrationExpiry: index6().on(
1726
1867
  t.registryId,
1727
1868
  t.__latestRegistrationExpiry,
1728
1869
  t.id
@@ -1765,7 +1906,7 @@ var registrationType = onchainEnum2("RegistrationType", [
1765
1906
  "ENSv2RegistryRegistration",
1766
1907
  "ENSv2RegistryReservation"
1767
1908
  ]);
1768
- var registration = onchainTable6(
1909
+ var registration = onchainTable7(
1769
1910
  "registrations",
1770
1911
  (t) => ({
1771
1912
  // keyed by (domainId, registrationIndex)
@@ -1837,7 +1978,7 @@ var registration_relations = relations4(registration, ({ one, many }) => ({
1837
1978
  references: [event.id]
1838
1979
  })
1839
1980
  }));
1840
- var latestRegistrationIndex = onchainTable6("latest_registration_indexes", (t) => ({
1981
+ var latestRegistrationIndex = onchainTable7("latest_registration_indexes", (t) => ({
1841
1982
  domainId: t.text().primaryKey().$type(),
1842
1983
  registrationIndex: t.integer().notNull()
1843
1984
  }));
@@ -1848,7 +1989,7 @@ var latestRegistrationIndex_relations = relations4(latestRegistrationIndex, ({ o
1848
1989
  references: [domain.id]
1849
1990
  })
1850
1991
  }));
1851
- var renewal = onchainTable6(
1992
+ var renewal = onchainTable7(
1852
1993
  "renewals",
1853
1994
  (t) => ({
1854
1995
  // keyed by (registrationId, index)
@@ -1884,7 +2025,7 @@ var renewal_relations = relations4(renewal, ({ one }) => ({
1884
2025
  references: [event.id]
1885
2026
  })
1886
2027
  }));
1887
- var latestRenewalIndex = onchainTable6(
2028
+ var latestRenewalIndex = onchainTable7(
1888
2029
  "latest_renewal_indexes",
1889
2030
  (t) => ({
1890
2031
  domainId: t.text().notNull().$type(),
@@ -1900,7 +2041,7 @@ var latestRenewalIndex_relations = relations4(latestRenewalIndex, ({ one }) => (
1900
2041
  references: [domain.id]
1901
2042
  })
1902
2043
  }));
1903
- var permissions = onchainTable6(
2044
+ var permissions = onchainTable7(
1904
2045
  "permissions",
1905
2046
  (t) => ({
1906
2047
  id: t.text().primaryKey().$type(),
@@ -1915,7 +2056,7 @@ var relations_permissions = relations4(permissions, ({ many }) => ({
1915
2056
  resources: many(permissionsResource),
1916
2057
  users: many(permissionsUser)
1917
2058
  }));
1918
- var permissionsResource = onchainTable6(
2059
+ var permissionsResource = onchainTable7(
1919
2060
  "permissions_resources",
1920
2061
  (t) => ({
1921
2062
  id: t.text().primaryKey().$type(),
@@ -1933,7 +2074,7 @@ var relations_permissionsResource = relations4(permissionsResource, ({ one }) =>
1933
2074
  references: [permissions.chainId, permissions.address]
1934
2075
  })
1935
2076
  }));
1936
- var permissionsUser = onchainTable6(
2077
+ var permissionsUser = onchainTable7(
1937
2078
  "permissions_users",
1938
2079
  (t) => ({
1939
2080
  id: t.text().primaryKey().$type(),
@@ -1967,7 +2108,7 @@ var relations_permissionsUser = relations4(permissionsUser, ({ one }) => ({
1967
2108
  ]
1968
2109
  })
1969
2110
  }));
1970
- var label = onchainTable6(
2111
+ var label = onchainTable7(
1971
2112
  "labels",
1972
2113
  (t) => ({
1973
2114
  labelHash: t.hex().primaryKey().$type(),
@@ -1976,10 +2117,10 @@ var label = onchainTable6(
1976
2117
  (t) => ({
1977
2118
  // hash index avoids the btree 8191-byte row-size hazard for spam labels (a single label can
1978
2119
  // exceed btree's leaf-size limit)
1979
- byInterpretedExact: index5().using("hash", t.interpreted),
2120
+ byInterpretedExact: index6().using("hash", t.interpreted),
1980
2121
  // GIN trigram index for substring / similarity queries (inline `gin_trgm_ops` via `sql`
1981
2122
  // because passing it through `.op()` gets dropped by Ponder)
1982
- byInterpretedFuzzy: index5().using("gin", sql2`${t.interpreted} gin_trgm_ops`)
2123
+ byInterpretedFuzzy: index6().using("gin", sql2`${t.interpreted} gin_trgm_ops`)
1983
2124
  })
1984
2125
  );
1985
2126
  var label_relations = relations4(label, ({ many }) => ({
@@ -1995,6 +2136,11 @@ export {
1995
2136
  domainResolverRelation,
1996
2137
  domainResolverRelation_relations,
1997
2138
  domainType,
2139
+ efpAccountMetadata,
2140
+ efpListMetadata,
2141
+ efpListRecords,
2142
+ efpListStorageLocations,
2143
+ efpLists,
1998
2144
  event,
1999
2145
  internal_registrarActionMetadata,
2000
2146
  internal_registrarActionMetadataType,