@ensnode/ensnode-schema 0.36.0 → 1.0.1

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,16 +1,495 @@
1
+ // src/schemas/protocol-acceleration.schema.ts
2
+ import { onchainTable, primaryKey, relations } from "ponder";
3
+ var reverseNameRecord = onchainTable(
4
+ "reverse_name_records",
5
+ (t) => ({
6
+ // keyed by (address, coinType)
7
+ address: t.hex().notNull(),
8
+ coinType: t.bigint().notNull(),
9
+ /**
10
+ * Represents the ENSIP-19 Reverse Name Record for a given (address, coinType).
11
+ *
12
+ * The value of this field is guaranteed to be a non-empty-string normalized ENS name (see
13
+ * `interpretNameRecordValue` for additional context and specific guarantees). Unnormalized
14
+ * names and empty string values are interpreted as a deletion of the associated Reverse Name
15
+ * Record entity (represented in the schema as the _absence_ of a relevant Reverse Name Record
16
+ * entity).
17
+ */
18
+ value: t.text().notNull()
19
+ }),
20
+ (t) => ({
21
+ pk: primaryKey({ columns: [t.address, t.coinType] })
22
+ })
23
+ );
24
+ var nodeResolverRelation = onchainTable(
25
+ "node_resolver_relations",
26
+ (t) => ({
27
+ // keyed by (chainId, registry, node)
28
+ chainId: t.integer().notNull(),
29
+ registry: t.hex().notNull(),
30
+ node: t.hex().notNull(),
31
+ /**
32
+ * The Address of the Resolver contract this `node` has set (via Registry#NewResolver) within
33
+ * the Registry on `chainId`.
34
+ */
35
+ resolver: t.hex().notNull()
36
+ }),
37
+ (t) => ({
38
+ pk: primaryKey({ columns: [t.chainId, t.registry, t.node] })
39
+ })
40
+ );
41
+ var resolverRecords = onchainTable(
42
+ "resolver_records",
43
+ (t) => ({
44
+ // keyed by (chainId, resolver, node)
45
+ chainId: t.integer().notNull(),
46
+ resolver: t.hex().notNull(),
47
+ node: t.hex().notNull(),
48
+ /**
49
+ * Represents the value of the reverse-resolution (ENSIP-3) name() record, used for Reverse Resolution.
50
+ *
51
+ * The emitted record values are interpreted according to `interpretNameRecordValue` — unnormalized
52
+ * names and empty string values are interpreted as a deletion of the associated record (represented
53
+ * here as `null`).
54
+ *
55
+ * If set, the value of this field is guaranteed to be a non-empty-string normalized ENS name
56
+ * (see `interpretNameRecordValue` for additional context and specific guarantees).
57
+ */
58
+ name: t.text()
59
+ }),
60
+ (t) => ({
61
+ pk: primaryKey({ columns: [t.chainId, t.resolver, t.node] })
62
+ })
63
+ );
64
+ var resolverRecords_relations = relations(resolverRecords, ({ many }) => ({
65
+ // resolverRecord has many address records
66
+ addressRecords: many(resolverAddressRecord),
67
+ // resolverRecord has many text records
68
+ textRecords: many(resolverTextRecord)
69
+ }));
70
+ var resolverAddressRecord = onchainTable(
71
+ "resolver_address_records",
72
+ (t) => ({
73
+ // keyed by ((chainId, resolver, node), coinType)
74
+ chainId: t.integer().notNull(),
75
+ resolver: t.hex().notNull(),
76
+ node: t.hex().notNull(),
77
+ coinType: t.bigint().notNull(),
78
+ /**
79
+ * Represents the value of the Addresss Record specified by ((chainId, resolver, node), coinType).
80
+ *
81
+ * The value of this field is interpreted by `interpretAddressRecordValue` — see its implementation
82
+ * for additional context and specific guarantees.
83
+ */
84
+ address: t.text().notNull()
85
+ }),
86
+ (t) => ({
87
+ pk: primaryKey({ columns: [t.chainId, t.resolver, t.node, t.coinType] })
88
+ })
89
+ );
90
+ var resolverAddressRecordRelations = relations(resolverAddressRecord, ({ one }) => ({
91
+ // belongs to resolverRecord
92
+ resolver: one(resolverRecords, {
93
+ fields: [
94
+ resolverAddressRecord.chainId,
95
+ resolverAddressRecord.resolver,
96
+ resolverAddressRecord.node
97
+ ],
98
+ references: [resolverRecords.chainId, resolverRecords.resolver, resolverRecords.node]
99
+ })
100
+ }));
101
+ var resolverTextRecord = onchainTable(
102
+ "resolver_trecords",
103
+ (t) => ({
104
+ // keyed by ((chainId, resolver, node), key)
105
+ chainId: t.integer().notNull(),
106
+ resolver: t.hex().notNull(),
107
+ node: t.hex().notNull(),
108
+ key: t.text().notNull(),
109
+ /**
110
+ * Represents the value of the Text Record specified by ((chainId, resolver, node), key).
111
+ *
112
+ * The value of this field is interpreted by `interpretTextRecordValue` — see its implementation
113
+ * for additional context and specific guarantees.
114
+ */
115
+ value: t.text().notNull()
116
+ }),
117
+ (t) => ({
118
+ pk: primaryKey({ columns: [t.chainId, t.resolver, t.node, t.key] })
119
+ })
120
+ );
121
+ var resolverTextRecordRelations = relations(resolverTextRecord, ({ one }) => ({
122
+ // belongs to resolverRecord
123
+ resolver: one(resolverRecords, {
124
+ fields: [resolverTextRecord.chainId, resolverTextRecord.resolver, resolverTextRecord.node],
125
+ references: [resolverRecords.chainId, resolverRecords.resolver, resolverRecords.node]
126
+ })
127
+ }));
128
+ var migratedNode = onchainTable("migrated_nodes", (t) => ({
129
+ node: t.hex().primaryKey()
130
+ }));
131
+
132
+ // src/schemas/registrars.schema.ts
133
+ import { index, onchainEnum, onchainTable as onchainTable2, relations as relations2, uniqueIndex } from "ponder";
134
+ var subregistries = onchainTable2(
135
+ "subregistries",
136
+ (t) => ({
137
+ /**
138
+ * Subregistry ID
139
+ *
140
+ * Identifies the chainId and address of the smart contract associated
141
+ * with the subregistry.
142
+ *
143
+ * Guaranteed to be a fully lowercase string formatted according to
144
+ * the CAIP-10 standard.
145
+ *
146
+ * @see https://chainagnostic.org/CAIPs/caip-10
147
+ */
148
+ subregistryId: t.text().primaryKey(),
149
+ /**
150
+ * The node (namehash) of the name the subregistry manages subnames of.
151
+ * Example subregistry managed names:
152
+ * - `eth`
153
+ * - `base.eth`
154
+ * - `linea.eth`
155
+ *
156
+ * Guaranteed to be a fully lowercase hex string representation of 32-bytes.
157
+ */
158
+ node: t.hex().notNull()
159
+ }),
160
+ (t) => ({
161
+ uniqueNode: uniqueIndex().on(t.node)
162
+ })
163
+ );
164
+ var registrationLifecycles = onchainTable2(
165
+ "registration_lifecycles",
166
+ (t) => ({
167
+ /**
168
+ * The node (namehash) of the FQDN of the domain the registration lifecycle
169
+ * is associated with.
170
+ *
171
+ * Guaranteed to be a subname of the node (namehash) of the subregistry
172
+ * identified by `subregistryId`.
173
+ *
174
+ * Guaranteed to be a fully lowercase hex string representation of 32-bytes.
175
+ */
176
+ node: t.hex().primaryKey(),
177
+ /**
178
+ * Subregistry ID
179
+ *
180
+ * Identifies the chainId and address of the subregistry smart contract
181
+ * that manages the registration lifecycle.
182
+ *
183
+ * Guaranteed to be a fully lowercase string formatted according to
184
+ * the CAIP-10 standard.
185
+ *
186
+ * @see https://chainagnostic.org/CAIPs/caip-10
187
+ */
188
+ subregistryId: t.text().notNull(),
189
+ /**
190
+ * Expires at
191
+ *
192
+ * Unix timestamp when the Registration Lifecycle is scheduled to expire.
193
+ */
194
+ expiresAt: t.bigint().notNull()
195
+ }),
196
+ (t) => ({
197
+ bySubregistry: index().on(t.subregistryId)
198
+ })
199
+ );
200
+ var registrarActionType = onchainEnum("registrar_action_type", [
201
+ "registration",
202
+ "renewal"
203
+ ]);
204
+ var registrarActions = onchainTable2(
205
+ "registrar_actions",
206
+ (t) => ({
207
+ /**
208
+ * "Logical registrar action" ID
209
+ *
210
+ * The `id` value is a deterministic and globally unique identifier for
211
+ * the "logical registrar action".
212
+ *
213
+ * The `id` value represents the *initial* onchain event associated with
214
+ * the "logical registrar action", but the full state of
215
+ * the "logical registrar action" is an aggregate across each of
216
+ * the onchain events referenced in the `eventIds` field.
217
+ *
218
+ * Guaranteed to be the very first element in `eventIds` array.
219
+ */
220
+ id: t.text().primaryKey(),
221
+ /**
222
+ * The type of the "logical registrar action".
223
+ */
224
+ type: registrarActionType().notNull(),
225
+ /**
226
+ * Subregistry ID
227
+ *
228
+ * The ID of the subregistry the "logical registrar action" was taken on.
229
+ *
230
+ * Identifies the chainId and address of the associated subregistry smart
231
+ * contract.
232
+ *
233
+ * Guaranteed to be a fully lowercase string formatted according to
234
+ * the CAIP-10 standard.
235
+ *
236
+ * @see https://chainagnostic.org/CAIPs/caip-10
237
+ */
238
+ subregistryId: t.text().notNull(),
239
+ /**
240
+ * The node (namehash) of the FQDN of the domain associated with
241
+ * the "logical registrar action".
242
+ *
243
+ * Guaranteed to be a fully lowercase hex string representation of 32-bytes.
244
+ */
245
+ node: t.hex().notNull(),
246
+ /**
247
+ * Incremental Duration
248
+ *
249
+ * If `type` is "registration":
250
+ * - Represents the duration between `blockTimestamp` and
251
+ * the initial `expiresAt` value that the associated
252
+ * "registration lifecycle" will be initialized with.
253
+ * If `type` is "renewal":
254
+ * - Represents the incremental increase in duration made to
255
+ * the `expiresAt` value in the associated "registration lifecycle".
256
+ *
257
+ * A "registration lifecycle" may be extended via renewal even after it
258
+ * expires if it is still within its grace period.
259
+ *
260
+ * Consider the following scenario:
261
+ *
262
+ * The "registration lifecycle" of a direct subname of .eth is scheduled to
263
+ * expire on Jan 1, midnight UTC. It is currently 30 days after this
264
+ * expiration time. Therefore, there are currently another 60 days of grace
265
+ * period remaining for this name. Anyone can still make a renewal to
266
+ * extend the "registration lifecycle" of this name.
267
+ *
268
+ * Given this scenario, consider the following examples:
269
+ *
270
+ * 1. If a renewal is made with 10 days incremental duration,
271
+ * the "registration lifecycle" for this name will remain in
272
+ * an "expired" state, but it will now have another 70 days of
273
+ * grace period remaining.
274
+ *
275
+ * 2. If a renewal is made with 50 days incremental duration,
276
+ * the "registration lifecycle" for this name will no longer be
277
+ * "expired" and will become "active", but the "registration lifecycle"
278
+ * will now be scheduled to expire again in 20 days.
279
+ *
280
+ * After the "registration lifecycle" for a name becomes expired by more
281
+ * than its grace period, it can no longer be renewed by anyone and is
282
+ * considered "released". The name must first be registered again, starting
283
+ * a new "registration lifecycle" of
284
+ * active / expired / grace period / released.
285
+ *
286
+ * May be 0.
287
+ *
288
+ * Guaranteed to be a non-negative bigint value.
289
+ */
290
+ incrementalDuration: t.bigint().notNull(),
291
+ /**
292
+ * Base cost
293
+ *
294
+ * Base cost (before any `premium`) of Ether measured in units of Wei
295
+ * paid to execute the "logical registrar action".
296
+ *
297
+ * May be 0.
298
+ *
299
+ * Guaranteed to be:
300
+ * 1) null if and only if `total` is null.
301
+ * 2) Otherwise, a non-negative bigint value.
302
+ */
303
+ baseCost: t.bigint(),
304
+ /**
305
+ * Premium
306
+ *
307
+ * "premium" cost (in excesses of the `baseCost`) of Ether measured in
308
+ * units of Wei paid to execute the "logical registrar action".
309
+ *
310
+ * May be 0.
311
+ *
312
+ * Guaranteed to be:
313
+ * 1) null if and only if `total` is null.
314
+ * 2) Otherwise, zero when `type` is `renewal`.
315
+ * 3) Otherwise, a non-negative bigint value.
316
+ */
317
+ premium: t.bigint(),
318
+ /**
319
+ * Total
320
+ *
321
+ * Total cost of Ether measured in units of Wei paid to execute
322
+ * the "logical registrar action".
323
+ *
324
+ * May be 0.
325
+ *
326
+ * Guaranteed to be:
327
+ * 1) null if and only if both `baseCost` and `premium` are null.
328
+ * 2) Otherwise, a non-negative bigint value, equal to the sum of
329
+ * `baseCost` and `premium`.
330
+ */
331
+ total: t.bigint(),
332
+ /**
333
+ * Registrant
334
+ *
335
+ * Identifies the address that initiated the "logical registrar action" and
336
+ * is paying the `total` cost (if applicable).
337
+ *
338
+ * It may not be the owner of the name:
339
+ * 1. When a name is registered, the initial owner of the name may be
340
+ * distinct from the registrant.
341
+ * 2. There are no restrictions on who may renew a name.
342
+ * Therefore the owner of the name may be distinct from the registrant.
343
+ *
344
+ *
345
+ * The "chainId" of this address is the same as is referenced in `subregistryId`.
346
+ *
347
+ * Guaranteed to be a fully lowercase address
348
+ */
349
+ registrant: t.hex().notNull(),
350
+ /**
351
+ * Encoded Referrer
352
+ *
353
+ * Represents the "raw" 32-byte "referrer" value emitted onchain in
354
+ * association with the registrar action.
355
+ *
356
+ * Guaranteed to be:
357
+ * 1) null if the emitted `eventIds` contain no information about a referrer.
358
+ * 2) Otherwise, a fully lowercase hex string representation of 32-bytes.
359
+ */
360
+ encodedReferrer: t.hex(),
361
+ /**
362
+ * Decoded referrer
363
+ *
364
+ * Decoded referrer according to the subjective interpretation of
365
+ * `encodedReferrer` defined for ENS Holiday Awards.
366
+ *
367
+ * Identifies the interpreted address of the referrer.
368
+ * The "chainId" of this address is the same as is referenced in
369
+ * `subregistryId`.
370
+ *
371
+ * Guaranteed to be:
372
+ * 1) null if `encodedReferrer` is null.
373
+ * 2) Otherwise, a fully lowercase address.
374
+ * 3) May be the "zero address" to represent that an `encodedReferrer` is
375
+ * defined but that it is interpreted as no referrer.
376
+ */
377
+ decodedReferrer: t.hex(),
378
+ /**
379
+ * Number of the block that includes the "logical registrar action".
380
+ *
381
+ * The "chainId" of this block is the same as is referenced in
382
+ * `subregistryId`.
383
+ *
384
+ * Guaranteed to be a non-negative bigint value.
385
+ */
386
+ blockNumber: t.bigint().notNull(),
387
+ /**
388
+ * Unix timestamp of the block referenced by `blockNumber` that includes
389
+ * the "logical registrar action".
390
+ */
391
+ timestamp: t.bigint().notNull(),
392
+ /**
393
+ * Transaction hash of the transaction associated with
394
+ * the "logical registrar action".
395
+ *
396
+ * The "chainId" of this transaction is the same as is referenced in
397
+ * `subregistryId`.
398
+ *
399
+ * Note that a single transaction may be associated with any number of
400
+ * "logical registrar actions".
401
+ *
402
+ * Guaranteed to be a fully lowercase hex string representation of 32-bytes.
403
+ */
404
+ transactionHash: t.hex().notNull(),
405
+ /**
406
+ * Event IDs
407
+ *
408
+ * Array of the eventIds that have contributed to the state of
409
+ * the "logical registrar action" record.
410
+ *
411
+ * Each eventId is a deterministic and globally unique onchain event
412
+ * identifier.
413
+ *
414
+ * Guarantees:
415
+ * - Each eventId is of events that occurred within the block
416
+ * referenced by `blockNumber`.
417
+ * - At least 1 eventId.
418
+ * - Ordered chronologically (ascending) by logIndex within `blockNumber`.
419
+ * - The first element in the array is equal to the `id` of
420
+ * the overall "logical registrar action" record.
421
+ *
422
+ * The following ideas are not generalized for ENS overall but happen to
423
+ * be a characteristic of the scope of our current indexing logic:
424
+ * 1. These id's always reference events emitted by
425
+ * a related "BaseRegistrar" contract.
426
+ * 2. These id's optionally reference events emitted by
427
+ * a related "Registrar Controller" contract. This is because our
428
+ * current indexing logic doesn't guarantee to index
429
+ * all "Registrar Controller" contracts.
430
+ */
431
+ eventIds: t.text().array().notNull()
432
+ }),
433
+ (t) => ({
434
+ byDecodedReferrer: index().on(t.decodedReferrer),
435
+ byTimestamp: index().on(t.timestamp)
436
+ })
437
+ );
438
+ var internal_registrarActionMetadata = onchainTable2(
439
+ "_ensindexer_registrar_action_metadata",
440
+ (t) => ({
441
+ /**
442
+ * Logical Event Key
443
+ *
444
+ * A fully lowercase string formatted as:
445
+ * `{chainId}:{subregistryAddress}:{node}:{transactionHash}`
446
+ */
447
+ logicalEventKey: t.text().primaryKey(),
448
+ /**
449
+ * Logical Event ID
450
+ *
451
+ * A string holding the `id` value of the existing "logical registrar action"
452
+ * record that is currently being built as an aggregation of onchain events.
453
+ *
454
+ * May be used by subsequent event handlers to identify which
455
+ * "logical registrar action" to aggregate additional indexed state into.
456
+ */
457
+ logicalEventId: t.text().notNull()
458
+ })
459
+ );
460
+ var subregistryRelations = relations2(subregistries, ({ many }) => ({
461
+ registrationLifecycle: many(registrationLifecycles)
462
+ }));
463
+ var registrationLifecycleRelations = relations2(
464
+ registrationLifecycles,
465
+ ({ one, many }) => ({
466
+ subregistry: one(subregistries, {
467
+ fields: [registrationLifecycles.subregistryId],
468
+ references: [subregistries.subregistryId]
469
+ }),
470
+ registrarAction: many(registrarActions)
471
+ })
472
+ );
473
+ var registrarActionRelations = relations2(registrarActions, ({ one }) => ({
474
+ registrationLifecycle: one(registrationLifecycles, {
475
+ fields: [registrarActions.node],
476
+ references: [registrationLifecycles.node]
477
+ })
478
+ }));
479
+
1
480
  // src/schemas/subgraph.schema.ts
2
- import { index, onchainTable, relations } from "ponder";
481
+ import { index as index2, onchainTable as onchainTable3, relations as relations3 } from "ponder";
3
482
 
4
483
  // src/lib/collate.ts
5
484
  function monkeypatchCollate(col, collation) {
6
485
  col.getSQLType = function() {
7
- return Object.getPrototypeOf(this).getSQLType.call(this) + " COLLATE " + collation;
486
+ return `${Object.getPrototypeOf(this).getSQLType.call(this)} COLLATE ${collation}`;
8
487
  };
9
488
  return col;
10
489
  }
11
490
 
12
491
  // src/schemas/subgraph.schema.ts
13
- var subgraph_domain = onchainTable(
492
+ var subgraph_domain = onchainTable3(
14
493
  "subgraph_domains",
15
494
  (t) => ({
16
495
  // The namehash of the name
@@ -79,16 +558,16 @@ var subgraph_domain = onchainTable(
79
558
  expiryDate: t.bigint()
80
559
  }),
81
560
  (t) => ({
82
- byLabelhash: index().on(t.labelhash),
83
- byParentId: index().on(t.parentId),
84
- byOwnerId: index().on(t.ownerId),
85
- byRegistrantId: index().on(t.registrantId),
86
- byWrappedOwnerId: index().on(t.wrappedOwnerId)
561
+ byLabelhash: index2().on(t.labelhash),
562
+ byParentId: index2().on(t.parentId),
563
+ byOwnerId: index2().on(t.ownerId),
564
+ byRegistrantId: index2().on(t.registrantId),
565
+ byWrappedOwnerId: index2().on(t.wrappedOwnerId)
87
566
  })
88
567
  );
89
568
  monkeypatchCollate(subgraph_domain.name, '"C"');
90
569
  monkeypatchCollate(subgraph_domain.labelName, '"C"');
91
- var subgraph_domainRelations = relations(subgraph_domain, ({ one, many }) => ({
570
+ var subgraph_domainRelations = relations3(subgraph_domain, ({ one, many }) => ({
92
571
  resolvedAddress: one(subgraph_account, {
93
572
  fields: [subgraph_domain.resolvedAddressId],
94
573
  references: [subgraph_account.id]
@@ -133,15 +612,15 @@ var subgraph_domainRelations = relations(subgraph_domain, ({ one, many }) => ({
133
612
  fusesSets: many(subgraph_fusesSet),
134
613
  expiryExtendeds: many(subgraph_expiryExtended)
135
614
  }));
136
- var subgraph_account = onchainTable("subgraph_accounts", (t) => ({
615
+ var subgraph_account = onchainTable3("subgraph_accounts", (t) => ({
137
616
  id: t.hex().primaryKey()
138
617
  }));
139
- var subgraph_accountRelations = relations(subgraph_account, ({ many }) => ({
618
+ var subgraph_accountRelations = relations3(subgraph_account, ({ many }) => ({
140
619
  domains: many(subgraph_domain),
141
620
  wrappedDomains: many(subgraph_wrappedDomain),
142
621
  registrations: many(subgraph_registration)
143
622
  }));
144
- var subgraph_resolver = onchainTable(
623
+ var subgraph_resolver = onchainTable3(
145
624
  "subgraph_resolvers",
146
625
  (t) => ({
147
626
  // The unique identifier for this resolver, which is a concatenation of the domain namehash and the resolver address
@@ -162,10 +641,10 @@ var subgraph_resolver = onchainTable(
162
641
  coinTypes: t.bigint().array()
163
642
  }),
164
643
  (t) => ({
165
- byDomainId: index().on(t.domainId)
644
+ byDomainId: index2().on(t.domainId)
166
645
  })
167
646
  );
168
- var subgraph_resolverRelations = relations(subgraph_resolver, ({ one, many }) => ({
647
+ var subgraph_resolverRelations = relations3(subgraph_resolver, ({ one, many }) => ({
169
648
  addr: one(subgraph_account, {
170
649
  fields: [subgraph_resolver.addrId],
171
650
  references: [subgraph_account.id]
@@ -186,7 +665,7 @@ var subgraph_resolverRelations = relations(subgraph_resolver, ({ one, many }) =>
186
665
  authorisationChangeds: many(subgraph_authorisationChanged),
187
666
  versionChangeds: many(subgraph_versionChanged)
188
667
  }));
189
- var subgraph_registration = onchainTable(
668
+ var subgraph_registration = onchainTable3(
190
669
  "subgraph_registrations",
191
670
  (t) => ({
192
671
  // The unique identifier of the registration
@@ -223,11 +702,11 @@ var subgraph_registration = onchainTable(
223
702
  labelName: t.text()
224
703
  }),
225
704
  (t) => ({
226
- byDomainId: index().on(t.domainId),
227
- byRegistrationDate: index().on(t.registrationDate)
705
+ byDomainId: index2().on(t.domainId),
706
+ byRegistrationDate: index2().on(t.registrationDate)
228
707
  })
229
708
  );
230
- var subgraph_registrationRelations = relations(subgraph_registration, ({ one, many }) => ({
709
+ var subgraph_registrationRelations = relations3(subgraph_registration, ({ one, many }) => ({
231
710
  domain: one(subgraph_domain, {
232
711
  fields: [subgraph_registration.domainId],
233
712
  references: [subgraph_domain.id]
@@ -241,7 +720,7 @@ var subgraph_registrationRelations = relations(subgraph_registration, ({ one, ma
241
720
  nameReneweds: many(subgraph_nameRenewed),
242
721
  nameTransferreds: many(subgraph_nameTransferred)
243
722
  }));
244
- var subgraph_wrappedDomain = onchainTable(
723
+ var subgraph_wrappedDomain = onchainTable3(
245
724
  "subgraph_wrapped_domains",
246
725
  (t) => ({
247
726
  // The unique identifier for each instance of the WrappedDomain entity
@@ -273,10 +752,10 @@ var subgraph_wrappedDomain = onchainTable(
273
752
  name: t.text()
274
753
  }),
275
754
  (t) => ({
276
- byDomainId: index().on(t.domainId)
755
+ byDomainId: index2().on(t.domainId)
277
756
  })
278
757
  );
279
- var subgraph_wrappedDomainRelations = relations(subgraph_wrappedDomain, ({ one }) => ({
758
+ var subgraph_wrappedDomainRelations = relations3(subgraph_wrappedDomain, ({ one }) => ({
280
759
  domain: one(subgraph_domain, {
281
760
  fields: [subgraph_wrappedDomain.domainId],
282
761
  references: [subgraph_domain.id]
@@ -297,11 +776,11 @@ var domainEvent = (t) => ({
297
776
  });
298
777
  var domainEventIndex = (t) => ({
299
778
  // primary reverse lookup
300
- idx: index().on(t.domainId),
779
+ idx: index2().on(t.domainId),
301
780
  // sorting index
302
- idx_compound: index().on(t.domainId, t.id)
781
+ idx_compound: index2().on(t.domainId, t.id)
303
782
  });
304
- var subgraph_transfer = onchainTable(
783
+ var subgraph_transfer = onchainTable3(
305
784
  "subgraph_transfers",
306
785
  (t) => ({
307
786
  ...domainEvent(t),
@@ -309,7 +788,7 @@ var subgraph_transfer = onchainTable(
309
788
  }),
310
789
  domainEventIndex
311
790
  );
312
- var subgraph_newOwner = onchainTable(
791
+ var subgraph_newOwner = onchainTable3(
313
792
  "subgraph_new_owners",
314
793
  (t) => ({
315
794
  ...domainEvent(t),
@@ -318,7 +797,7 @@ var subgraph_newOwner = onchainTable(
318
797
  }),
319
798
  domainEventIndex
320
799
  );
321
- var subgraph_newResolver = onchainTable(
800
+ var subgraph_newResolver = onchainTable3(
322
801
  "subgraph_new_resolvers",
323
802
  (t) => ({
324
803
  ...domainEvent(t),
@@ -326,7 +805,7 @@ var subgraph_newResolver = onchainTable(
326
805
  }),
327
806
  domainEventIndex
328
807
  );
329
- var subgraph_newTTL = onchainTable(
808
+ var subgraph_newTTL = onchainTable3(
330
809
  "subgraph_new_ttls",
331
810
  (t) => ({
332
811
  ...domainEvent(t),
@@ -334,7 +813,7 @@ var subgraph_newTTL = onchainTable(
334
813
  }),
335
814
  domainEventIndex
336
815
  );
337
- var subgraph_wrappedTransfer = onchainTable(
816
+ var subgraph_wrappedTransfer = onchainTable3(
338
817
  "subgraph_wrapped_transfers",
339
818
  (t) => ({
340
819
  ...domainEvent(t),
@@ -342,7 +821,7 @@ var subgraph_wrappedTransfer = onchainTable(
342
821
  }),
343
822
  domainEventIndex
344
823
  );
345
- var subgraph_nameWrapped = onchainTable(
824
+ var subgraph_nameWrapped = onchainTable3(
346
825
  "subgraph_name_wrapped",
347
826
  (t) => ({
348
827
  ...domainEvent(t),
@@ -353,7 +832,7 @@ var subgraph_nameWrapped = onchainTable(
353
832
  }),
354
833
  domainEventIndex
355
834
  );
356
- var subgraph_nameUnwrapped = onchainTable(
835
+ var subgraph_nameUnwrapped = onchainTable3(
357
836
  "subgraph_name_unwrapped",
358
837
  (t) => ({
359
838
  ...domainEvent(t),
@@ -361,7 +840,7 @@ var subgraph_nameUnwrapped = onchainTable(
361
840
  }),
362
841
  domainEventIndex
363
842
  );
364
- var subgraph_fusesSet = onchainTable(
843
+ var subgraph_fusesSet = onchainTable3(
365
844
  "subgraph_fuses_set",
366
845
  (t) => ({
367
846
  ...domainEvent(t),
@@ -369,7 +848,7 @@ var subgraph_fusesSet = onchainTable(
369
848
  }),
370
849
  domainEventIndex
371
850
  );
372
- var subgraph_expiryExtended = onchainTable(
851
+ var subgraph_expiryExtended = onchainTable3(
373
852
  "subgraph_expiry_extended",
374
853
  (t) => ({
375
854
  ...domainEvent(t),
@@ -383,11 +862,11 @@ var registrationEvent = (t) => ({
383
862
  });
384
863
  var registrationEventIndex = (t) => ({
385
864
  // primary reverse lookup
386
- idx: index().on(t.registrationId),
865
+ idx: index2().on(t.registrationId),
387
866
  // sorting index
388
- idx_compound: index().on(t.registrationId, t.id)
867
+ idx_compound: index2().on(t.registrationId, t.id)
389
868
  });
390
- var subgraph_nameRegistered = onchainTable(
869
+ var subgraph_nameRegistered = onchainTable3(
391
870
  "subgraph_name_registered",
392
871
  (t) => ({
393
872
  ...registrationEvent(t),
@@ -396,7 +875,7 @@ var subgraph_nameRegistered = onchainTable(
396
875
  }),
397
876
  registrationEventIndex
398
877
  );
399
- var subgraph_nameRenewed = onchainTable(
878
+ var subgraph_nameRenewed = onchainTable3(
400
879
  "subgraph_name_renewed",
401
880
  (t) => ({
402
881
  ...registrationEvent(t),
@@ -404,7 +883,7 @@ var subgraph_nameRenewed = onchainTable(
404
883
  }),
405
884
  registrationEventIndex
406
885
  );
407
- var subgraph_nameTransferred = onchainTable(
886
+ var subgraph_nameTransferred = onchainTable3(
408
887
  "subgraph_name_transferred",
409
888
  (t) => ({
410
889
  ...registrationEvent(t),
@@ -418,11 +897,11 @@ var resolverEvent = (t) => ({
418
897
  });
419
898
  var resolverEventIndex = (t) => ({
420
899
  // primary reverse lookup
421
- idx: index().on(t.resolverId),
900
+ idx: index2().on(t.resolverId),
422
901
  // sorting index
423
- idx_compound: index().on(t.resolverId, t.id)
902
+ idx_compound: index2().on(t.resolverId, t.id)
424
903
  });
425
- var subgraph_addrChanged = onchainTable(
904
+ var subgraph_addrChanged = onchainTable3(
426
905
  "subgraph_addr_changed",
427
906
  (t) => ({
428
907
  ...resolverEvent(t),
@@ -430,7 +909,7 @@ var subgraph_addrChanged = onchainTable(
430
909
  }),
431
910
  resolverEventIndex
432
911
  );
433
- var subgraph_multicoinAddrChanged = onchainTable(
912
+ var subgraph_multicoinAddrChanged = onchainTable3(
434
913
  "subgraph_multicoin_addr_changed",
435
914
  (t) => ({
436
915
  ...resolverEvent(t),
@@ -439,7 +918,7 @@ var subgraph_multicoinAddrChanged = onchainTable(
439
918
  }),
440
919
  resolverEventIndex
441
920
  );
442
- var subgraph_nameChanged = onchainTable(
921
+ var subgraph_nameChanged = onchainTable3(
443
922
  "subgraph_name_changed",
444
923
  (t) => ({
445
924
  ...resolverEvent(t),
@@ -447,7 +926,7 @@ var subgraph_nameChanged = onchainTable(
447
926
  }),
448
927
  resolverEventIndex
449
928
  );
450
- var subgraph_abiChanged = onchainTable(
929
+ var subgraph_abiChanged = onchainTable3(
451
930
  "subgraph_abi_changed",
452
931
  (t) => ({
453
932
  ...resolverEvent(t),
@@ -455,7 +934,7 @@ var subgraph_abiChanged = onchainTable(
455
934
  }),
456
935
  resolverEventIndex
457
936
  );
458
- var subgraph_pubkeyChanged = onchainTable(
937
+ var subgraph_pubkeyChanged = onchainTable3(
459
938
  "subgraph_pubkey_changed",
460
939
  (t) => ({
461
940
  ...resolverEvent(t),
@@ -464,7 +943,7 @@ var subgraph_pubkeyChanged = onchainTable(
464
943
  }),
465
944
  resolverEventIndex
466
945
  );
467
- var subgraph_textChanged = onchainTable(
946
+ var subgraph_textChanged = onchainTable3(
468
947
  "subgraph_text_changed",
469
948
  (t) => ({
470
949
  ...resolverEvent(t),
@@ -473,7 +952,7 @@ var subgraph_textChanged = onchainTable(
473
952
  }),
474
953
  resolverEventIndex
475
954
  );
476
- var subgraph_contenthashChanged = onchainTable(
955
+ var subgraph_contenthashChanged = onchainTable3(
477
956
  "subgraph_contenthash_changed",
478
957
  (t) => ({
479
958
  ...resolverEvent(t),
@@ -481,7 +960,7 @@ var subgraph_contenthashChanged = onchainTable(
481
960
  }),
482
961
  resolverEventIndex
483
962
  );
484
- var subgraph_interfaceChanged = onchainTable(
963
+ var subgraph_interfaceChanged = onchainTable3(
485
964
  "subgraph_interface_changed",
486
965
  (t) => ({
487
966
  ...resolverEvent(t),
@@ -490,7 +969,7 @@ var subgraph_interfaceChanged = onchainTable(
490
969
  }),
491
970
  resolverEventIndex
492
971
  );
493
- var subgraph_authorisationChanged = onchainTable(
972
+ var subgraph_authorisationChanged = onchainTable3(
494
973
  "subgraph_authorisation_changed",
495
974
  (t) => ({
496
975
  ...resolverEvent(t),
@@ -500,7 +979,7 @@ var subgraph_authorisationChanged = onchainTable(
500
979
  }),
501
980
  resolverEventIndex
502
981
  );
503
- var subgraph_versionChanged = onchainTable(
982
+ var subgraph_versionChanged = onchainTable3(
504
983
  "subgraph_version_changed",
505
984
  (t) => ({
506
985
  ...resolverEvent(t),
@@ -508,7 +987,7 @@ var subgraph_versionChanged = onchainTable(
508
987
  }),
509
988
  resolverEventIndex
510
989
  );
511
- var subgraph_transferRelations = relations(subgraph_transfer, ({ one }) => ({
990
+ var subgraph_transferRelations = relations3(subgraph_transfer, ({ one }) => ({
512
991
  domain: one(subgraph_domain, {
513
992
  fields: [subgraph_transfer.domainId],
514
993
  references: [subgraph_domain.id]
@@ -518,7 +997,7 @@ var subgraph_transferRelations = relations(subgraph_transfer, ({ one }) => ({
518
997
  references: [subgraph_account.id]
519
998
  })
520
999
  }));
521
- var subgraph_newOwnerRelations = relations(subgraph_newOwner, ({ one }) => ({
1000
+ var subgraph_newOwnerRelations = relations3(subgraph_newOwner, ({ one }) => ({
522
1001
  domain: one(subgraph_domain, {
523
1002
  fields: [subgraph_newOwner.domainId],
524
1003
  references: [subgraph_domain.id]
@@ -532,7 +1011,7 @@ var subgraph_newOwnerRelations = relations(subgraph_newOwner, ({ one }) => ({
532
1011
  references: [subgraph_domain.id]
533
1012
  })
534
1013
  }));
535
- var subgraph_newResolverRelations = relations(subgraph_newResolver, ({ one }) => ({
1014
+ var subgraph_newResolverRelations = relations3(subgraph_newResolver, ({ one }) => ({
536
1015
  domain: one(subgraph_domain, {
537
1016
  fields: [subgraph_newResolver.domainId],
538
1017
  references: [subgraph_domain.id]
@@ -542,13 +1021,13 @@ var subgraph_newResolverRelations = relations(subgraph_newResolver, ({ one }) =>
542
1021
  references: [subgraph_resolver.id]
543
1022
  })
544
1023
  }));
545
- var subgraph_newTTLRelations = relations(subgraph_newTTL, ({ one }) => ({
1024
+ var subgraph_newTTLRelations = relations3(subgraph_newTTL, ({ one }) => ({
546
1025
  domain: one(subgraph_domain, {
547
1026
  fields: [subgraph_newTTL.domainId],
548
1027
  references: [subgraph_domain.id]
549
1028
  })
550
1029
  }));
551
- var subgraph_wrappedTransferRelations = relations(subgraph_wrappedTransfer, ({ one }) => ({
1030
+ var subgraph_wrappedTransferRelations = relations3(subgraph_wrappedTransfer, ({ one }) => ({
552
1031
  domain: one(subgraph_domain, {
553
1032
  fields: [subgraph_wrappedTransfer.domainId],
554
1033
  references: [subgraph_domain.id]
@@ -558,7 +1037,7 @@ var subgraph_wrappedTransferRelations = relations(subgraph_wrappedTransfer, ({ o
558
1037
  references: [subgraph_account.id]
559
1038
  })
560
1039
  }));
561
- var subgraph_nameWrappedRelations = relations(subgraph_nameWrapped, ({ one }) => ({
1040
+ var subgraph_nameWrappedRelations = relations3(subgraph_nameWrapped, ({ one }) => ({
562
1041
  domain: one(subgraph_domain, {
563
1042
  fields: [subgraph_nameWrapped.domainId],
564
1043
  references: [subgraph_domain.id]
@@ -568,7 +1047,7 @@ var subgraph_nameWrappedRelations = relations(subgraph_nameWrapped, ({ one }) =>
568
1047
  references: [subgraph_account.id]
569
1048
  })
570
1049
  }));
571
- var subgraph_nameUnwrappedRelations = relations(subgraph_nameUnwrapped, ({ one }) => ({
1050
+ var subgraph_nameUnwrappedRelations = relations3(subgraph_nameUnwrapped, ({ one }) => ({
572
1051
  domain: one(subgraph_domain, {
573
1052
  fields: [subgraph_nameUnwrapped.domainId],
574
1053
  references: [subgraph_domain.id]
@@ -578,19 +1057,19 @@ var subgraph_nameUnwrappedRelations = relations(subgraph_nameUnwrapped, ({ one }
578
1057
  references: [subgraph_account.id]
579
1058
  })
580
1059
  }));
581
- var subgraph_fusesSetRelations = relations(subgraph_fusesSet, ({ one }) => ({
1060
+ var subgraph_fusesSetRelations = relations3(subgraph_fusesSet, ({ one }) => ({
582
1061
  domain: one(subgraph_domain, {
583
1062
  fields: [subgraph_fusesSet.domainId],
584
1063
  references: [subgraph_domain.id]
585
1064
  })
586
1065
  }));
587
- var subgraph_expiryExtendedRelations = relations(subgraph_expiryExtended, ({ one }) => ({
1066
+ var subgraph_expiryExtendedRelations = relations3(subgraph_expiryExtended, ({ one }) => ({
588
1067
  domain: one(subgraph_domain, {
589
1068
  fields: [subgraph_expiryExtended.domainId],
590
1069
  references: [subgraph_domain.id]
591
1070
  })
592
1071
  }));
593
- var subgraph_nameRegisteredRelations = relations(subgraph_nameRegistered, ({ one }) => ({
1072
+ var subgraph_nameRegisteredRelations = relations3(subgraph_nameRegistered, ({ one }) => ({
594
1073
  registration: one(subgraph_registration, {
595
1074
  fields: [subgraph_nameRegistered.registrationId],
596
1075
  references: [subgraph_registration.id]
@@ -600,13 +1079,13 @@ var subgraph_nameRegisteredRelations = relations(subgraph_nameRegistered, ({ one
600
1079
  references: [subgraph_account.id]
601
1080
  })
602
1081
  }));
603
- var subgraph_nameRenewedRelations = relations(subgraph_nameRenewed, ({ one }) => ({
1082
+ var subgraph_nameRenewedRelations = relations3(subgraph_nameRenewed, ({ one }) => ({
604
1083
  registration: one(subgraph_registration, {
605
1084
  fields: [subgraph_nameRenewed.registrationId],
606
1085
  references: [subgraph_registration.id]
607
1086
  })
608
1087
  }));
609
- var subgraph_nameTransferredRelations = relations(subgraph_nameTransferred, ({ one }) => ({
1088
+ var subgraph_nameTransferredRelations = relations3(subgraph_nameTransferred, ({ one }) => ({
610
1089
  registration: one(subgraph_registration, {
611
1090
  fields: [subgraph_nameTransferred.registrationId],
612
1091
  references: [subgraph_registration.id]
@@ -616,7 +1095,7 @@ var subgraph_nameTransferredRelations = relations(subgraph_nameTransferred, ({ o
616
1095
  references: [subgraph_account.id]
617
1096
  })
618
1097
  }));
619
- var subgraph_addrChangedRelations = relations(subgraph_addrChanged, ({ one }) => ({
1098
+ var subgraph_addrChangedRelations = relations3(subgraph_addrChanged, ({ one }) => ({
620
1099
  resolver: one(subgraph_resolver, {
621
1100
  fields: [subgraph_addrChanged.resolverId],
622
1101
  references: [subgraph_resolver.id]
@@ -626,7 +1105,7 @@ var subgraph_addrChangedRelations = relations(subgraph_addrChanged, ({ one }) =>
626
1105
  references: [subgraph_account.id]
627
1106
  })
628
1107
  }));
629
- var subgraph_multicoinAddrChangedRelations = relations(
1108
+ var subgraph_multicoinAddrChangedRelations = relations3(
630
1109
  subgraph_multicoinAddrChanged,
631
1110
  ({ one }) => ({
632
1111
  resolver: one(subgraph_resolver, {
@@ -635,31 +1114,31 @@ var subgraph_multicoinAddrChangedRelations = relations(
635
1114
  })
636
1115
  })
637
1116
  );
638
- var subgraph_nameChangedRelations = relations(subgraph_nameChanged, ({ one }) => ({
1117
+ var subgraph_nameChangedRelations = relations3(subgraph_nameChanged, ({ one }) => ({
639
1118
  resolver: one(subgraph_resolver, {
640
1119
  fields: [subgraph_nameChanged.resolverId],
641
1120
  references: [subgraph_resolver.id]
642
1121
  })
643
1122
  }));
644
- var subgraph_abiChangedRelations = relations(subgraph_abiChanged, ({ one }) => ({
1123
+ var subgraph_abiChangedRelations = relations3(subgraph_abiChanged, ({ one }) => ({
645
1124
  resolver: one(subgraph_resolver, {
646
1125
  fields: [subgraph_abiChanged.resolverId],
647
1126
  references: [subgraph_resolver.id]
648
1127
  })
649
1128
  }));
650
- var subgraph_pubkeyChangedRelations = relations(subgraph_pubkeyChanged, ({ one }) => ({
1129
+ var subgraph_pubkeyChangedRelations = relations3(subgraph_pubkeyChanged, ({ one }) => ({
651
1130
  resolver: one(subgraph_resolver, {
652
1131
  fields: [subgraph_pubkeyChanged.resolverId],
653
1132
  references: [subgraph_resolver.id]
654
1133
  })
655
1134
  }));
656
- var subgraph_textChangedRelations = relations(subgraph_textChanged, ({ one }) => ({
1135
+ var subgraph_textChangedRelations = relations3(subgraph_textChanged, ({ one }) => ({
657
1136
  resolver: one(subgraph_resolver, {
658
1137
  fields: [subgraph_textChanged.resolverId],
659
1138
  references: [subgraph_resolver.id]
660
1139
  })
661
1140
  }));
662
- var subgraph_contenthashChangedRelations = relations(
1141
+ var subgraph_contenthashChangedRelations = relations3(
663
1142
  subgraph_contenthashChanged,
664
1143
  ({ one }) => ({
665
1144
  resolver: one(subgraph_resolver, {
@@ -668,7 +1147,7 @@ var subgraph_contenthashChangedRelations = relations(
668
1147
  })
669
1148
  })
670
1149
  );
671
- var subgraph_interfaceChangedRelations = relations(
1150
+ var subgraph_interfaceChangedRelations = relations3(
672
1151
  subgraph_interfaceChanged,
673
1152
  ({ one }) => ({
674
1153
  resolver: one(subgraph_resolver, {
@@ -677,7 +1156,7 @@ var subgraph_interfaceChangedRelations = relations(
677
1156
  })
678
1157
  })
679
1158
  );
680
- var subgraph_authorisationChangedRelations = relations(
1159
+ var subgraph_authorisationChangedRelations = relations3(
681
1160
  subgraph_authorisationChanged,
682
1161
  ({ one }) => ({
683
1162
  resolver: one(subgraph_resolver, {
@@ -686,220 +1165,13 @@ var subgraph_authorisationChangedRelations = relations(
686
1165
  })
687
1166
  })
688
1167
  );
689
- var subgraph_versionChangedRelations = relations(subgraph_versionChanged, ({ one }) => ({
1168
+ var subgraph_versionChangedRelations = relations3(subgraph_versionChanged, ({ one }) => ({
690
1169
  resolver: one(subgraph_resolver, {
691
1170
  fields: [subgraph_versionChanged.resolverId],
692
1171
  references: [subgraph_resolver.id]
693
1172
  })
694
1173
  }));
695
1174
 
696
- // src/schemas/protocol-acceleration.schema.ts
697
- import { onchainTable as onchainTable2, primaryKey, relations as relations2 } from "ponder";
698
- var reverseNameRecord = onchainTable2(
699
- "reverse_name_records",
700
- (t) => ({
701
- // keyed by (address, coinType)
702
- address: t.hex().notNull(),
703
- coinType: t.bigint().notNull(),
704
- /**
705
- * Represents the ENSIP-19 Reverse Name Record for a given (address, coinType).
706
- *
707
- * The value of this field is guaranteed to be a non-empty-string normalized ENS name (see
708
- * `interpretNameRecordValue` for additional context and specific guarantees). Unnormalized
709
- * names and empty string values are interpreted as a deletion of the associated Reverse Name
710
- * Record entity (represented in the schema as the _absence_ of a relevant Reverse Name Record
711
- * entity).
712
- */
713
- value: t.text().notNull()
714
- }),
715
- (t) => ({
716
- pk: primaryKey({ columns: [t.address, t.coinType] })
717
- })
718
- );
719
- var nodeResolverRelation = onchainTable2(
720
- "node_resolver_relations",
721
- (t) => ({
722
- // keyed by (chainId, registry, node)
723
- chainId: t.integer().notNull(),
724
- registry: t.hex().notNull(),
725
- node: t.hex().notNull(),
726
- /**
727
- * The Address of the Resolver contract this `node` has set (via Registry#NewResolver) within
728
- * the Registry on `chainId`.
729
- */
730
- resolver: t.hex().notNull()
731
- }),
732
- (t) => ({
733
- pk: primaryKey({ columns: [t.chainId, t.registry, t.node] })
734
- })
735
- );
736
- var resolverRecords = onchainTable2(
737
- "resolver_records",
738
- (t) => ({
739
- // keyed by (chainId, resolver, node)
740
- chainId: t.integer().notNull(),
741
- resolver: t.hex().notNull(),
742
- node: t.hex().notNull(),
743
- /**
744
- * Represents the value of the reverse-resolution (ENSIP-3) name() record, used for Reverse Resolution.
745
- *
746
- * The emitted record values are interpreted according to `interpretNameRecordValue` — unnormalized
747
- * names and empty string values are interpreted as a deletion of the associated record (represented
748
- * here as `null`).
749
- *
750
- * If set, the value of this field is guaranteed to be a non-empty-string normalized ENS name
751
- * (see `interpretNameRecordValue` for additional context and specific guarantees).
752
- */
753
- name: t.text()
754
- }),
755
- (t) => ({
756
- pk: primaryKey({ columns: [t.chainId, t.resolver, t.node] })
757
- })
758
- );
759
- var resolverRecords_relations = relations2(resolverRecords, ({ one, many }) => ({
760
- // resolverRecord has many address records
761
- addressRecords: many(resolverAddressRecord),
762
- // resolverRecord has many text records
763
- textRecords: many(resolverTextRecord)
764
- }));
765
- var resolverAddressRecord = onchainTable2(
766
- "resolver_address_records",
767
- (t) => ({
768
- // keyed by ((chainId, resolver, node), coinType)
769
- chainId: t.integer().notNull(),
770
- resolver: t.hex().notNull(),
771
- node: t.hex().notNull(),
772
- coinType: t.bigint().notNull(),
773
- /**
774
- * Represents the value of the Addresss Record specified by ((chainId, resolver, node), coinType).
775
- *
776
- * The value of this field is interpreted by `interpretAddressRecordValue` — see its implementation
777
- * for additional context and specific guarantees.
778
- */
779
- address: t.text().notNull()
780
- }),
781
- (t) => ({
782
- pk: primaryKey({ columns: [t.chainId, t.resolver, t.node, t.coinType] })
783
- })
784
- );
785
- var resolverAddressRecordRelations = relations2(resolverAddressRecord, ({ one, many }) => ({
786
- // belongs to resolverRecord
787
- resolver: one(resolverRecords, {
788
- fields: [
789
- resolverAddressRecord.chainId,
790
- resolverAddressRecord.resolver,
791
- resolverAddressRecord.node
792
- ],
793
- references: [resolverRecords.chainId, resolverRecords.resolver, resolverRecords.node]
794
- })
795
- }));
796
- var resolverTextRecord = onchainTable2(
797
- "resolver_trecords",
798
- (t) => ({
799
- // keyed by ((chainId, resolver, node), key)
800
- chainId: t.integer().notNull(),
801
- resolver: t.hex().notNull(),
802
- node: t.hex().notNull(),
803
- key: t.text().notNull(),
804
- /**
805
- * Represents the value of the Text Record specified by ((chainId, resolver, node), key).
806
- *
807
- * The value of this field is interpreted by `interpretTextRecordValue` — see its implementation
808
- * for additional context and specific guarantees.
809
- */
810
- value: t.text().notNull()
811
- }),
812
- (t) => ({
813
- pk: primaryKey({ columns: [t.chainId, t.resolver, t.node, t.key] })
814
- })
815
- );
816
- var resolverTextRecordRelations = relations2(resolverTextRecord, ({ one, many }) => ({
817
- // belongs to resolverRecord
818
- resolver: one(resolverRecords, {
819
- fields: [resolverTextRecord.chainId, resolverTextRecord.resolver, resolverTextRecord.node],
820
- references: [resolverRecords.chainId, resolverRecords.resolver, resolverRecords.node]
821
- })
822
- }));
823
- var migratedNode = onchainTable2("migrated_nodes", (t) => ({
824
- node: t.hex().primaryKey()
825
- }));
826
-
827
- // src/schemas/referrals.schema.ts
828
- import { index as index2, onchainTable as onchainTable3, relations as relations3 } from "ponder";
829
- var registrationReferral = onchainTable3(
830
- "registration_referral",
831
- (t) => ({
832
- // keyed by any arbitrary unique id, usually `event.id`
833
- id: t.text().primaryKey(),
834
- referrer: t.hex().notNull(),
835
- node: t.hex().notNull(),
836
- referee: t.hex().notNull(),
837
- baseCost: t.bigint().notNull(),
838
- premium: t.bigint().notNull(),
839
- total: t.bigint().notNull(),
840
- // chainId the transaction occurred on
841
- chainId: t.integer().notNull(),
842
- // transaction's hash
843
- transactionHash: t.hex().notNull(),
844
- // block's Unix timestamp in seconds
845
- timestamp: t.bigint().notNull()
846
- }),
847
- (t) => ({
848
- byReferee: index2().on(t.referee),
849
- byReferrer: index2().on(t.referrer)
850
- })
851
- );
852
- var registrationReferral_relations = relations3(registrationReferral, ({ one, many }) => ({
853
- // RegistrationReferral belongs to Referrer
854
- referrer: one(referrer, {
855
- fields: [registrationReferral.referrer],
856
- references: [referrer.id]
857
- })
858
- }));
859
- var renewalReferral = onchainTable3(
860
- "renewal_referral",
861
- (t) => ({
862
- // keyed by any arbitrary unique id, usually `event.id`
863
- id: t.text().primaryKey(),
864
- referrer: t.hex().notNull(),
865
- referee: t.hex().notNull(),
866
- node: t.hex().notNull(),
867
- cost: t.bigint().notNull(),
868
- // chainId the transaction occurred on
869
- chainId: t.integer().notNull(),
870
- // transaction's hash
871
- transactionHash: t.hex().notNull(),
872
- // Block's Unix timestamp in seconds
873
- timestamp: t.bigint().notNull()
874
- }),
875
- (t) => ({
876
- byReferee: index2().on(t.referee),
877
- byReferrer: index2().on(t.referrer)
878
- })
879
- );
880
- var renewalReferral_relations = relations3(renewalReferral, ({ one, many }) => ({
881
- // RenewalReferral belongs to Referrer
882
- referrer: one(referrer, {
883
- fields: [renewalReferral.referrer],
884
- references: [referrer.id]
885
- })
886
- }));
887
- var referrer = onchainTable3(
888
- "referral_totals",
889
- (t) => ({
890
- // keyed by Referrer's id (bytes32 hex)
891
- id: t.hex().primaryKey(),
892
- valueWei: t.bigint().notNull()
893
- }),
894
- (t) => ({})
895
- );
896
- var referrer_relations = relations3(referrer, ({ one, many }) => ({
897
- // Referrer has many RegistrationReferrals
898
- registrationReferrals: many(registrationReferral),
899
- // Referrer has many RenewalReferrals
900
- renewalReferrals: many(renewalReferral)
901
- }));
902
-
903
1175
  // src/schemas/tokenscope.schema.ts
904
1176
  import { index as index3, onchainTable as onchainTable4 } from "ponder";
905
1177
  var nameSales = onchainTable4(
@@ -1083,16 +1355,16 @@ var nameTokens = onchainTable4(
1083
1355
  })
1084
1356
  );
1085
1357
  export {
1358
+ internal_registrarActionMetadata,
1086
1359
  migratedNode,
1087
1360
  nameSales,
1088
1361
  nameTokens,
1089
1362
  nodeResolverRelation,
1090
- referrer,
1091
- referrer_relations,
1092
- registrationReferral,
1093
- registrationReferral_relations,
1094
- renewalReferral,
1095
- renewalReferral_relations,
1363
+ registrarActionRelations,
1364
+ registrarActionType,
1365
+ registrarActions,
1366
+ registrationLifecycleRelations,
1367
+ registrationLifecycles,
1096
1368
  resolverAddressRecord,
1097
1369
  resolverAddressRecordRelations,
1098
1370
  resolverRecords,
@@ -1153,6 +1425,8 @@ export {
1153
1425
  subgraph_wrappedDomain,
1154
1426
  subgraph_wrappedDomainRelations,
1155
1427
  subgraph_wrappedTransfer,
1156
- subgraph_wrappedTransferRelations
1428
+ subgraph_wrappedTransferRelations,
1429
+ subregistries,
1430
+ subregistryRelations
1157
1431
  };
1158
1432
  //# sourceMappingURL=ponder.schema.js.map