@ensnode/ensnode-schema 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ponder.schema.js +742 -566
- package/dist/ponder.schema.js.map +1 -1
- package/package.json +3 -3
package/dist/ponder.schema.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// src/subgraph.schema.ts
|
|
1
|
+
// src/schemas/subgraph.schema.ts
|
|
2
2
|
import { index, onchainTable, relations } from "ponder";
|
|
3
3
|
|
|
4
|
-
// src/collate.ts
|
|
4
|
+
// src/lib/collate.ts
|
|
5
5
|
function monkeypatchCollate(col, collation) {
|
|
6
6
|
col.getSQLType = function() {
|
|
7
7
|
return Object.getPrototypeOf(this).getSQLType.call(this) + " COLLATE " + collation;
|
|
@@ -9,90 +9,140 @@ function monkeypatchCollate(col, collation) {
|
|
|
9
9
|
return col;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
// src/subgraph.schema.ts
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
12
|
+
// src/schemas/subgraph.schema.ts
|
|
13
|
+
var subgraph_domain = onchainTable(
|
|
14
|
+
"subgraph_domains",
|
|
15
|
+
(t) => ({
|
|
16
|
+
// The namehash of the name
|
|
17
|
+
id: t.hex().primaryKey(),
|
|
18
|
+
/**
|
|
19
|
+
* The ENS Name that this Domain represents.
|
|
20
|
+
*
|
|
21
|
+
* If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:
|
|
22
|
+
* a) null (in the case of the root node), or
|
|
23
|
+
* b) a Subgraph Interpreted Name.
|
|
24
|
+
*
|
|
25
|
+
* @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation
|
|
26
|
+
*
|
|
27
|
+
* Otherwise, this value is guaranteed to be an Interpreted Name, which is either:
|
|
28
|
+
* a) a normalized Name, or
|
|
29
|
+
* b) a Name entirely consisting of Interpreted Labels.
|
|
30
|
+
*
|
|
31
|
+
* Note that the type of the column will remain string | null, for legacy subgraph compatibility,
|
|
32
|
+
* but in practice will never be null. The Root node's name will be '' (empty string).
|
|
33
|
+
*
|
|
34
|
+
* @see https://ensnode.io/docs/reference/terminology#interpreted-name
|
|
35
|
+
*/
|
|
36
|
+
name: t.text(),
|
|
37
|
+
/**
|
|
38
|
+
* The Label associated with the Domain.
|
|
39
|
+
*
|
|
40
|
+
* If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:
|
|
41
|
+
* a) null, in the case of the root Node or a name whose childmost label is subgraph-unindexable, or
|
|
42
|
+
* b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).
|
|
43
|
+
*
|
|
44
|
+
* @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation
|
|
45
|
+
*
|
|
46
|
+
* Otherwise, this value is guaranteed to be an Interpreted Label which is either:
|
|
47
|
+
* a) null, exclusively in the case of the root Node,
|
|
48
|
+
* b) a normalized Label, or
|
|
49
|
+
* c) an Encoded LabelHash, which encodes either
|
|
50
|
+
* i. in the case of an Unknown Label, the LabelHash emitted onchain, or
|
|
51
|
+
* ii. in the case of an Unnormalized Label, the LabelHash of the Literal Label value found onchain.
|
|
52
|
+
*
|
|
53
|
+
* @see https://ensnode.io/docs/reference/terminology#interpreted-label
|
|
54
|
+
*/
|
|
55
|
+
labelName: t.text(),
|
|
56
|
+
// keccak256(labelName)
|
|
57
|
+
labelhash: t.hex(),
|
|
58
|
+
// The namehash (id) of the parent name
|
|
59
|
+
parentId: t.hex(),
|
|
60
|
+
// The number of subdomains
|
|
61
|
+
subdomainCount: t.integer().notNull().default(0),
|
|
62
|
+
// Address logged from current resolver, if any
|
|
63
|
+
resolvedAddressId: t.hex(),
|
|
64
|
+
// The resolver that controls the domain's settings
|
|
65
|
+
resolverId: t.text(),
|
|
66
|
+
// The time-to-live (TTL) value of the domain's records
|
|
67
|
+
ttl: t.bigint(),
|
|
68
|
+
// Indicates whether the domain has been migrated to a new registrar
|
|
69
|
+
isMigrated: t.boolean().notNull().default(false),
|
|
70
|
+
// The time when the domain was created
|
|
71
|
+
createdAt: t.bigint().notNull(),
|
|
72
|
+
// The account that owns the domain
|
|
73
|
+
ownerId: t.hex().notNull(),
|
|
74
|
+
// The account that owns the ERC721 NFT for the domain
|
|
75
|
+
registrantId: t.hex(),
|
|
76
|
+
// The account that owns the wrapped domain
|
|
77
|
+
wrappedOwnerId: t.hex(),
|
|
78
|
+
// The expiry date for the domain, from either the registration, or the wrapped domain if PCC is burned
|
|
79
|
+
expiryDate: t.bigint()
|
|
80
|
+
}),
|
|
81
|
+
(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)
|
|
87
|
+
})
|
|
88
|
+
);
|
|
89
|
+
monkeypatchCollate(subgraph_domain.name, '"C"');
|
|
90
|
+
monkeypatchCollate(subgraph_domain.labelName, '"C"');
|
|
91
|
+
var subgraph_domainRelations = relations(subgraph_domain, ({ one, many }) => ({
|
|
92
|
+
resolvedAddress: one(subgraph_account, {
|
|
93
|
+
fields: [subgraph_domain.resolvedAddressId],
|
|
94
|
+
references: [subgraph_account.id]
|
|
95
|
+
}),
|
|
96
|
+
owner: one(subgraph_account, {
|
|
97
|
+
fields: [subgraph_domain.ownerId],
|
|
98
|
+
references: [subgraph_account.id]
|
|
99
|
+
}),
|
|
100
|
+
parent: one(subgraph_domain, {
|
|
101
|
+
fields: [subgraph_domain.parentId],
|
|
102
|
+
references: [subgraph_domain.id]
|
|
103
|
+
}),
|
|
104
|
+
resolver: one(subgraph_resolver, {
|
|
105
|
+
fields: [subgraph_domain.resolverId],
|
|
106
|
+
references: [subgraph_resolver.id]
|
|
107
|
+
}),
|
|
108
|
+
subdomains: many(subgraph_domain, { relationName: "parent" }),
|
|
109
|
+
registrant: one(subgraph_account, {
|
|
110
|
+
fields: [subgraph_domain.registrantId],
|
|
111
|
+
references: [subgraph_account.id]
|
|
112
|
+
}),
|
|
113
|
+
wrappedOwner: one(subgraph_account, {
|
|
114
|
+
fields: [subgraph_domain.wrappedOwnerId],
|
|
115
|
+
references: [subgraph_account.id]
|
|
116
|
+
}),
|
|
117
|
+
wrappedDomain: one(subgraph_wrappedDomain, {
|
|
118
|
+
fields: [subgraph_domain.id],
|
|
119
|
+
references: [subgraph_wrappedDomain.domainId]
|
|
120
|
+
}),
|
|
121
|
+
registration: one(subgraph_registration, {
|
|
122
|
+
fields: [subgraph_domain.id],
|
|
123
|
+
references: [subgraph_registration.domainId]
|
|
74
124
|
}),
|
|
75
125
|
// event relations
|
|
76
|
-
transfers: many(
|
|
77
|
-
newOwners: many(
|
|
78
|
-
newResolvers: many(
|
|
79
|
-
newTTLs: many(
|
|
80
|
-
wrappedTransfers: many(
|
|
81
|
-
nameWrappeds: many(
|
|
82
|
-
nameUnwrappeds: many(
|
|
83
|
-
fusesSets: many(
|
|
84
|
-
expiryExtendeds: many(
|
|
126
|
+
transfers: many(subgraph_transfer),
|
|
127
|
+
newOwners: many(subgraph_newOwner),
|
|
128
|
+
newResolvers: many(subgraph_newResolver),
|
|
129
|
+
newTTLs: many(subgraph_newTTL),
|
|
130
|
+
wrappedTransfers: many(subgraph_wrappedTransfer),
|
|
131
|
+
nameWrappeds: many(subgraph_nameWrapped),
|
|
132
|
+
nameUnwrappeds: many(subgraph_nameUnwrapped),
|
|
133
|
+
fusesSets: many(subgraph_fusesSet),
|
|
134
|
+
expiryExtendeds: many(subgraph_expiryExtended)
|
|
85
135
|
}));
|
|
86
|
-
var
|
|
136
|
+
var subgraph_account = onchainTable("subgraph_accounts", (t) => ({
|
|
87
137
|
id: t.hex().primaryKey()
|
|
88
138
|
}));
|
|
89
|
-
var
|
|
90
|
-
domains: many(
|
|
91
|
-
wrappedDomains: many(
|
|
92
|
-
registrations: many(
|
|
139
|
+
var subgraph_accountRelations = relations(subgraph_account, ({ many }) => ({
|
|
140
|
+
domains: many(subgraph_domain),
|
|
141
|
+
wrappedDomains: many(subgraph_wrappedDomain),
|
|
142
|
+
registrations: many(subgraph_registration)
|
|
93
143
|
}));
|
|
94
|
-
var
|
|
95
|
-
"
|
|
144
|
+
var subgraph_resolver = onchainTable(
|
|
145
|
+
"subgraph_resolvers",
|
|
96
146
|
(t) => ({
|
|
97
147
|
// The unique identifier for this resolver, which is a concatenation of the domain namehash and the resolver address
|
|
98
148
|
id: t.text().primaryKey(),
|
|
@@ -109,33 +159,35 @@ var resolver = onchainTable(
|
|
|
109
159
|
texts: t.text().array(),
|
|
110
160
|
// The set of observed SLIP-44 coin types for this resolver
|
|
111
161
|
// NOTE: we avoid .notNull.default([]) to match subgraph behavior
|
|
112
|
-
coinTypes: t.bigint().array()
|
|
113
|
-
// NOTE(resolver-records): include the value of the reverse-resolution name() record
|
|
114
|
-
// https://docs.ens.domains/ensip/3
|
|
115
|
-
// NOTE: this is the sanitized name record value with (see @/lib/sanitize-name-record)
|
|
116
|
-
name: t.text()
|
|
162
|
+
coinTypes: t.bigint().array()
|
|
117
163
|
}),
|
|
118
164
|
(t) => ({
|
|
119
|
-
|
|
165
|
+
byDomainId: index().on(t.domainId)
|
|
120
166
|
})
|
|
121
167
|
);
|
|
122
|
-
var
|
|
123
|
-
addr: one(
|
|
124
|
-
|
|
168
|
+
var subgraph_resolverRelations = relations(subgraph_resolver, ({ one, many }) => ({
|
|
169
|
+
addr: one(subgraph_account, {
|
|
170
|
+
fields: [subgraph_resolver.addrId],
|
|
171
|
+
references: [subgraph_account.id]
|
|
172
|
+
}),
|
|
173
|
+
domain: one(subgraph_domain, {
|
|
174
|
+
fields: [subgraph_resolver.domainId],
|
|
175
|
+
references: [subgraph_domain.id]
|
|
176
|
+
}),
|
|
125
177
|
// event relations
|
|
126
|
-
addrChangeds: many(
|
|
127
|
-
multicoinAddrChangeds: many(
|
|
128
|
-
nameChangeds: many(
|
|
129
|
-
abiChangeds: many(
|
|
130
|
-
pubkeyChangeds: many(
|
|
131
|
-
textChangeds: many(
|
|
132
|
-
contenthashChangeds: many(
|
|
133
|
-
interfaceChangeds: many(
|
|
134
|
-
authorisationChangeds: many(
|
|
135
|
-
versionChangeds: many(
|
|
178
|
+
addrChangeds: many(subgraph_addrChanged),
|
|
179
|
+
multicoinAddrChangeds: many(subgraph_multicoinAddrChanged),
|
|
180
|
+
nameChangeds: many(subgraph_nameChanged),
|
|
181
|
+
abiChangeds: many(subgraph_abiChanged),
|
|
182
|
+
pubkeyChangeds: many(subgraph_pubkeyChanged),
|
|
183
|
+
textChangeds: many(subgraph_textChanged),
|
|
184
|
+
contenthashChangeds: many(subgraph_contenthashChanged),
|
|
185
|
+
interfaceChangeds: many(subgraph_interfaceChanged),
|
|
186
|
+
authorisationChangeds: many(subgraph_authorisationChanged),
|
|
187
|
+
versionChangeds: many(subgraph_versionChanged)
|
|
136
188
|
}));
|
|
137
|
-
var
|
|
138
|
-
"
|
|
189
|
+
var subgraph_registration = onchainTable(
|
|
190
|
+
"subgraph_registrations",
|
|
139
191
|
(t) => ({
|
|
140
192
|
// The unique identifier of the registration
|
|
141
193
|
id: t.hex().primaryKey(),
|
|
@@ -149,29 +201,48 @@ var registration = onchainTable(
|
|
|
149
201
|
cost: t.bigint(),
|
|
150
202
|
// The account that registered the domain
|
|
151
203
|
registrantId: t.hex().notNull(),
|
|
152
|
-
|
|
204
|
+
/**
|
|
205
|
+
* The Label associated with the domain registration.
|
|
206
|
+
*
|
|
207
|
+
* If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:
|
|
208
|
+
* a) null, in the case of the root Node or a Domain whose label is subgraph-unindexable, or
|
|
209
|
+
* b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).
|
|
210
|
+
*
|
|
211
|
+
* @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation
|
|
212
|
+
*
|
|
213
|
+
* Otherwise, this value is guaranteed to be an Interpreted Label which is either:
|
|
214
|
+
* a) a normalized Label, or
|
|
215
|
+
* b) in the case of an Unnormalized Label, an Encoded LabelHash of the Literal Label value found onchain.
|
|
216
|
+
*
|
|
217
|
+
* Note that the type of the column will remain string | null, for legacy subgraph compatibility.
|
|
218
|
+
* In practice however, because there is no Registration entity for the root Node (the only Node
|
|
219
|
+
* with a null labelName) this field will never be null.
|
|
220
|
+
*
|
|
221
|
+
* @see https://ensnode.io/docs/reference/terminology#interpreted-label
|
|
222
|
+
*/
|
|
153
223
|
labelName: t.text()
|
|
154
224
|
}),
|
|
155
225
|
(t) => ({
|
|
156
|
-
|
|
226
|
+
byDomainId: index().on(t.domainId),
|
|
227
|
+
byRegistrationDate: index().on(t.registrationDate)
|
|
157
228
|
})
|
|
158
229
|
);
|
|
159
|
-
var
|
|
160
|
-
domain: one(
|
|
161
|
-
fields: [
|
|
162
|
-
references: [
|
|
230
|
+
var subgraph_registrationRelations = relations(subgraph_registration, ({ one, many }) => ({
|
|
231
|
+
domain: one(subgraph_domain, {
|
|
232
|
+
fields: [subgraph_registration.domainId],
|
|
233
|
+
references: [subgraph_domain.id]
|
|
163
234
|
}),
|
|
164
|
-
registrant: one(
|
|
165
|
-
fields: [
|
|
166
|
-
references: [
|
|
235
|
+
registrant: one(subgraph_account, {
|
|
236
|
+
fields: [subgraph_registration.registrantId],
|
|
237
|
+
references: [subgraph_account.id]
|
|
167
238
|
}),
|
|
168
239
|
// event relations
|
|
169
|
-
nameRegistereds: many(
|
|
170
|
-
nameReneweds: many(
|
|
171
|
-
nameTransferreds: many(
|
|
240
|
+
nameRegistereds: many(subgraph_nameRegistered),
|
|
241
|
+
nameReneweds: many(subgraph_nameRenewed),
|
|
242
|
+
nameTransferreds: many(subgraph_nameTransferred)
|
|
172
243
|
}));
|
|
173
|
-
var
|
|
174
|
-
"
|
|
244
|
+
var subgraph_wrappedDomain = onchainTable(
|
|
245
|
+
"subgraph_wrapped_domains",
|
|
175
246
|
(t) => ({
|
|
176
247
|
// The unique identifier for each instance of the WrappedDomain entity
|
|
177
248
|
id: t.hex().primaryKey(),
|
|
@@ -183,21 +254,36 @@ var wrappedDomain = onchainTable(
|
|
|
183
254
|
fuses: t.integer().notNull(),
|
|
184
255
|
// The account that owns this WrappedDomain
|
|
185
256
|
ownerId: t.hex().notNull(),
|
|
186
|
-
|
|
257
|
+
/**
|
|
258
|
+
* The Name that this WrappedDomain represents. Names are emitted by the NameWrapper contract as
|
|
259
|
+
* DNS-Encoded Names which may be malformed, which will result in this field being `null`.
|
|
260
|
+
*
|
|
261
|
+
* If {@link ENSIndexerConfig#isSubgraphCompatible}, this value is guaranteed to be either:
|
|
262
|
+
* a) null (in the case of a DNS-Encoded Name that is malformed or contains subgraph-unindexable labels), or
|
|
263
|
+
* b) a subgraph-indexable Subgraph Interpreted Label (i.e. a Literal Label of undefined normalization).
|
|
264
|
+
*
|
|
265
|
+
* @see https://ensnode.io/docs/reference/terminology#subgraph-indexability--labelname-interpretation
|
|
266
|
+
*
|
|
267
|
+
* Otherwise, this value is guaranteed to be either:
|
|
268
|
+
* a) null (in the case of a malformed DNS-Encoded Name),
|
|
269
|
+
* b) an Interpreted Name.
|
|
270
|
+
*
|
|
271
|
+
* @see https://ensnode.io/docs/reference/terminology#interpreted-name
|
|
272
|
+
*/
|
|
187
273
|
name: t.text()
|
|
188
274
|
}),
|
|
189
275
|
(t) => ({
|
|
190
|
-
|
|
276
|
+
byDomainId: index().on(t.domainId)
|
|
191
277
|
})
|
|
192
278
|
);
|
|
193
|
-
var
|
|
194
|
-
domain: one(
|
|
195
|
-
fields: [
|
|
196
|
-
references: [
|
|
279
|
+
var subgraph_wrappedDomainRelations = relations(subgraph_wrappedDomain, ({ one }) => ({
|
|
280
|
+
domain: one(subgraph_domain, {
|
|
281
|
+
fields: [subgraph_wrappedDomain.domainId],
|
|
282
|
+
references: [subgraph_domain.id]
|
|
197
283
|
}),
|
|
198
|
-
owner: one(
|
|
199
|
-
fields: [
|
|
200
|
-
references: [
|
|
284
|
+
owner: one(subgraph_account, {
|
|
285
|
+
fields: [subgraph_wrappedDomain.ownerId],
|
|
286
|
+
references: [subgraph_account.id]
|
|
201
287
|
})
|
|
202
288
|
}));
|
|
203
289
|
var sharedEventColumns = (t) => ({
|
|
@@ -215,16 +301,16 @@ var domainEventIndex = (t) => ({
|
|
|
215
301
|
// sorting index
|
|
216
302
|
idx_compound: index().on(t.domainId, t.id)
|
|
217
303
|
});
|
|
218
|
-
var
|
|
219
|
-
"
|
|
304
|
+
var subgraph_transfer = onchainTable(
|
|
305
|
+
"subgraph_transfers",
|
|
220
306
|
(t) => ({
|
|
221
307
|
...domainEvent(t),
|
|
222
308
|
ownerId: t.hex().notNull()
|
|
223
309
|
}),
|
|
224
310
|
domainEventIndex
|
|
225
311
|
);
|
|
226
|
-
var
|
|
227
|
-
"
|
|
312
|
+
var subgraph_newOwner = onchainTable(
|
|
313
|
+
"subgraph_new_owners",
|
|
228
314
|
(t) => ({
|
|
229
315
|
...domainEvent(t),
|
|
230
316
|
ownerId: t.hex().notNull(),
|
|
@@ -232,32 +318,32 @@ var newOwner = onchainTable(
|
|
|
232
318
|
}),
|
|
233
319
|
domainEventIndex
|
|
234
320
|
);
|
|
235
|
-
var
|
|
236
|
-
"
|
|
321
|
+
var subgraph_newResolver = onchainTable(
|
|
322
|
+
"subgraph_new_resolvers",
|
|
237
323
|
(t) => ({
|
|
238
324
|
...domainEvent(t),
|
|
239
325
|
resolverId: t.text().notNull()
|
|
240
326
|
}),
|
|
241
327
|
domainEventIndex
|
|
242
328
|
);
|
|
243
|
-
var
|
|
244
|
-
"
|
|
329
|
+
var subgraph_newTTL = onchainTable(
|
|
330
|
+
"subgraph_new_ttls",
|
|
245
331
|
(t) => ({
|
|
246
332
|
...domainEvent(t),
|
|
247
333
|
ttl: t.bigint().notNull()
|
|
248
334
|
}),
|
|
249
335
|
domainEventIndex
|
|
250
336
|
);
|
|
251
|
-
var
|
|
252
|
-
"
|
|
337
|
+
var subgraph_wrappedTransfer = onchainTable(
|
|
338
|
+
"subgraph_wrapped_transfers",
|
|
253
339
|
(t) => ({
|
|
254
340
|
...domainEvent(t),
|
|
255
341
|
ownerId: t.hex().notNull()
|
|
256
342
|
}),
|
|
257
343
|
domainEventIndex
|
|
258
344
|
);
|
|
259
|
-
var
|
|
260
|
-
"
|
|
345
|
+
var subgraph_nameWrapped = onchainTable(
|
|
346
|
+
"subgraph_name_wrapped",
|
|
261
347
|
(t) => ({
|
|
262
348
|
...domainEvent(t),
|
|
263
349
|
name: t.text(),
|
|
@@ -267,24 +353,24 @@ var nameWrapped = onchainTable(
|
|
|
267
353
|
}),
|
|
268
354
|
domainEventIndex
|
|
269
355
|
);
|
|
270
|
-
var
|
|
271
|
-
"
|
|
356
|
+
var subgraph_nameUnwrapped = onchainTable(
|
|
357
|
+
"subgraph_name_unwrapped",
|
|
272
358
|
(t) => ({
|
|
273
359
|
...domainEvent(t),
|
|
274
360
|
ownerId: t.hex().notNull()
|
|
275
361
|
}),
|
|
276
362
|
domainEventIndex
|
|
277
363
|
);
|
|
278
|
-
var
|
|
279
|
-
"
|
|
364
|
+
var subgraph_fusesSet = onchainTable(
|
|
365
|
+
"subgraph_fuses_set",
|
|
280
366
|
(t) => ({
|
|
281
367
|
...domainEvent(t),
|
|
282
368
|
fuses: t.integer().notNull()
|
|
283
369
|
}),
|
|
284
370
|
domainEventIndex
|
|
285
371
|
);
|
|
286
|
-
var
|
|
287
|
-
"
|
|
372
|
+
var subgraph_expiryExtended = onchainTable(
|
|
373
|
+
"subgraph_expiry_extended",
|
|
288
374
|
(t) => ({
|
|
289
375
|
...domainEvent(t),
|
|
290
376
|
expiryDate: t.bigint().notNull()
|
|
@@ -301,8 +387,8 @@ var registrationEventIndex = (t) => ({
|
|
|
301
387
|
// sorting index
|
|
302
388
|
idx_compound: index().on(t.registrationId, t.id)
|
|
303
389
|
});
|
|
304
|
-
var
|
|
305
|
-
"
|
|
390
|
+
var subgraph_nameRegistered = onchainTable(
|
|
391
|
+
"subgraph_name_registered",
|
|
306
392
|
(t) => ({
|
|
307
393
|
...registrationEvent(t),
|
|
308
394
|
registrantId: t.hex().notNull(),
|
|
@@ -310,16 +396,16 @@ var nameRegistered = onchainTable(
|
|
|
310
396
|
}),
|
|
311
397
|
registrationEventIndex
|
|
312
398
|
);
|
|
313
|
-
var
|
|
314
|
-
"
|
|
399
|
+
var subgraph_nameRenewed = onchainTable(
|
|
400
|
+
"subgraph_name_renewed",
|
|
315
401
|
(t) => ({
|
|
316
402
|
...registrationEvent(t),
|
|
317
403
|
expiryDate: t.bigint().notNull()
|
|
318
404
|
}),
|
|
319
405
|
registrationEventIndex
|
|
320
406
|
);
|
|
321
|
-
var
|
|
322
|
-
"
|
|
407
|
+
var subgraph_nameTransferred = onchainTable(
|
|
408
|
+
"subgraph_name_transferred",
|
|
323
409
|
(t) => ({
|
|
324
410
|
...registrationEvent(t),
|
|
325
411
|
newOwnerId: t.hex().notNull()
|
|
@@ -336,16 +422,16 @@ var resolverEventIndex = (t) => ({
|
|
|
336
422
|
// sorting index
|
|
337
423
|
idx_compound: index().on(t.resolverId, t.id)
|
|
338
424
|
});
|
|
339
|
-
var
|
|
340
|
-
"
|
|
425
|
+
var subgraph_addrChanged = onchainTable(
|
|
426
|
+
"subgraph_addr_changed",
|
|
341
427
|
(t) => ({
|
|
342
428
|
...resolverEvent(t),
|
|
343
429
|
addrId: t.hex().notNull()
|
|
344
430
|
}),
|
|
345
431
|
resolverEventIndex
|
|
346
432
|
);
|
|
347
|
-
var
|
|
348
|
-
"
|
|
433
|
+
var subgraph_multicoinAddrChanged = onchainTable(
|
|
434
|
+
"subgraph_multicoin_addr_changed",
|
|
349
435
|
(t) => ({
|
|
350
436
|
...resolverEvent(t),
|
|
351
437
|
coinType: t.bigint().notNull(),
|
|
@@ -353,24 +439,24 @@ var multicoinAddrChanged = onchainTable(
|
|
|
353
439
|
}),
|
|
354
440
|
resolverEventIndex
|
|
355
441
|
);
|
|
356
|
-
var
|
|
357
|
-
"
|
|
442
|
+
var subgraph_nameChanged = onchainTable(
|
|
443
|
+
"subgraph_name_changed",
|
|
358
444
|
(t) => ({
|
|
359
445
|
...resolverEvent(t),
|
|
360
446
|
name: t.text().notNull()
|
|
361
447
|
}),
|
|
362
448
|
resolverEventIndex
|
|
363
449
|
);
|
|
364
|
-
var
|
|
365
|
-
"
|
|
450
|
+
var subgraph_abiChanged = onchainTable(
|
|
451
|
+
"subgraph_abi_changed",
|
|
366
452
|
(t) => ({
|
|
367
453
|
...resolverEvent(t),
|
|
368
454
|
contentType: t.bigint().notNull()
|
|
369
455
|
}),
|
|
370
456
|
resolverEventIndex
|
|
371
457
|
);
|
|
372
|
-
var
|
|
373
|
-
"
|
|
458
|
+
var subgraph_pubkeyChanged = onchainTable(
|
|
459
|
+
"subgraph_pubkey_changed",
|
|
374
460
|
(t) => ({
|
|
375
461
|
...resolverEvent(t),
|
|
376
462
|
x: t.hex().notNull(),
|
|
@@ -378,8 +464,8 @@ var pubkeyChanged = onchainTable(
|
|
|
378
464
|
}),
|
|
379
465
|
resolverEventIndex
|
|
380
466
|
);
|
|
381
|
-
var
|
|
382
|
-
"
|
|
467
|
+
var subgraph_textChanged = onchainTable(
|
|
468
|
+
"subgraph_text_changed",
|
|
383
469
|
(t) => ({
|
|
384
470
|
...resolverEvent(t),
|
|
385
471
|
key: t.text().notNull(),
|
|
@@ -387,16 +473,16 @@ var textChanged = onchainTable(
|
|
|
387
473
|
}),
|
|
388
474
|
resolverEventIndex
|
|
389
475
|
);
|
|
390
|
-
var
|
|
391
|
-
"
|
|
476
|
+
var subgraph_contenthashChanged = onchainTable(
|
|
477
|
+
"subgraph_contenthash_changed",
|
|
392
478
|
(t) => ({
|
|
393
479
|
...resolverEvent(t),
|
|
394
480
|
hash: t.hex().notNull()
|
|
395
481
|
}),
|
|
396
482
|
resolverEventIndex
|
|
397
483
|
);
|
|
398
|
-
var
|
|
399
|
-
"
|
|
484
|
+
var subgraph_interfaceChanged = onchainTable(
|
|
485
|
+
"subgraph_interface_changed",
|
|
400
486
|
(t) => ({
|
|
401
487
|
...resolverEvent(t),
|
|
402
488
|
interfaceID: t.hex().notNull(),
|
|
@@ -404,8 +490,8 @@ var interfaceChanged = onchainTable(
|
|
|
404
490
|
}),
|
|
405
491
|
resolverEventIndex
|
|
406
492
|
);
|
|
407
|
-
var
|
|
408
|
-
"
|
|
493
|
+
var subgraph_authorisationChanged = onchainTable(
|
|
494
|
+
"subgraph_authorisation_changed",
|
|
409
495
|
(t) => ({
|
|
410
496
|
...resolverEvent(t),
|
|
411
497
|
owner: t.hex().notNull(),
|
|
@@ -414,229 +500,410 @@ var authorisationChanged = onchainTable(
|
|
|
414
500
|
}),
|
|
415
501
|
resolverEventIndex
|
|
416
502
|
);
|
|
417
|
-
var
|
|
418
|
-
"
|
|
503
|
+
var subgraph_versionChanged = onchainTable(
|
|
504
|
+
"subgraph_version_changed",
|
|
419
505
|
(t) => ({
|
|
420
506
|
...resolverEvent(t),
|
|
421
507
|
version: t.bigint().notNull()
|
|
422
508
|
}),
|
|
423
509
|
resolverEventIndex
|
|
424
510
|
);
|
|
425
|
-
var
|
|
426
|
-
domain: one(
|
|
427
|
-
|
|
511
|
+
var subgraph_transferRelations = relations(subgraph_transfer, ({ one }) => ({
|
|
512
|
+
domain: one(subgraph_domain, {
|
|
513
|
+
fields: [subgraph_transfer.domainId],
|
|
514
|
+
references: [subgraph_domain.id]
|
|
515
|
+
}),
|
|
516
|
+
owner: one(subgraph_account, {
|
|
517
|
+
fields: [subgraph_transfer.ownerId],
|
|
518
|
+
references: [subgraph_account.id]
|
|
519
|
+
})
|
|
428
520
|
}));
|
|
429
|
-
var
|
|
430
|
-
domain: one(
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
521
|
+
var subgraph_newOwnerRelations = relations(subgraph_newOwner, ({ one }) => ({
|
|
522
|
+
domain: one(subgraph_domain, {
|
|
523
|
+
fields: [subgraph_newOwner.domainId],
|
|
524
|
+
references: [subgraph_domain.id]
|
|
525
|
+
}),
|
|
526
|
+
owner: one(subgraph_account, {
|
|
527
|
+
fields: [subgraph_newOwner.ownerId],
|
|
528
|
+
references: [subgraph_account.id]
|
|
529
|
+
}),
|
|
530
|
+
parentDomain: one(subgraph_domain, {
|
|
531
|
+
fields: [subgraph_newOwner.parentDomainId],
|
|
532
|
+
references: [subgraph_domain.id]
|
|
435
533
|
})
|
|
436
534
|
}));
|
|
437
|
-
var
|
|
438
|
-
domain: one(
|
|
439
|
-
fields: [
|
|
440
|
-
references: [
|
|
535
|
+
var subgraph_newResolverRelations = relations(subgraph_newResolver, ({ one }) => ({
|
|
536
|
+
domain: one(subgraph_domain, {
|
|
537
|
+
fields: [subgraph_newResolver.domainId],
|
|
538
|
+
references: [subgraph_domain.id]
|
|
441
539
|
}),
|
|
442
|
-
resolver: one(
|
|
443
|
-
fields: [
|
|
444
|
-
references: [
|
|
540
|
+
resolver: one(subgraph_resolver, {
|
|
541
|
+
fields: [subgraph_newResolver.resolverId],
|
|
542
|
+
references: [subgraph_resolver.id]
|
|
445
543
|
})
|
|
446
544
|
}));
|
|
447
|
-
var
|
|
448
|
-
domain: one(
|
|
545
|
+
var subgraph_newTTLRelations = relations(subgraph_newTTL, ({ one }) => ({
|
|
546
|
+
domain: one(subgraph_domain, {
|
|
547
|
+
fields: [subgraph_newTTL.domainId],
|
|
548
|
+
references: [subgraph_domain.id]
|
|
549
|
+
})
|
|
449
550
|
}));
|
|
450
|
-
var
|
|
451
|
-
domain: one(
|
|
452
|
-
fields: [
|
|
453
|
-
references: [
|
|
551
|
+
var subgraph_wrappedTransferRelations = relations(subgraph_wrappedTransfer, ({ one }) => ({
|
|
552
|
+
domain: one(subgraph_domain, {
|
|
553
|
+
fields: [subgraph_wrappedTransfer.domainId],
|
|
554
|
+
references: [subgraph_domain.id]
|
|
454
555
|
}),
|
|
455
|
-
owner: one(
|
|
456
|
-
fields: [
|
|
457
|
-
references: [
|
|
556
|
+
owner: one(subgraph_account, {
|
|
557
|
+
fields: [subgraph_wrappedTransfer.ownerId],
|
|
558
|
+
references: [subgraph_account.id]
|
|
458
559
|
})
|
|
459
560
|
}));
|
|
460
|
-
var
|
|
461
|
-
domain: one(
|
|
462
|
-
fields: [
|
|
463
|
-
references: [
|
|
561
|
+
var subgraph_nameWrappedRelations = relations(subgraph_nameWrapped, ({ one }) => ({
|
|
562
|
+
domain: one(subgraph_domain, {
|
|
563
|
+
fields: [subgraph_nameWrapped.domainId],
|
|
564
|
+
references: [subgraph_domain.id]
|
|
464
565
|
}),
|
|
465
|
-
owner: one(
|
|
466
|
-
fields: [
|
|
467
|
-
references: [
|
|
566
|
+
owner: one(subgraph_account, {
|
|
567
|
+
fields: [subgraph_nameWrapped.ownerId],
|
|
568
|
+
references: [subgraph_account.id]
|
|
468
569
|
})
|
|
469
570
|
}));
|
|
470
|
-
var
|
|
471
|
-
domain: one(
|
|
472
|
-
fields: [
|
|
473
|
-
references: [
|
|
571
|
+
var subgraph_nameUnwrappedRelations = relations(subgraph_nameUnwrapped, ({ one }) => ({
|
|
572
|
+
domain: one(subgraph_domain, {
|
|
573
|
+
fields: [subgraph_nameUnwrapped.domainId],
|
|
574
|
+
references: [subgraph_domain.id]
|
|
474
575
|
}),
|
|
475
|
-
owner: one(
|
|
476
|
-
fields: [
|
|
477
|
-
references: [
|
|
576
|
+
owner: one(subgraph_account, {
|
|
577
|
+
fields: [subgraph_nameUnwrapped.ownerId],
|
|
578
|
+
references: [subgraph_account.id]
|
|
478
579
|
})
|
|
479
580
|
}));
|
|
480
|
-
var
|
|
481
|
-
domain: one(
|
|
581
|
+
var subgraph_fusesSetRelations = relations(subgraph_fusesSet, ({ one }) => ({
|
|
582
|
+
domain: one(subgraph_domain, {
|
|
583
|
+
fields: [subgraph_fusesSet.domainId],
|
|
584
|
+
references: [subgraph_domain.id]
|
|
585
|
+
})
|
|
482
586
|
}));
|
|
483
|
-
var
|
|
484
|
-
domain: one(
|
|
485
|
-
fields: [
|
|
486
|
-
references: [
|
|
587
|
+
var subgraph_expiryExtendedRelations = relations(subgraph_expiryExtended, ({ one }) => ({
|
|
588
|
+
domain: one(subgraph_domain, {
|
|
589
|
+
fields: [subgraph_expiryExtended.domainId],
|
|
590
|
+
references: [subgraph_domain.id]
|
|
487
591
|
})
|
|
488
592
|
}));
|
|
489
|
-
var
|
|
490
|
-
registration: one(
|
|
491
|
-
fields: [
|
|
492
|
-
references: [
|
|
593
|
+
var subgraph_nameRegisteredRelations = relations(subgraph_nameRegistered, ({ one }) => ({
|
|
594
|
+
registration: one(subgraph_registration, {
|
|
595
|
+
fields: [subgraph_nameRegistered.registrationId],
|
|
596
|
+
references: [subgraph_registration.id]
|
|
493
597
|
}),
|
|
494
|
-
registrant: one(
|
|
495
|
-
fields: [
|
|
496
|
-
references: [
|
|
598
|
+
registrant: one(subgraph_account, {
|
|
599
|
+
fields: [subgraph_nameRegistered.registrantId],
|
|
600
|
+
references: [subgraph_account.id]
|
|
497
601
|
})
|
|
498
602
|
}));
|
|
499
|
-
var
|
|
500
|
-
registration: one(
|
|
501
|
-
fields: [
|
|
502
|
-
references: [
|
|
603
|
+
var subgraph_nameRenewedRelations = relations(subgraph_nameRenewed, ({ one }) => ({
|
|
604
|
+
registration: one(subgraph_registration, {
|
|
605
|
+
fields: [subgraph_nameRenewed.registrationId],
|
|
606
|
+
references: [subgraph_registration.id]
|
|
503
607
|
})
|
|
504
608
|
}));
|
|
505
|
-
var
|
|
506
|
-
registration: one(
|
|
507
|
-
fields: [
|
|
508
|
-
references: [
|
|
609
|
+
var subgraph_nameTransferredRelations = relations(subgraph_nameTransferred, ({ one }) => ({
|
|
610
|
+
registration: one(subgraph_registration, {
|
|
611
|
+
fields: [subgraph_nameTransferred.registrationId],
|
|
612
|
+
references: [subgraph_registration.id]
|
|
509
613
|
}),
|
|
510
|
-
newOwner: one(
|
|
511
|
-
fields: [
|
|
512
|
-
references: [
|
|
614
|
+
newOwner: one(subgraph_account, {
|
|
615
|
+
fields: [subgraph_nameTransferred.newOwnerId],
|
|
616
|
+
references: [subgraph_account.id]
|
|
513
617
|
})
|
|
514
618
|
}));
|
|
515
|
-
var
|
|
516
|
-
resolver: one(
|
|
517
|
-
fields: [
|
|
518
|
-
references: [
|
|
619
|
+
var subgraph_addrChangedRelations = relations(subgraph_addrChanged, ({ one }) => ({
|
|
620
|
+
resolver: one(subgraph_resolver, {
|
|
621
|
+
fields: [subgraph_addrChanged.resolverId],
|
|
622
|
+
references: [subgraph_resolver.id]
|
|
519
623
|
}),
|
|
520
|
-
addr: one(
|
|
521
|
-
fields: [
|
|
522
|
-
references: [
|
|
624
|
+
addr: one(subgraph_account, {
|
|
625
|
+
fields: [subgraph_addrChanged.addrId],
|
|
626
|
+
references: [subgraph_account.id]
|
|
523
627
|
})
|
|
524
628
|
}));
|
|
525
|
-
var
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
629
|
+
var subgraph_multicoinAddrChangedRelations = relations(
|
|
630
|
+
subgraph_multicoinAddrChanged,
|
|
631
|
+
({ one }) => ({
|
|
632
|
+
resolver: one(subgraph_resolver, {
|
|
633
|
+
fields: [subgraph_multicoinAddrChanged.resolverId],
|
|
634
|
+
references: [subgraph_resolver.id]
|
|
635
|
+
})
|
|
529
636
|
})
|
|
530
|
-
|
|
531
|
-
var
|
|
532
|
-
resolver: one(
|
|
533
|
-
fields: [
|
|
534
|
-
references: [
|
|
637
|
+
);
|
|
638
|
+
var subgraph_nameChangedRelations = relations(subgraph_nameChanged, ({ one }) => ({
|
|
639
|
+
resolver: one(subgraph_resolver, {
|
|
640
|
+
fields: [subgraph_nameChanged.resolverId],
|
|
641
|
+
references: [subgraph_resolver.id]
|
|
535
642
|
})
|
|
536
643
|
}));
|
|
537
|
-
var
|
|
538
|
-
resolver: one(
|
|
539
|
-
fields: [
|
|
540
|
-
references: [
|
|
644
|
+
var subgraph_abiChangedRelations = relations(subgraph_abiChanged, ({ one }) => ({
|
|
645
|
+
resolver: one(subgraph_resolver, {
|
|
646
|
+
fields: [subgraph_abiChanged.resolverId],
|
|
647
|
+
references: [subgraph_resolver.id]
|
|
541
648
|
})
|
|
542
649
|
}));
|
|
543
|
-
var
|
|
544
|
-
resolver: one(
|
|
545
|
-
fields: [
|
|
546
|
-
references: [
|
|
650
|
+
var subgraph_pubkeyChangedRelations = relations(subgraph_pubkeyChanged, ({ one }) => ({
|
|
651
|
+
resolver: one(subgraph_resolver, {
|
|
652
|
+
fields: [subgraph_pubkeyChanged.resolverId],
|
|
653
|
+
references: [subgraph_resolver.id]
|
|
547
654
|
})
|
|
548
655
|
}));
|
|
549
|
-
var
|
|
550
|
-
resolver: one(
|
|
551
|
-
fields: [
|
|
552
|
-
references: [
|
|
656
|
+
var subgraph_textChangedRelations = relations(subgraph_textChanged, ({ one }) => ({
|
|
657
|
+
resolver: one(subgraph_resolver, {
|
|
658
|
+
fields: [subgraph_textChanged.resolverId],
|
|
659
|
+
references: [subgraph_resolver.id]
|
|
553
660
|
})
|
|
554
661
|
}));
|
|
555
|
-
var
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
662
|
+
var subgraph_contenthashChangedRelations = relations(
|
|
663
|
+
subgraph_contenthashChanged,
|
|
664
|
+
({ one }) => ({
|
|
665
|
+
resolver: one(subgraph_resolver, {
|
|
666
|
+
fields: [subgraph_contenthashChanged.resolverId],
|
|
667
|
+
references: [subgraph_resolver.id]
|
|
668
|
+
})
|
|
559
669
|
})
|
|
560
|
-
|
|
561
|
-
var
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
670
|
+
);
|
|
671
|
+
var subgraph_interfaceChangedRelations = relations(
|
|
672
|
+
subgraph_interfaceChanged,
|
|
673
|
+
({ one }) => ({
|
|
674
|
+
resolver: one(subgraph_resolver, {
|
|
675
|
+
fields: [subgraph_interfaceChanged.resolverId],
|
|
676
|
+
references: [subgraph_resolver.id]
|
|
677
|
+
})
|
|
565
678
|
})
|
|
566
|
-
|
|
567
|
-
var
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
679
|
+
);
|
|
680
|
+
var subgraph_authorisationChangedRelations = relations(
|
|
681
|
+
subgraph_authorisationChanged,
|
|
682
|
+
({ one }) => ({
|
|
683
|
+
resolver: one(subgraph_resolver, {
|
|
684
|
+
fields: [subgraph_authorisationChanged.resolverId],
|
|
685
|
+
references: [subgraph_resolver.id]
|
|
686
|
+
})
|
|
571
687
|
})
|
|
572
|
-
|
|
573
|
-
var
|
|
574
|
-
resolver: one(
|
|
575
|
-
fields: [
|
|
576
|
-
references: [
|
|
688
|
+
);
|
|
689
|
+
var subgraph_versionChangedRelations = relations(subgraph_versionChanged, ({ one }) => ({
|
|
690
|
+
resolver: one(subgraph_resolver, {
|
|
691
|
+
fields: [subgraph_versionChanged.resolverId],
|
|
692
|
+
references: [subgraph_resolver.id]
|
|
577
693
|
})
|
|
578
694
|
}));
|
|
579
695
|
|
|
580
|
-
// src/
|
|
581
|
-
import { onchainTable as onchainTable2, relations as relations2
|
|
582
|
-
var
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
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)
|
|
588
764
|
}));
|
|
589
|
-
var
|
|
590
|
-
"
|
|
765
|
+
var resolverAddressRecord = onchainTable2(
|
|
766
|
+
"resolver_address_records",
|
|
591
767
|
(t) => ({
|
|
592
|
-
// keyed by (
|
|
593
|
-
|
|
594
|
-
|
|
768
|
+
// keyed by ((chainId, resolver, node), coinType)
|
|
769
|
+
chainId: t.integer().notNull(),
|
|
770
|
+
resolver: t.hex().notNull(),
|
|
771
|
+
node: t.hex().notNull(),
|
|
595
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
|
+
*/
|
|
596
779
|
address: t.text().notNull()
|
|
597
780
|
}),
|
|
598
781
|
(t) => ({
|
|
599
|
-
|
|
782
|
+
pk: primaryKey({ columns: [t.chainId, t.resolver, t.node, t.coinType] })
|
|
600
783
|
})
|
|
601
784
|
);
|
|
602
|
-
var
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
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]
|
|
610
794
|
})
|
|
611
|
-
);
|
|
612
|
-
var
|
|
613
|
-
"
|
|
795
|
+
}));
|
|
796
|
+
var resolverTextRecord = onchainTable2(
|
|
797
|
+
"resolver_trecords",
|
|
614
798
|
(t) => ({
|
|
615
|
-
// keyed by (
|
|
616
|
-
|
|
617
|
-
|
|
799
|
+
// keyed by ((chainId, resolver, node), key)
|
|
800
|
+
chainId: t.integer().notNull(),
|
|
801
|
+
resolver: t.hex().notNull(),
|
|
802
|
+
node: t.hex().notNull(),
|
|
618
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
|
+
*/
|
|
619
810
|
value: t.text().notNull()
|
|
620
811
|
}),
|
|
621
812
|
(t) => ({
|
|
622
|
-
|
|
813
|
+
pk: primaryKey({ columns: [t.chainId, t.resolver, t.node, t.key] })
|
|
623
814
|
})
|
|
624
815
|
);
|
|
625
|
-
var
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
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]
|
|
633
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) => ({})
|
|
634
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
|
+
}));
|
|
635
902
|
|
|
636
|
-
// src/tokenscope.schema.ts
|
|
637
|
-
import { index as
|
|
638
|
-
var nameSales =
|
|
639
|
-
"
|
|
903
|
+
// src/schemas/tokenscope.schema.ts
|
|
904
|
+
import { index as index3, onchainTable as onchainTable4 } from "ponder";
|
|
905
|
+
var nameSales = onchainTable4(
|
|
906
|
+
"name_sales",
|
|
640
907
|
(t) => ({
|
|
641
908
|
/**
|
|
642
909
|
* Unique and deterministic identifier of the onchain event associated with the sale.
|
|
@@ -671,9 +938,9 @@ var nameSales = onchainTable3(
|
|
|
671
938
|
/**
|
|
672
939
|
* The tokenId managed by contractAddress that was sold.
|
|
673
940
|
*
|
|
674
|
-
*
|
|
675
|
-
*
|
|
676
|
-
*
|
|
941
|
+
* In a general context (outside of TokenScope) ERC1155 NFTs may have
|
|
942
|
+
* multiple copies, however TokenScope guarantees that all indexed NFTs
|
|
943
|
+
* never have an amount / balance > 1.
|
|
677
944
|
*/
|
|
678
945
|
tokenId: t.bigint().notNull(),
|
|
679
946
|
/**
|
|
@@ -690,7 +957,7 @@ var nameSales = onchainTable3(
|
|
|
690
957
|
*/
|
|
691
958
|
assetId: t.text().notNull(),
|
|
692
959
|
/**
|
|
693
|
-
* The namehash of the ENS domain that was sold.
|
|
960
|
+
* The namehash (Node) of the ENS domain that was sold.
|
|
694
961
|
*/
|
|
695
962
|
domainId: t.hex().notNull(),
|
|
696
963
|
/**
|
|
@@ -724,259 +991,168 @@ var nameSales = onchainTable3(
|
|
|
724
991
|
timestamp: t.bigint().notNull()
|
|
725
992
|
}),
|
|
726
993
|
(t) => ({
|
|
727
|
-
idx_domainId:
|
|
728
|
-
idx_assetId:
|
|
729
|
-
idx_buyer:
|
|
730
|
-
idx_seller:
|
|
731
|
-
idx_timestamp:
|
|
732
|
-
})
|
|
733
|
-
);
|
|
734
|
-
|
|
735
|
-
// src/resolver-relations.schema.ts
|
|
736
|
-
import { onchainTable as onchainTable4, relations as relations3, uniqueIndex as uniqueIndex2 } from "ponder";
|
|
737
|
-
var ext_resolverRelations_domain_relations = relations3(domain, ({ one, many }) => ({
|
|
738
|
-
// domain has many resolver relations (i.e. one per chain, see above)
|
|
739
|
-
resolverRelations: many(ext_domainResolverRelation)
|
|
740
|
-
}));
|
|
741
|
-
var ext_resolverRelations_resolver_relations = relations3(resolver, ({ one, many }) => ({
|
|
742
|
-
// resolver has many domain relations
|
|
743
|
-
domainRelations: many(ext_domainResolverRelation)
|
|
744
|
-
}));
|
|
745
|
-
var ext_domainResolverRelation = onchainTable4(
|
|
746
|
-
"ext_domain_resolver_relations",
|
|
747
|
-
(t) => ({
|
|
748
|
-
// keyed by (chainId, domainId)
|
|
749
|
-
id: t.text().primaryKey(),
|
|
750
|
-
chainId: t.integer().notNull(),
|
|
751
|
-
domainId: t.text().notNull(),
|
|
752
|
-
resolverId: t.text().notNull()
|
|
753
|
-
}),
|
|
754
|
-
(t) => ({
|
|
755
|
-
byChainIdAndDomain: uniqueIndex2().on(t.chainId, t.domainId)
|
|
756
|
-
})
|
|
757
|
-
);
|
|
758
|
-
var ext_domainResolverRelationsRelations = relations3(
|
|
759
|
-
ext_domainResolverRelation,
|
|
760
|
-
({ one, many }) => ({
|
|
761
|
-
// belongs to domain
|
|
762
|
-
domain: one(domain, {
|
|
763
|
-
fields: [ext_domainResolverRelation.domainId],
|
|
764
|
-
references: [domain.id]
|
|
765
|
-
}),
|
|
766
|
-
// belongs to resolver
|
|
767
|
-
resolver: one(resolver, {
|
|
768
|
-
fields: [ext_domainResolverRelation.resolverId],
|
|
769
|
-
references: [resolver.id]
|
|
770
|
-
})
|
|
771
|
-
})
|
|
772
|
-
);
|
|
773
|
-
|
|
774
|
-
// src/referrals.schema.ts
|
|
775
|
-
import { index as index3, onchainTable as onchainTable5, relations as relations4 } from "ponder";
|
|
776
|
-
var ext_registrationReferral = onchainTable5(
|
|
777
|
-
"ext_registration_referral",
|
|
778
|
-
(t) => ({
|
|
779
|
-
// keyed by any arbitrary unique id, usually `event.id`
|
|
780
|
-
id: t.text().primaryKey(),
|
|
781
|
-
referrerId: t.hex().notNull(),
|
|
782
|
-
domainId: t.text().notNull(),
|
|
783
|
-
refereeId: t.hex().notNull(),
|
|
784
|
-
baseCost: t.bigint().notNull(),
|
|
785
|
-
premium: t.bigint().notNull(),
|
|
786
|
-
total: t.bigint().notNull(),
|
|
787
|
-
// chainId the transaction occurred on
|
|
788
|
-
chainId: t.integer().notNull(),
|
|
789
|
-
// transaction's hash
|
|
790
|
-
transactionHash: t.hex().notNull(),
|
|
791
|
-
// block's Unix timestamp in seconds
|
|
792
|
-
timestamp: t.bigint().notNull()
|
|
793
|
-
}),
|
|
794
|
-
(t) => ({
|
|
795
|
-
byRefereeId: index3().on(t.refereeId),
|
|
796
|
-
byReferrerId: index3().on(t.referrerId)
|
|
797
|
-
})
|
|
798
|
-
);
|
|
799
|
-
var ext_registrationReferral_relations = relations4(
|
|
800
|
-
ext_registrationReferral,
|
|
801
|
-
({ one, many }) => ({
|
|
802
|
-
// RegistrationReferral references one Referrer
|
|
803
|
-
referrer: one(ext_referrer, {
|
|
804
|
-
fields: [ext_registrationReferral.referrerId],
|
|
805
|
-
references: [ext_referrer.id]
|
|
806
|
-
}),
|
|
807
|
-
// RegistrationReferral references one Account (as referee)
|
|
808
|
-
referee: one(account, {
|
|
809
|
-
fields: [ext_registrationReferral.refereeId],
|
|
810
|
-
references: [account.id]
|
|
811
|
-
}),
|
|
812
|
-
// RegistrationReferral references one Domain
|
|
813
|
-
domain: one(domain, {
|
|
814
|
-
fields: [ext_registrationReferral.domainId],
|
|
815
|
-
references: [domain.id]
|
|
816
|
-
})
|
|
994
|
+
idx_domainId: index3().on(t.domainId),
|
|
995
|
+
idx_assetId: index3().on(t.assetId),
|
|
996
|
+
idx_buyer: index3().on(t.buyer),
|
|
997
|
+
idx_seller: index3().on(t.seller),
|
|
998
|
+
idx_timestamp: index3().on(t.timestamp)
|
|
817
999
|
})
|
|
818
1000
|
);
|
|
819
|
-
var
|
|
820
|
-
"
|
|
1001
|
+
var nameTokens = onchainTable4(
|
|
1002
|
+
"name_tokens",
|
|
821
1003
|
(t) => ({
|
|
822
|
-
|
|
1004
|
+
/**
|
|
1005
|
+
* The CAIP-19 Asset ID of the token.
|
|
1006
|
+
*
|
|
1007
|
+
* This is a globally unique reference to the token.
|
|
1008
|
+
*
|
|
1009
|
+
* @see https://chainagnostic.org/CAIPs/caip-19
|
|
1010
|
+
*/
|
|
823
1011
|
id: t.text().primaryKey(),
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
1012
|
+
/**
|
|
1013
|
+
* The namehash (Node) of the ENS name associated with the token.
|
|
1014
|
+
*
|
|
1015
|
+
* Note: An ENS name may have more than one distinct token across time. It is
|
|
1016
|
+
* also possible for multiple distinct tokens for an ENS name to have
|
|
1017
|
+
* a mintStatus of `minted` at the same time. For example:
|
|
1018
|
+
* - When a direct subname of .eth is wrapped by the NameWrapper. This state
|
|
1019
|
+
* has one minted token for the name managed by the BaseRegistrar (this
|
|
1020
|
+
* token will be owned by the NameWrapper) and another minted token for
|
|
1021
|
+
* the name managed by the NameWrapper (owned by the effective owner of
|
|
1022
|
+
* the name).
|
|
1023
|
+
* - When a direct subname of .eth is wrapped by the NameWrapper and then
|
|
1024
|
+
* unwrapped. This state has one minted token (managed by the BaseRegistrar)
|
|
1025
|
+
* and another burned token (managed by the NameWrapper).
|
|
1026
|
+
*/
|
|
1027
|
+
domainId: t.hex().notNull(),
|
|
1028
|
+
/**
|
|
1029
|
+
* The chain that manages the token.
|
|
1030
|
+
*/
|
|
829
1031
|
chainId: t.integer().notNull(),
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
}));
|
|
878
|
-
|
|
879
|
-
// src/primary-names.schema.ts
|
|
880
|
-
import { onchainTable as onchainTable6, relations as relations5, uniqueIndex as uniqueIndex3 } from "ponder";
|
|
881
|
-
var ext_primaryNames_domain_relations = relations5(account, ({ one, many }) => ({
|
|
882
|
-
// account has many primary names
|
|
883
|
-
primaryNames: many(ext_primaryName)
|
|
884
|
-
}));
|
|
885
|
-
var ext_primaryName = onchainTable6(
|
|
886
|
-
"ext_primary_names",
|
|
887
|
-
(t) => ({
|
|
888
|
-
// keyed by (address, coinType)
|
|
889
|
-
id: t.text().primaryKey(),
|
|
890
|
-
address: t.hex().notNull(),
|
|
891
|
-
coinType: t.bigint().notNull(),
|
|
892
|
-
// NOTE: this is the sanitized name record value (see @/lib/sanitize-name-record)
|
|
893
|
-
name: t.text().notNull()
|
|
1032
|
+
/**
|
|
1033
|
+
* The address of the contract on chainId that manages the token.
|
|
1034
|
+
*/
|
|
1035
|
+
contractAddress: t.hex().notNull(),
|
|
1036
|
+
/**
|
|
1037
|
+
* The tokenId of the token managed by contractAddress.
|
|
1038
|
+
*
|
|
1039
|
+
* In a general context (outside of TokenScope) ERC1155 NFTs may have
|
|
1040
|
+
* multiple copies, however TokenScope guarantees that all indexed NFTs
|
|
1041
|
+
* never have an amount / balance > 1.
|
|
1042
|
+
*/
|
|
1043
|
+
tokenId: t.bigint().notNull(),
|
|
1044
|
+
/**
|
|
1045
|
+
* The CAIP-19 Asset Namespace of the token. Either `erc721` or `erc1155`.
|
|
1046
|
+
*
|
|
1047
|
+
* @see https://chainagnostic.org/CAIPs/caip-19
|
|
1048
|
+
*/
|
|
1049
|
+
assetNamespace: t.text().notNull(),
|
|
1050
|
+
/**
|
|
1051
|
+
* The account that owns the token.
|
|
1052
|
+
*
|
|
1053
|
+
* Value is zeroAddress if and only if mintStatus is `burned`.
|
|
1054
|
+
*
|
|
1055
|
+
* Note: The owner of the token for a given domainId may differ from the
|
|
1056
|
+
* owner of the associated node in the registry. For example:
|
|
1057
|
+
* - Consider the case where address X owns the ENS name `foo.eth` in
|
|
1058
|
+
* both the BaseRegistrar and the Registry. If X sends a request directly
|
|
1059
|
+
* to the Registry to transfer ownership to Y, ownership of `foo.eth` will
|
|
1060
|
+
* be transferred to Y in the Registry but not in the BaseRegistrar.
|
|
1061
|
+
* - ... for the case above, the BaseRegistrar implements a `reclaim`
|
|
1062
|
+
* allowing the owner of the name in the BaseRegistrar to reclaim ownership
|
|
1063
|
+
* of the name in the Registry.
|
|
1064
|
+
*
|
|
1065
|
+
* Note: When a name is wrapped by the NameWrapper, the owner of the token
|
|
1066
|
+
* in the BaseRegistrar is the NameWrapper, while a new token for the name is
|
|
1067
|
+
* minted by the NameWrapper and owned by the effective owner of the name.
|
|
1068
|
+
*/
|
|
1069
|
+
owner: t.hex().notNull(),
|
|
1070
|
+
/**
|
|
1071
|
+
* The mint status of the token. Either `minted` or `burned`.
|
|
1072
|
+
*
|
|
1073
|
+
* After we index a NFT we never delete it from our index. Instead, when an
|
|
1074
|
+
* indexed NFT is burned onchain we retain its record and update its mint
|
|
1075
|
+
* status as `burned`. If a NFT is minted again after it is burned its mint
|
|
1076
|
+
* status is updated to `minted`.
|
|
1077
|
+
*/
|
|
1078
|
+
mintStatus: t.text().notNull()
|
|
894
1079
|
}),
|
|
895
1080
|
(t) => ({
|
|
896
|
-
|
|
1081
|
+
idx_domainId: index3().on(t.domainId),
|
|
1082
|
+
idx_owner: index3().on(t.owner)
|
|
897
1083
|
})
|
|
898
1084
|
);
|
|
899
|
-
var ext_primaryNameRelations = relations5(ext_primaryName, ({ one, many }) => ({
|
|
900
|
-
// belongs to account
|
|
901
|
-
account: one(account, {
|
|
902
|
-
fields: [ext_primaryName.address],
|
|
903
|
-
references: [account.id]
|
|
904
|
-
})
|
|
905
|
-
}));
|
|
906
1085
|
export {
|
|
907
|
-
|
|
908
|
-
abiChangedRelations,
|
|
909
|
-
account,
|
|
910
|
-
accountRelations,
|
|
911
|
-
addrChanged,
|
|
912
|
-
addrChangedRelations,
|
|
913
|
-
authorisationChanged,
|
|
914
|
-
authorisationChangedRelations,
|
|
915
|
-
contenthashChanged,
|
|
916
|
-
contenthashChangedRelations,
|
|
917
|
-
domain,
|
|
918
|
-
domainRelations,
|
|
919
|
-
expiryExtended,
|
|
920
|
-
expiryExtendedRelations,
|
|
921
|
-
ext_domainResolverRelation,
|
|
922
|
-
ext_domainResolverRelationsRelations,
|
|
923
|
-
ext_primaryName,
|
|
924
|
-
ext_primaryNameRelations,
|
|
925
|
-
ext_primaryNames_domain_relations,
|
|
926
|
-
ext_referrals_domain_relations,
|
|
927
|
-
ext_referrer,
|
|
928
|
-
ext_referrer_relations,
|
|
929
|
-
ext_registrationReferral,
|
|
930
|
-
ext_registrationReferral_relations,
|
|
931
|
-
ext_renewalReferral,
|
|
932
|
-
ext_renewalReferral_relations,
|
|
933
|
-
ext_resolverAddressRecords,
|
|
934
|
-
ext_resolverAddressRecordsRelations,
|
|
935
|
-
ext_resolverRecords_resolver_relations,
|
|
936
|
-
ext_resolverRelations_domain_relations,
|
|
937
|
-
ext_resolverRelations_resolver_relations,
|
|
938
|
-
ext_resolverTextRecords,
|
|
939
|
-
ext_resolverTextRecordsRelations,
|
|
940
|
-
fusesSet,
|
|
941
|
-
fusesSetRelations,
|
|
942
|
-
interfaceChanged,
|
|
943
|
-
interfaceChangedRelations,
|
|
944
|
-
multicoinAddrChanged,
|
|
945
|
-
multicoinAddrChangedRelations,
|
|
946
|
-
nameChanged,
|
|
947
|
-
nameChangedRelations,
|
|
948
|
-
nameRegistered,
|
|
949
|
-
nameRegisteredRelations,
|
|
950
|
-
nameRenewed,
|
|
951
|
-
nameRenewedRelations,
|
|
1086
|
+
migratedNode,
|
|
952
1087
|
nameSales,
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1088
|
+
nameTokens,
|
|
1089
|
+
nodeResolverRelation,
|
|
1090
|
+
referrer,
|
|
1091
|
+
referrer_relations,
|
|
1092
|
+
registrationReferral,
|
|
1093
|
+
registrationReferral_relations,
|
|
1094
|
+
renewalReferral,
|
|
1095
|
+
renewalReferral_relations,
|
|
1096
|
+
resolverAddressRecord,
|
|
1097
|
+
resolverAddressRecordRelations,
|
|
1098
|
+
resolverRecords,
|
|
1099
|
+
resolverRecords_relations,
|
|
1100
|
+
resolverTextRecord,
|
|
1101
|
+
resolverTextRecordRelations,
|
|
1102
|
+
reverseNameRecord,
|
|
1103
|
+
subgraph_abiChanged,
|
|
1104
|
+
subgraph_abiChangedRelations,
|
|
1105
|
+
subgraph_account,
|
|
1106
|
+
subgraph_accountRelations,
|
|
1107
|
+
subgraph_addrChanged,
|
|
1108
|
+
subgraph_addrChangedRelations,
|
|
1109
|
+
subgraph_authorisationChanged,
|
|
1110
|
+
subgraph_authorisationChangedRelations,
|
|
1111
|
+
subgraph_contenthashChanged,
|
|
1112
|
+
subgraph_contenthashChangedRelations,
|
|
1113
|
+
subgraph_domain,
|
|
1114
|
+
subgraph_domainRelations,
|
|
1115
|
+
subgraph_expiryExtended,
|
|
1116
|
+
subgraph_expiryExtendedRelations,
|
|
1117
|
+
subgraph_fusesSet,
|
|
1118
|
+
subgraph_fusesSetRelations,
|
|
1119
|
+
subgraph_interfaceChanged,
|
|
1120
|
+
subgraph_interfaceChangedRelations,
|
|
1121
|
+
subgraph_multicoinAddrChanged,
|
|
1122
|
+
subgraph_multicoinAddrChangedRelations,
|
|
1123
|
+
subgraph_nameChanged,
|
|
1124
|
+
subgraph_nameChangedRelations,
|
|
1125
|
+
subgraph_nameRegistered,
|
|
1126
|
+
subgraph_nameRegisteredRelations,
|
|
1127
|
+
subgraph_nameRenewed,
|
|
1128
|
+
subgraph_nameRenewedRelations,
|
|
1129
|
+
subgraph_nameTransferred,
|
|
1130
|
+
subgraph_nameTransferredRelations,
|
|
1131
|
+
subgraph_nameUnwrapped,
|
|
1132
|
+
subgraph_nameUnwrappedRelations,
|
|
1133
|
+
subgraph_nameWrapped,
|
|
1134
|
+
subgraph_nameWrappedRelations,
|
|
1135
|
+
subgraph_newOwner,
|
|
1136
|
+
subgraph_newOwnerRelations,
|
|
1137
|
+
subgraph_newResolver,
|
|
1138
|
+
subgraph_newResolverRelations,
|
|
1139
|
+
subgraph_newTTL,
|
|
1140
|
+
subgraph_newTTLRelations,
|
|
1141
|
+
subgraph_pubkeyChanged,
|
|
1142
|
+
subgraph_pubkeyChangedRelations,
|
|
1143
|
+
subgraph_registration,
|
|
1144
|
+
subgraph_registrationRelations,
|
|
1145
|
+
subgraph_resolver,
|
|
1146
|
+
subgraph_resolverRelations,
|
|
1147
|
+
subgraph_textChanged,
|
|
1148
|
+
subgraph_textChangedRelations,
|
|
1149
|
+
subgraph_transfer,
|
|
1150
|
+
subgraph_transferRelations,
|
|
1151
|
+
subgraph_versionChanged,
|
|
1152
|
+
subgraph_versionChangedRelations,
|
|
1153
|
+
subgraph_wrappedDomain,
|
|
1154
|
+
subgraph_wrappedDomainRelations,
|
|
1155
|
+
subgraph_wrappedTransfer,
|
|
1156
|
+
subgraph_wrappedTransferRelations
|
|
981
1157
|
};
|
|
982
1158
|
//# sourceMappingURL=ponder.schema.js.map
|