@ensnode/ensdb-sdk 1.16.0 → 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,13 +143,13 @@ 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)
@@ -36,7 +168,7 @@ var reverseNameRecord = onchainTable2(
36
168
  pk: primaryKey2({ columns: [t.address, t.coinType] })
37
169
  })
38
170
  );
39
- var domainResolverRelation = onchainTable2(
171
+ var domainResolverRelation = onchainTable3(
40
172
  "domain_resolver_relations",
41
173
  (t) => ({
42
174
  // keyed by (chainId, address, node)
@@ -49,7 +181,7 @@ var domainResolverRelation = onchainTable2(
49
181
  }),
50
182
  (t) => ({
51
183
  pk: primaryKey2({ columns: [t.chainId, t.address, t.domainId] }),
52
- byDomain: index().on(t.domainId)
184
+ byDomain: index2().on(t.domainId)
53
185
  })
54
186
  );
55
187
  var domainResolverRelation_relations = relations(domainResolverRelation, ({ one }) => ({
@@ -58,7 +190,7 @@ var domainResolverRelation_relations = relations(domainResolverRelation, ({ one
58
190
  references: [resolver.chainId, resolver.address]
59
191
  })
60
192
  }));
61
- var resolver = onchainTable2(
193
+ var resolver = onchainTable3(
62
194
  "resolvers",
63
195
  (t) => ({
64
196
  // keyed by (chainId, address)
@@ -79,7 +211,7 @@ var resolver = onchainTable2(
79
211
  var resolver_relations = relations(resolver, ({ many }) => ({
80
212
  records: many(resolverRecords)
81
213
  }));
82
- var resolverRecords = onchainTable2(
214
+ var resolverRecords = onchainTable3(
83
215
  "resolver_records",
84
216
  (t) => ({
85
217
  // keyed by (chainId, resolver, node)
@@ -130,7 +262,7 @@ var resolverRecords_relations = relations(resolverRecords, ({ one, many }) => ({
130
262
  // resolverRecord has many text records
131
263
  textRecords: many(resolverTextRecord)
132
264
  }));
133
- var resolverAddressRecord = onchainTable2(
265
+ var resolverAddressRecord = onchainTable3(
134
266
  "resolver_address_records",
135
267
  (t) => ({
136
268
  // keyed by ((chainId, resolver, node), coinType)
@@ -153,8 +285,10 @@ var resolverAddressRecord = onchainTable2(
153
285
  (t) => ({
154
286
  pk: primaryKey2({ columns: [t.chainId, t.address, t.node, t.coinType] }),
155
287
  // supports the reverse lookup powering `Account.nameReferences`:
156
- // `WHERE value = <address> [AND coin_type = <coinType>]`
157
- byValueAndCoinType: index().on(t.value, t.coinType)
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)
158
292
  })
159
293
  );
160
294
  var resolverAddressRecordRelations = relations(resolverAddressRecord, ({ one }) => ({
@@ -168,7 +302,7 @@ var resolverAddressRecordRelations = relations(resolverAddressRecord, ({ one })
168
302
  references: [resolverRecords.chainId, resolverRecords.address, resolverRecords.node]
169
303
  })
170
304
  }));
171
- var resolverTextRecord = onchainTable2(
305
+ var resolverTextRecord = onchainTable3(
172
306
  "resolver_text_records",
173
307
  (t) => ({
174
308
  // keyed by ((chainId, resolver, node), key)
@@ -197,8 +331,8 @@ var resolverTextRecordRelations = relations(resolverTextRecord, ({ one }) => ({
197
331
  }));
198
332
 
199
333
  // src/ensindexer-abstract/registrars.schema.ts
200
- import { index as index2, onchainEnum, onchainTable as onchainTable3, relations as relations2, uniqueIndex as uniqueIndex2 } from "ponder";
201
- var subregistries = onchainTable3(
334
+ import { index as index3, onchainEnum, onchainTable as onchainTable4, relations as relations2, uniqueIndex as uniqueIndex2 } from "ponder";
335
+ var subregistries = onchainTable4(
202
336
  "subregistries",
203
337
  (t) => ({
204
338
  /**
@@ -228,7 +362,7 @@ var subregistries = onchainTable3(
228
362
  uniqueNode: uniqueIndex2().on(t.node)
229
363
  })
230
364
  );
231
- var registrationLifecycles = onchainTable3(
365
+ var registrationLifecycles = onchainTable4(
232
366
  "registration_lifecycles",
233
367
  (t) => ({
234
368
  /**
@@ -261,14 +395,14 @@ var registrationLifecycles = onchainTable3(
261
395
  expiresAt: t.bigint().notNull()
262
396
  }),
263
397
  (t) => ({
264
- bySubregistry: index2().on(t.subregistryId)
398
+ bySubregistry: index3().on(t.subregistryId)
265
399
  })
266
400
  );
267
401
  var registrarActionType = onchainEnum("registrar_action_type", [
268
402
  "registration",
269
403
  "renewal"
270
404
  ]);
271
- var registrarActions = onchainTable3(
405
+ var registrarActions = onchainTable4(
272
406
  "registrar_actions",
273
407
  (t) => ({
274
408
  /**
@@ -517,15 +651,15 @@ var registrarActions = onchainTable3(
517
651
  eventIds: t.text().array().notNull()
518
652
  }),
519
653
  (t) => ({
520
- byDecodedReferrer: index2().on(t.decodedReferrer),
521
- byTimestamp: index2().on(t.timestamp)
654
+ byDecodedReferrer: index3().on(t.decodedReferrer),
655
+ byTimestamp: index3().on(t.timestamp)
522
656
  })
523
657
  );
524
658
  var internal_registrarActionMetadataType = onchainEnum(
525
659
  "_ensindexer_registrar_action_metadata_type",
526
660
  ["CURRENT_LOGICAL_REGISTRAR_ACTION"]
527
661
  );
528
- var internal_registrarActionMetadata = onchainTable3(
662
+ var internal_registrarActionMetadata = onchainTable4(
529
663
  "_ensindexer_registrar_action_metadata",
530
664
  (t) => ({
531
665
  /**
@@ -574,7 +708,7 @@ var registrarActionRelations = relations2(registrarActions, ({ one }) => ({
574
708
  }));
575
709
 
576
710
  // src/ensindexer-abstract/subgraph.schema.ts
577
- 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";
578
712
 
579
713
  // src/lib/collate.ts
580
714
  function monkeypatchCollate(col, collation) {
@@ -585,7 +719,7 @@ function monkeypatchCollate(col, collation) {
585
719
  }
586
720
 
587
721
  // src/ensindexer-abstract/subgraph.schema.ts
588
- var subgraph_domain = onchainTable4(
722
+ var subgraph_domain = onchainTable5(
589
723
  "subgraph_domains",
590
724
  (t) => ({
591
725
  // The namehash of the name
@@ -655,17 +789,17 @@ var subgraph_domain = onchainTable4(
655
789
  }),
656
790
  (t) => ({
657
791
  // uses a hash index because some name values exceed the btree max row size (8191 bytes)
658
- byExactName: index3().using("hash", t.name),
792
+ byExactName: index4().using("hash", t.name),
659
793
  // GIN trigram index for partial-match filters (_contains, _starts_with, _ends_with).
660
794
  // (inline `gin_trgm_ops` via `sql` because passing it through `.op()` gets dropped by Ponder,
661
795
  // producing `USING gin (name)` with no opclass)
662
- byFuzzyName: index3().using("gin", sql`${t.name} gin_trgm_ops`),
663
- byLabelhash: index3().on(t.labelhash),
664
- byParentId: index3().on(t.parentId),
665
- byOwnerId: index3().on(t.ownerId),
666
- byRegistrantId: index3().on(t.registrantId),
667
- byWrappedOwnerId: index3().on(t.wrappedOwnerId),
668
- 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)
669
803
  })
670
804
  );
671
805
  monkeypatchCollate(subgraph_domain.name, '"C"');
@@ -715,7 +849,7 @@ var subgraph_domainRelations = relations3(subgraph_domain, ({ one, many }) => ({
715
849
  fusesSets: many(subgraph_fusesSet),
716
850
  expiryExtendeds: many(subgraph_expiryExtended)
717
851
  }));
718
- var subgraph_account = onchainTable4("subgraph_accounts", (t) => ({
852
+ var subgraph_account = onchainTable5("subgraph_accounts", (t) => ({
719
853
  id: t.hex().primaryKey()
720
854
  }));
721
855
  var subgraph_accountRelations = relations3(subgraph_account, ({ many }) => ({
@@ -723,7 +857,7 @@ var subgraph_accountRelations = relations3(subgraph_account, ({ many }) => ({
723
857
  wrappedDomains: many(subgraph_wrappedDomain),
724
858
  registrations: many(subgraph_registration)
725
859
  }));
726
- var subgraph_resolver = onchainTable4(
860
+ var subgraph_resolver = onchainTable5(
727
861
  "subgraph_resolvers",
728
862
  (t) => ({
729
863
  // The unique identifier for this resolver, which is a concatenation of the domain namehash and the resolver address
@@ -744,7 +878,7 @@ var subgraph_resolver = onchainTable4(
744
878
  coinTypes: t.bigint().array()
745
879
  }),
746
880
  (t) => ({
747
- byDomainId: index3().on(t.domainId)
881
+ byDomainId: index4().on(t.domainId)
748
882
  })
749
883
  );
750
884
  var subgraph_resolverRelations = relations3(subgraph_resolver, ({ one, many }) => ({
@@ -768,7 +902,7 @@ var subgraph_resolverRelations = relations3(subgraph_resolver, ({ one, many }) =
768
902
  authorisationChangeds: many(subgraph_authorisationChanged),
769
903
  versionChangeds: many(subgraph_versionChanged)
770
904
  }));
771
- var subgraph_registration = onchainTable4(
905
+ var subgraph_registration = onchainTable5(
772
906
  "subgraph_registrations",
773
907
  (t) => ({
774
908
  // The unique identifier of the registration
@@ -805,9 +939,9 @@ var subgraph_registration = onchainTable4(
805
939
  labelName: t.text()
806
940
  }),
807
941
  (t) => ({
808
- byDomainId: index3().on(t.domainId),
809
- byRegistrationDate: index3().on(t.registrationDate),
810
- byExpiryDate: index3().on(t.expiryDate)
942
+ byDomainId: index4().on(t.domainId),
943
+ byRegistrationDate: index4().on(t.registrationDate),
944
+ byExpiryDate: index4().on(t.expiryDate)
811
945
  })
812
946
  );
813
947
  var subgraph_registrationRelations = relations3(subgraph_registration, ({ one, many }) => ({
@@ -824,7 +958,7 @@ var subgraph_registrationRelations = relations3(subgraph_registration, ({ one, m
824
958
  nameReneweds: many(subgraph_nameRenewed),
825
959
  nameTransferreds: many(subgraph_nameTransferred)
826
960
  }));
827
- var subgraph_wrappedDomain = onchainTable4(
961
+ var subgraph_wrappedDomain = onchainTable5(
828
962
  "subgraph_wrapped_domains",
829
963
  (t) => ({
830
964
  // The unique identifier for each instance of the WrappedDomain entity
@@ -856,7 +990,7 @@ var subgraph_wrappedDomain = onchainTable4(
856
990
  name: t.text()
857
991
  }),
858
992
  (t) => ({
859
- byDomainId: index3().on(t.domainId)
993
+ byDomainId: index4().on(t.domainId)
860
994
  })
861
995
  );
862
996
  var subgraph_wrappedDomainRelations = relations3(subgraph_wrappedDomain, ({ one }) => ({
@@ -880,11 +1014,11 @@ var domainEvent = (t) => ({
880
1014
  });
881
1015
  var domainEventIndex = (t) => ({
882
1016
  // primary reverse lookup
883
- idx: index3().on(t.domainId),
1017
+ idx: index4().on(t.domainId),
884
1018
  // sorting index
885
- idx_compound: index3().on(t.domainId, t.id)
1019
+ idx_compound: index4().on(t.domainId, t.id)
886
1020
  });
887
- var subgraph_transfer = onchainTable4(
1021
+ var subgraph_transfer = onchainTable5(
888
1022
  "subgraph_transfers",
889
1023
  (t) => ({
890
1024
  ...domainEvent(t),
@@ -892,7 +1026,7 @@ var subgraph_transfer = onchainTable4(
892
1026
  }),
893
1027
  domainEventIndex
894
1028
  );
895
- var subgraph_newOwner = onchainTable4(
1029
+ var subgraph_newOwner = onchainTable5(
896
1030
  "subgraph_new_owners",
897
1031
  (t) => ({
898
1032
  ...domainEvent(t),
@@ -901,7 +1035,7 @@ var subgraph_newOwner = onchainTable4(
901
1035
  }),
902
1036
  domainEventIndex
903
1037
  );
904
- var subgraph_newResolver = onchainTable4(
1038
+ var subgraph_newResolver = onchainTable5(
905
1039
  "subgraph_new_resolvers",
906
1040
  (t) => ({
907
1041
  ...domainEvent(t),
@@ -909,7 +1043,7 @@ var subgraph_newResolver = onchainTable4(
909
1043
  }),
910
1044
  domainEventIndex
911
1045
  );
912
- var subgraph_newTTL = onchainTable4(
1046
+ var subgraph_newTTL = onchainTable5(
913
1047
  "subgraph_new_ttls",
914
1048
  (t) => ({
915
1049
  ...domainEvent(t),
@@ -917,7 +1051,7 @@ var subgraph_newTTL = onchainTable4(
917
1051
  }),
918
1052
  domainEventIndex
919
1053
  );
920
- var subgraph_wrappedTransfer = onchainTable4(
1054
+ var subgraph_wrappedTransfer = onchainTable5(
921
1055
  "subgraph_wrapped_transfers",
922
1056
  (t) => ({
923
1057
  ...domainEvent(t),
@@ -925,7 +1059,7 @@ var subgraph_wrappedTransfer = onchainTable4(
925
1059
  }),
926
1060
  domainEventIndex
927
1061
  );
928
- var subgraph_nameWrapped = onchainTable4(
1062
+ var subgraph_nameWrapped = onchainTable5(
929
1063
  "subgraph_name_wrapped",
930
1064
  (t) => ({
931
1065
  ...domainEvent(t),
@@ -936,7 +1070,7 @@ var subgraph_nameWrapped = onchainTable4(
936
1070
  }),
937
1071
  domainEventIndex
938
1072
  );
939
- var subgraph_nameUnwrapped = onchainTable4(
1073
+ var subgraph_nameUnwrapped = onchainTable5(
940
1074
  "subgraph_name_unwrapped",
941
1075
  (t) => ({
942
1076
  ...domainEvent(t),
@@ -944,7 +1078,7 @@ var subgraph_nameUnwrapped = onchainTable4(
944
1078
  }),
945
1079
  domainEventIndex
946
1080
  );
947
- var subgraph_fusesSet = onchainTable4(
1081
+ var subgraph_fusesSet = onchainTable5(
948
1082
  "subgraph_fuses_set",
949
1083
  (t) => ({
950
1084
  ...domainEvent(t),
@@ -952,7 +1086,7 @@ var subgraph_fusesSet = onchainTable4(
952
1086
  }),
953
1087
  domainEventIndex
954
1088
  );
955
- var subgraph_expiryExtended = onchainTable4(
1089
+ var subgraph_expiryExtended = onchainTable5(
956
1090
  "subgraph_expiry_extended",
957
1091
  (t) => ({
958
1092
  ...domainEvent(t),
@@ -966,11 +1100,11 @@ var registrationEvent = (t) => ({
966
1100
  });
967
1101
  var registrationEventIndex = (t) => ({
968
1102
  // primary reverse lookup
969
- idx: index3().on(t.registrationId),
1103
+ idx: index4().on(t.registrationId),
970
1104
  // sorting index
971
- idx_compound: index3().on(t.registrationId, t.id)
1105
+ idx_compound: index4().on(t.registrationId, t.id)
972
1106
  });
973
- var subgraph_nameRegistered = onchainTable4(
1107
+ var subgraph_nameRegistered = onchainTable5(
974
1108
  "subgraph_name_registered",
975
1109
  (t) => ({
976
1110
  ...registrationEvent(t),
@@ -979,7 +1113,7 @@ var subgraph_nameRegistered = onchainTable4(
979
1113
  }),
980
1114
  registrationEventIndex
981
1115
  );
982
- var subgraph_nameRenewed = onchainTable4(
1116
+ var subgraph_nameRenewed = onchainTable5(
983
1117
  "subgraph_name_renewed",
984
1118
  (t) => ({
985
1119
  ...registrationEvent(t),
@@ -987,7 +1121,7 @@ var subgraph_nameRenewed = onchainTable4(
987
1121
  }),
988
1122
  registrationEventIndex
989
1123
  );
990
- var subgraph_nameTransferred = onchainTable4(
1124
+ var subgraph_nameTransferred = onchainTable5(
991
1125
  "subgraph_name_transferred",
992
1126
  (t) => ({
993
1127
  ...registrationEvent(t),
@@ -1001,11 +1135,11 @@ var resolverEvent = (t) => ({
1001
1135
  });
1002
1136
  var resolverEventIndex = (t) => ({
1003
1137
  // primary reverse lookup
1004
- idx: index3().on(t.resolverId),
1138
+ idx: index4().on(t.resolverId),
1005
1139
  // sorting index
1006
- idx_compound: index3().on(t.resolverId, t.id)
1140
+ idx_compound: index4().on(t.resolverId, t.id)
1007
1141
  });
1008
- var subgraph_addrChanged = onchainTable4(
1142
+ var subgraph_addrChanged = onchainTable5(
1009
1143
  "subgraph_addr_changed",
1010
1144
  (t) => ({
1011
1145
  ...resolverEvent(t),
@@ -1013,7 +1147,7 @@ var subgraph_addrChanged = onchainTable4(
1013
1147
  }),
1014
1148
  resolverEventIndex
1015
1149
  );
1016
- var subgraph_multicoinAddrChanged = onchainTable4(
1150
+ var subgraph_multicoinAddrChanged = onchainTable5(
1017
1151
  "subgraph_multicoin_addr_changed",
1018
1152
  (t) => ({
1019
1153
  ...resolverEvent(t),
@@ -1022,7 +1156,7 @@ var subgraph_multicoinAddrChanged = onchainTable4(
1022
1156
  }),
1023
1157
  resolverEventIndex
1024
1158
  );
1025
- var subgraph_nameChanged = onchainTable4(
1159
+ var subgraph_nameChanged = onchainTable5(
1026
1160
  "subgraph_name_changed",
1027
1161
  (t) => ({
1028
1162
  ...resolverEvent(t),
@@ -1030,7 +1164,7 @@ var subgraph_nameChanged = onchainTable4(
1030
1164
  }),
1031
1165
  resolverEventIndex
1032
1166
  );
1033
- var subgraph_abiChanged = onchainTable4(
1167
+ var subgraph_abiChanged = onchainTable5(
1034
1168
  "subgraph_abi_changed",
1035
1169
  (t) => ({
1036
1170
  ...resolverEvent(t),
@@ -1038,7 +1172,7 @@ var subgraph_abiChanged = onchainTable4(
1038
1172
  }),
1039
1173
  resolverEventIndex
1040
1174
  );
1041
- var subgraph_pubkeyChanged = onchainTable4(
1175
+ var subgraph_pubkeyChanged = onchainTable5(
1042
1176
  "subgraph_pubkey_changed",
1043
1177
  (t) => ({
1044
1178
  ...resolverEvent(t),
@@ -1047,7 +1181,7 @@ var subgraph_pubkeyChanged = onchainTable4(
1047
1181
  }),
1048
1182
  resolverEventIndex
1049
1183
  );
1050
- var subgraph_textChanged = onchainTable4(
1184
+ var subgraph_textChanged = onchainTable5(
1051
1185
  "subgraph_text_changed",
1052
1186
  (t) => ({
1053
1187
  ...resolverEvent(t),
@@ -1056,7 +1190,7 @@ var subgraph_textChanged = onchainTable4(
1056
1190
  }),
1057
1191
  resolverEventIndex
1058
1192
  );
1059
- var subgraph_contenthashChanged = onchainTable4(
1193
+ var subgraph_contenthashChanged = onchainTable5(
1060
1194
  "subgraph_contenthash_changed",
1061
1195
  (t) => ({
1062
1196
  ...resolverEvent(t),
@@ -1064,7 +1198,7 @@ var subgraph_contenthashChanged = onchainTable4(
1064
1198
  }),
1065
1199
  resolverEventIndex
1066
1200
  );
1067
- var subgraph_interfaceChanged = onchainTable4(
1201
+ var subgraph_interfaceChanged = onchainTable5(
1068
1202
  "subgraph_interface_changed",
1069
1203
  (t) => ({
1070
1204
  ...resolverEvent(t),
@@ -1073,7 +1207,7 @@ var subgraph_interfaceChanged = onchainTable4(
1073
1207
  }),
1074
1208
  resolverEventIndex
1075
1209
  );
1076
- var subgraph_authorisationChanged = onchainTable4(
1210
+ var subgraph_authorisationChanged = onchainTable5(
1077
1211
  "subgraph_authorisation_changed",
1078
1212
  (t) => ({
1079
1213
  ...resolverEvent(t),
@@ -1083,7 +1217,7 @@ var subgraph_authorisationChanged = onchainTable4(
1083
1217
  }),
1084
1218
  resolverEventIndex
1085
1219
  );
1086
- var subgraph_versionChanged = onchainTable4(
1220
+ var subgraph_versionChanged = onchainTable5(
1087
1221
  "subgraph_version_changed",
1088
1222
  (t) => ({
1089
1223
  ...resolverEvent(t),
@@ -1277,8 +1411,8 @@ var subgraph_versionChangedRelations = relations3(subgraph_versionChanged, ({ on
1277
1411
  }));
1278
1412
 
1279
1413
  // src/ensindexer-abstract/tokenscope.schema.ts
1280
- import { index as index4, onchainTable as onchainTable5 } from "ponder";
1281
- var nameSales = onchainTable5(
1414
+ import { index as index5, onchainTable as onchainTable6 } from "ponder";
1415
+ var nameSales = onchainTable6(
1282
1416
  "name_sales",
1283
1417
  (t) => ({
1284
1418
  /**
@@ -1367,14 +1501,14 @@ var nameSales = onchainTable5(
1367
1501
  timestamp: t.bigint().notNull()
1368
1502
  }),
1369
1503
  (t) => ({
1370
- idx_domainId: index4().on(t.domainId),
1371
- idx_assetId: index4().on(t.assetId),
1372
- idx_buyer: index4().on(t.buyer),
1373
- idx_seller: index4().on(t.seller),
1374
- 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)
1375
1509
  })
1376
1510
  );
1377
- var nameTokens = onchainTable5(
1511
+ var nameTokens = onchainTable6(
1378
1512
  "name_tokens",
1379
1513
  (t) => ({
1380
1514
  /**
@@ -1454,14 +1588,14 @@ var nameTokens = onchainTable5(
1454
1588
  mintStatus: t.text().notNull()
1455
1589
  }),
1456
1590
  (t) => ({
1457
- idx_domainId: index4().on(t.domainId),
1458
- idx_owner: index4().on(t.owner)
1591
+ idx_domainId: index5().on(t.domainId),
1592
+ idx_owner: index5().on(t.owner)
1459
1593
  })
1460
1594
  );
1461
1595
 
1462
1596
  // src/ensindexer-abstract/unigraph.schema.ts
1463
- import { index as index5, onchainEnum as onchainEnum2, onchainTable as onchainTable6, primaryKey as primaryKey3, relations as relations4, sql as sql2, uniqueIndex as uniqueIndex3 } from "ponder";
1464
- 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(
1465
1599
  "events",
1466
1600
  (t) => ({
1467
1601
  // Ponder's event.id
@@ -1491,13 +1625,13 @@ var event = onchainTable6(
1491
1625
  data: t.hex().notNull()
1492
1626
  }),
1493
1627
  (t) => ({
1494
- bySelector: index5().on(t.selector),
1495
- byFrom: index5().on(t.from),
1496
- bySender: index5().on(t.sender),
1497
- 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)
1498
1632
  })
1499
1633
  );
1500
- var domainEvent2 = onchainTable6(
1634
+ var domainEvent2 = onchainTable7(
1501
1635
  "domain_events",
1502
1636
  (t) => ({
1503
1637
  domainId: t.text().notNull().$type(),
@@ -1505,7 +1639,7 @@ var domainEvent2 = onchainTable6(
1505
1639
  }),
1506
1640
  (t) => ({ pk: primaryKey3({ columns: [t.domainId, t.eventId] }) })
1507
1641
  );
1508
- var resolverEvent2 = onchainTable6(
1642
+ var resolverEvent2 = onchainTable7(
1509
1643
  "resolver_events",
1510
1644
  (t) => ({
1511
1645
  resolverId: t.text().notNull().$type(),
@@ -1513,7 +1647,7 @@ var resolverEvent2 = onchainTable6(
1513
1647
  }),
1514
1648
  (t) => ({ pk: primaryKey3({ columns: [t.resolverId, t.eventId] }) })
1515
1649
  );
1516
- var permissionsEvent = onchainTable6(
1650
+ var permissionsEvent = onchainTable7(
1517
1651
  "permissions_events",
1518
1652
  (t) => ({
1519
1653
  permissionsId: t.text().notNull().$type(),
@@ -1521,7 +1655,7 @@ var permissionsEvent = onchainTable6(
1521
1655
  }),
1522
1656
  (t) => ({ pk: primaryKey3({ columns: [t.permissionsId, t.eventId] }) })
1523
1657
  );
1524
- var permissionsUserEvent = onchainTable6(
1658
+ var permissionsUserEvent = onchainTable7(
1525
1659
  "permissions_user_events",
1526
1660
  (t) => ({
1527
1661
  permissionsUserId: t.text().notNull().$type(),
@@ -1529,7 +1663,7 @@ var permissionsUserEvent = onchainTable6(
1529
1663
  }),
1530
1664
  (t) => ({ pk: primaryKey3({ columns: [t.permissionsUserId, t.eventId] }) })
1531
1665
  );
1532
- var account = onchainTable6("accounts", (t) => ({
1666
+ var account = onchainTable7("accounts", (t) => ({
1533
1667
  id: t.hex().primaryKey().$type()
1534
1668
  }));
1535
1669
  var account_relations = relations4(account, ({ many }) => ({
@@ -1542,7 +1676,7 @@ var registryType = onchainEnum2("RegistryType", [
1542
1676
  "ENSv1VirtualRegistry",
1543
1677
  "ENSv2Registry"
1544
1678
  ]);
1545
- var registry = onchainTable6(
1679
+ var registry = onchainTable7(
1546
1680
  "registries",
1547
1681
  (t) => ({
1548
1682
  // see RegistryId for guarantees
@@ -1568,7 +1702,7 @@ var registry = onchainTable6(
1568
1702
  }),
1569
1703
  (t) => ({
1570
1704
  // NOTE: non-unique index because multiple rows can share (chainId, address) across virtual registries
1571
- byChainAddress: index5().on(t.chainId, t.address)
1705
+ byChainAddress: index6().on(t.chainId, t.address)
1572
1706
  })
1573
1707
  );
1574
1708
  var relations_registry = relations4(registry, ({ one, many }) => ({
@@ -1595,7 +1729,7 @@ function truncateCanonicalNamePrefix(name) {
1595
1729
  }
1596
1730
  return prefix;
1597
1731
  }
1598
- var domain = onchainTable6(
1732
+ var domain = onchainTable7(
1599
1733
  "domains",
1600
1734
  (t) => ({
1601
1735
  // see DomainId for guarantees (ENSv1DomainId: `${ENSv1RegistryId}/${node}`, ENSv2DomainId: CAIP-19)
@@ -1692,31 +1826,31 @@ var domain = onchainTable6(
1692
1826
  // NOTE: Domain-Resolver Relations tracked via Protocol Acceleration plugin
1693
1827
  }),
1694
1828
  (t) => ({
1695
- byType: index5().on(t.type),
1696
- bySubregistry: index5().on(t.subregistryId).where(sql2`${t.subregistryId} IS NOT NULL`),
1697
- byOwner: index5().on(t.ownerId),
1698
- 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),
1699
1833
  // Composite for `(registry_id, label_hash)` lookups (namegraph walk in
1700
1834
  // get-domain-by-interpreted-name.ts). The leading `registry_id` column also serves
1701
1835
  // `WHERE registry_id = X` lookups via prefix scan.
1702
- byRegistryAndLabelHash: index5().on(t.registryId, t.labelHash),
1836
+ byRegistryAndLabelHash: index6().on(t.registryId, t.labelHash),
1703
1837
  // composite for `WHERE registry_id = X ORDER BY __canonical_name_prefix LIMIT N` (Domain.subdomains
1704
1838
  // and other find-domains queries when ordering by NAME). The length-capped prefix keeps the
1705
1839
  // index tuple under btree's per-tuple max (~2712 bytes); 64 code points × max 4-byte UTF-8 =
1706
1840
  // 256 bytes, leaving ample room for the registry_id and id columns.
1707
- byRegistryAndCanonicalNamePrefix: index5().on(t.registryId, t.__canonicalNamePrefix, t.id),
1841
+ byRegistryAndCanonicalNamePrefix: index6().on(t.registryId, t.__canonicalNamePrefix, t.id),
1708
1842
  // hash index avoids the btree 8191-byte row-size hazard for spam names
1709
- byCanonicalNameExact: index5().using("hash", t.canonicalName),
1843
+ byCanonicalNameExact: index6().using("hash", t.canonicalName),
1710
1844
  // GIN trigram on the length-capped prefix for left-anchored (`LIKE 'vit%'`) and substring
1711
1845
  // search (inline `gin_trgm_ops` via `sql` because passing it through `.op()` gets dropped by
1712
1846
  // Ponder)
1713
- byCanonicalNamePrefixFuzzy: index5().using("gin", sql2`${t.__canonicalNamePrefix} gin_trgm_ops`),
1847
+ byCanonicalNamePrefixFuzzy: index6().using("gin", sql2`${t.__canonicalNamePrefix} gin_trgm_ops`),
1714
1848
  // GIN containment for `cascadeLabelHeal`'s `canonical_label_hash_path @> ARRAY[lh]` lookup
1715
- byCanonicalLabelHashPath: index5().using("gin", t.canonicalLabelHashPath),
1849
+ byCanonicalLabelHashPath: index6().using("gin", t.canonicalLabelHashPath),
1716
1850
  // hash index for resolver-record → canonical-domain joins
1717
- byCanonicalNode: index5().using("hash", t.canonicalNode),
1851
+ byCanonicalNode: index6().using("hash", t.canonicalNode),
1718
1852
  // btree for ORDER BY canonical_depth (typeahead and DEPTH-ordered browse)
1719
- byCanonicalDepth: index5().on(t.canonicalDepth),
1853
+ byCanonicalDepth: index6().on(t.canonicalDepth),
1720
1854
  // Composites for `WHERE registry_id = X ORDER BY <latest registration value> LIMIT N`
1721
1855
  // (REGISTRATION_TIMESTAMP / REGISTRATION_EXPIRY ordering in find-domains queries). The latest
1722
1856
  // registration's start/expiry is mirrored onto the Domain row (see `__latestRegistration*`) so
@@ -1724,12 +1858,12 @@ var domain = onchainTable6(
1724
1858
  // `registrations` followed by a sort. The columns are NOT NULL (absent → `REGISTRATION_SORT_SENTINEL`),
1725
1859
  // so a single plain composite per column serves both ASC and DESC (forward / backward scan) with
1726
1860
  // a plain keyset tuple — see find-domains-resolver-helpers.ts.
1727
- byRegistryAndLatestRegistrationStart: index5().on(
1861
+ byRegistryAndLatestRegistrationStart: index6().on(
1728
1862
  t.registryId,
1729
1863
  t.__latestRegistrationStart,
1730
1864
  t.id
1731
1865
  ),
1732
- byRegistryAndLatestRegistrationExpiry: index5().on(
1866
+ byRegistryAndLatestRegistrationExpiry: index6().on(
1733
1867
  t.registryId,
1734
1868
  t.__latestRegistrationExpiry,
1735
1869
  t.id
@@ -1772,7 +1906,7 @@ var registrationType = onchainEnum2("RegistrationType", [
1772
1906
  "ENSv2RegistryRegistration",
1773
1907
  "ENSv2RegistryReservation"
1774
1908
  ]);
1775
- var registration = onchainTable6(
1909
+ var registration = onchainTable7(
1776
1910
  "registrations",
1777
1911
  (t) => ({
1778
1912
  // keyed by (domainId, registrationIndex)
@@ -1844,7 +1978,7 @@ var registration_relations = relations4(registration, ({ one, many }) => ({
1844
1978
  references: [event.id]
1845
1979
  })
1846
1980
  }));
1847
- var latestRegistrationIndex = onchainTable6("latest_registration_indexes", (t) => ({
1981
+ var latestRegistrationIndex = onchainTable7("latest_registration_indexes", (t) => ({
1848
1982
  domainId: t.text().primaryKey().$type(),
1849
1983
  registrationIndex: t.integer().notNull()
1850
1984
  }));
@@ -1855,7 +1989,7 @@ var latestRegistrationIndex_relations = relations4(latestRegistrationIndex, ({ o
1855
1989
  references: [domain.id]
1856
1990
  })
1857
1991
  }));
1858
- var renewal = onchainTable6(
1992
+ var renewal = onchainTable7(
1859
1993
  "renewals",
1860
1994
  (t) => ({
1861
1995
  // keyed by (registrationId, index)
@@ -1891,7 +2025,7 @@ var renewal_relations = relations4(renewal, ({ one }) => ({
1891
2025
  references: [event.id]
1892
2026
  })
1893
2027
  }));
1894
- var latestRenewalIndex = onchainTable6(
2028
+ var latestRenewalIndex = onchainTable7(
1895
2029
  "latest_renewal_indexes",
1896
2030
  (t) => ({
1897
2031
  domainId: t.text().notNull().$type(),
@@ -1907,7 +2041,7 @@ var latestRenewalIndex_relations = relations4(latestRenewalIndex, ({ one }) => (
1907
2041
  references: [domain.id]
1908
2042
  })
1909
2043
  }));
1910
- var permissions = onchainTable6(
2044
+ var permissions = onchainTable7(
1911
2045
  "permissions",
1912
2046
  (t) => ({
1913
2047
  id: t.text().primaryKey().$type(),
@@ -1922,7 +2056,7 @@ var relations_permissions = relations4(permissions, ({ many }) => ({
1922
2056
  resources: many(permissionsResource),
1923
2057
  users: many(permissionsUser)
1924
2058
  }));
1925
- var permissionsResource = onchainTable6(
2059
+ var permissionsResource = onchainTable7(
1926
2060
  "permissions_resources",
1927
2061
  (t) => ({
1928
2062
  id: t.text().primaryKey().$type(),
@@ -1940,7 +2074,7 @@ var relations_permissionsResource = relations4(permissionsResource, ({ one }) =>
1940
2074
  references: [permissions.chainId, permissions.address]
1941
2075
  })
1942
2076
  }));
1943
- var permissionsUser = onchainTable6(
2077
+ var permissionsUser = onchainTable7(
1944
2078
  "permissions_users",
1945
2079
  (t) => ({
1946
2080
  id: t.text().primaryKey().$type(),
@@ -1974,7 +2108,7 @@ var relations_permissionsUser = relations4(permissionsUser, ({ one }) => ({
1974
2108
  ]
1975
2109
  })
1976
2110
  }));
1977
- var label = onchainTable6(
2111
+ var label = onchainTable7(
1978
2112
  "labels",
1979
2113
  (t) => ({
1980
2114
  labelHash: t.hex().primaryKey().$type(),
@@ -1983,10 +2117,10 @@ var label = onchainTable6(
1983
2117
  (t) => ({
1984
2118
  // hash index avoids the btree 8191-byte row-size hazard for spam labels (a single label can
1985
2119
  // exceed btree's leaf-size limit)
1986
- byInterpretedExact: index5().using("hash", t.interpreted),
2120
+ byInterpretedExact: index6().using("hash", t.interpreted),
1987
2121
  // GIN trigram index for substring / similarity queries (inline `gin_trgm_ops` via `sql`
1988
2122
  // because passing it through `.op()` gets dropped by Ponder)
1989
- byInterpretedFuzzy: index5().using("gin", sql2`${t.interpreted} gin_trgm_ops`)
2123
+ byInterpretedFuzzy: index6().using("gin", sql2`${t.interpreted} gin_trgm_ops`)
1990
2124
  })
1991
2125
  );
1992
2126
  var label_relations = relations4(label, ({ many }) => ({
@@ -2002,6 +2136,11 @@ export {
2002
2136
  domainResolverRelation,
2003
2137
  domainResolverRelation_relations,
2004
2138
  domainType,
2139
+ efpAccountMetadata,
2140
+ efpListMetadata,
2141
+ efpListRecords,
2142
+ efpListStorageLocations,
2143
+ efpLists,
2005
2144
  event,
2006
2145
  internal_registrarActionMetadata,
2007
2146
  internal_registrarActionMetadataType,