@xyo-network/evm-token-interface-diviner 2.84.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.
Files changed (55) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +13 -0
  3. package/dist/browser/Diviner.d.cts +35 -0
  4. package/dist/browser/Diviner.d.cts.map +1 -0
  5. package/dist/browser/Diviner.d.mts +35 -0
  6. package/dist/browser/Diviner.d.mts.map +1 -0
  7. package/dist/browser/Diviner.d.ts +35 -0
  8. package/dist/browser/Diviner.d.ts.map +1 -0
  9. package/dist/browser/Payload.d.cts +127 -0
  10. package/dist/browser/Payload.d.cts.map +1 -0
  11. package/dist/browser/Payload.d.mts +127 -0
  12. package/dist/browser/Payload.d.mts.map +1 -0
  13. package/dist/browser/Payload.d.ts +127 -0
  14. package/dist/browser/Payload.d.ts.map +1 -0
  15. package/dist/browser/index.cjs +112 -0
  16. package/dist/browser/index.cjs.map +1 -0
  17. package/dist/browser/index.d.cts +3 -0
  18. package/dist/browser/index.d.cts.map +1 -0
  19. package/dist/browser/index.d.mts +3 -0
  20. package/dist/browser/index.d.mts.map +1 -0
  21. package/dist/browser/index.d.ts +3 -0
  22. package/dist/browser/index.d.ts.map +1 -0
  23. package/dist/browser/index.js +98 -0
  24. package/dist/browser/index.js.map +1 -0
  25. package/dist/node/Diviner.d.cts +35 -0
  26. package/dist/node/Diviner.d.cts.map +1 -0
  27. package/dist/node/Diviner.d.mts +35 -0
  28. package/dist/node/Diviner.d.mts.map +1 -0
  29. package/dist/node/Diviner.d.ts +35 -0
  30. package/dist/node/Diviner.d.ts.map +1 -0
  31. package/dist/node/Payload.d.cts +127 -0
  32. package/dist/node/Payload.d.cts.map +1 -0
  33. package/dist/node/Payload.d.mts +127 -0
  34. package/dist/node/Payload.d.mts.map +1 -0
  35. package/dist/node/Payload.d.ts +127 -0
  36. package/dist/node/Payload.d.ts.map +1 -0
  37. package/dist/node/index.cjs +120 -0
  38. package/dist/node/index.cjs.map +1 -0
  39. package/dist/node/index.d.cts +3 -0
  40. package/dist/node/index.d.cts.map +1 -0
  41. package/dist/node/index.d.mts +3 -0
  42. package/dist/node/index.d.mts.map +1 -0
  43. package/dist/node/index.d.ts +3 -0
  44. package/dist/node/index.d.ts.map +1 -0
  45. package/dist/node/index.js +99 -0
  46. package/dist/node/index.js.map +1 -0
  47. package/package.json +85 -0
  48. package/src/Diviner.ts +113 -0
  49. package/src/Payload.ts +60 -0
  50. package/src/index.ts +2 -0
  51. package/src/spec/Contract.Witness.Index.json +222 -0
  52. package/src/spec/Token.Diviner.Index.json +272 -0
  53. package/src/spec/TokenNode.json +42 -0
  54. package/typedoc.json +5 -0
  55. package/xy.config.ts +14 -0
package/src/Diviner.ts ADDED
@@ -0,0 +1,113 @@
1
+ import { assertEx } from '@xylabs/assert'
2
+ import { AbstractDiviner } from '@xyo-network/abstract-diviner'
3
+ import { DivinerConfig, DivinerParams } from '@xyo-network/diviner-model'
4
+ import { EvmContract, isEvmContract } from '@xyo-network/evm-contract-witness'
5
+ import { AnyConfigSchema } from '@xyo-network/module-model'
6
+ import {
7
+ ERC20__factory,
8
+ ERC721__factory,
9
+ ERC1155__factory,
10
+ IERC721Enumerable__factory,
11
+ IERC721Metadata__factory,
12
+ IERC721Receiver__factory,
13
+ IERC1155MetadataURI__factory,
14
+ IERC1155Receiver__factory,
15
+ } from '@xyo-network/open-zeppelin-typechain'
16
+ import { Interface, JsonFragment } from 'ethers'
17
+
18
+ import { EvmTokenInterfaceImplemented, EvmTokenInterfaceImplementedSchema, TokenInterface } from './Payload'
19
+
20
+ export const EvmTokenInterfaceImplementedDivinerConfigSchema = `${EvmTokenInterfaceImplementedSchema}.diviner.config`
21
+ export type EvmTokenInterfaceImplementedDivinerConfigSchema = typeof EvmTokenInterfaceImplementedDivinerConfigSchema
22
+
23
+ export type EvmTokenInterfaceImplementedDivinerConfig = DivinerConfig<{
24
+ schema: EvmTokenInterfaceImplementedDivinerConfigSchema
25
+ tokenInterfaces?: TokenInterface[]
26
+ }>
27
+
28
+ export type EvmTokenInterfaceImplementedDivinerParams = DivinerParams<AnyConfigSchema<EvmTokenInterfaceImplementedDivinerConfig>>
29
+
30
+ type DistributiveMappedType<T> = T extends string ? { [K in T]: readonly JsonFragment[] } : never
31
+ type TokenInterfaceDictionary = DistributiveMappedType<TokenInterface>
32
+
33
+ /**
34
+ * A diviner that checks if a contract implements a token interface
35
+ */
36
+ export class EvmTokenInterfaceImplementedDiviner<
37
+ TParams extends EvmTokenInterfaceImplementedDivinerParams = EvmTokenInterfaceImplementedDivinerParams,
38
+ > extends AbstractDiviner<TParams, EvmContract, EvmTokenInterfaceImplemented> {
39
+ /**
40
+ * The list of supported token interfaces
41
+ */
42
+ static readonly SupportedTokenInterfaces: Readonly<Record<TokenInterface, readonly JsonFragment[]>> = {
43
+ ERC1155: ERC1155__factory.abi,
44
+ ERC1155Metadata_URI: IERC1155MetadataURI__factory.abi,
45
+ ERC1155TokenReceiver: IERC1155Receiver__factory.abi,
46
+ ERC20: ERC20__factory.abi,
47
+ ERC721: ERC721__factory.abi,
48
+ ERC721Enumerable: IERC721Enumerable__factory.abi,
49
+ ERC721Metadata: IERC721Metadata__factory.abi,
50
+ ERC721TokenReceiver: IERC721Receiver__factory.abi,
51
+ }
52
+ static override configSchemas = [EvmTokenInterfaceImplementedDivinerConfigSchema]
53
+
54
+ private _tokenInterfaces?: TokenInterfaceDictionary
55
+
56
+ /**
57
+ * The list of token interfaces to check against the contract
58
+ */
59
+ get tokenInterfaces() {
60
+ if (!this._tokenInterfaces) {
61
+ if (this.config?.tokenInterfaces) {
62
+ this._tokenInterfaces =
63
+ (Object.fromEntries(
64
+ this.config?.tokenInterfaces.map((tokenInterface) => {
65
+ return [tokenInterface, EvmTokenInterfaceImplementedDiviner.SupportedTokenInterfaces[tokenInterface]] as const
66
+ }),
67
+ ) as TokenInterfaceDictionary) ?? {}
68
+ } else {
69
+ this._tokenInterfaces = EvmTokenInterfaceImplementedDiviner.SupportedTokenInterfaces
70
+ }
71
+ }
72
+ return this._tokenInterfaces
73
+ }
74
+
75
+ protected override async divineHandler(inPayloads: EvmContract[] = []): Promise<EvmTokenInterfaceImplemented[]> {
76
+ await this.started('throw')
77
+ try {
78
+ const allResults = await Promise.all(
79
+ // Iterate over each contract passed in
80
+ inPayloads.filter(isEvmContract).map(({ address, code, chainId }) => {
81
+ // Ensure we have the contract code
82
+ const byteCode = assertEx(code, 'Missing code')
83
+ const results: EvmTokenInterfaceImplemented[] = []
84
+ // Iterate over each token interface
85
+ Object.entries(this.tokenInterfaces).forEach(([tokenInterface, abi]) => {
86
+ // Check if the contract implements the interface abi
87
+ const contractInterface = new Interface(abi)
88
+ const implementations: boolean[] = []
89
+ contractInterface.forEachFunction(({ selector }) => {
90
+ implementations.push(byteCode.includes(BigInt(selector).toString(16)))
91
+ })
92
+ const implemented = implementations.every((implementation) => implementation)
93
+ const result: EvmTokenInterfaceImplemented = {
94
+ address,
95
+ chainId,
96
+ implemented,
97
+ schema: EvmTokenInterfaceImplementedSchema,
98
+ tokenInterface: tokenInterface as TokenInterface,
99
+ }
100
+ results.push(result)
101
+ })
102
+
103
+ return results
104
+ }),
105
+ )
106
+ return allResults.flat()
107
+ } catch (ex) {
108
+ const error = ex as Error
109
+ console.log(`Error [${this.config.name}]: ${error.message}`)
110
+ throw error
111
+ }
112
+ }
113
+ }
package/src/Payload.ts ADDED
@@ -0,0 +1,60 @@
1
+ import { isPayloadOfSchemaType, Payload } from '@xyo-network/payload-model'
2
+
3
+ /**
4
+ * ERC20 Token Interfaces
5
+ */
6
+ export type ERC20TokenInterfaces = 'ERC20'
7
+
8
+ /**
9
+ * ERC721 Token Interfaces
10
+ */
11
+ export type ERC721TokenInterfaces = 'ERC721' | 'ERC721TokenReceiver' | 'ERC721Metadata' | 'ERC721Enumerable'
12
+
13
+ /**
14
+ * ERC1155 Token Interfaces
15
+ */
16
+ export type ERC1155TokenInterfaces = 'ERC1155' | 'ERC1155TokenReceiver' | 'ERC1155Metadata_URI'
17
+
18
+ /**
19
+ * All Token Interfaces
20
+ */
21
+ export type TokenInterface = ERC20TokenInterfaces | ERC721TokenInterfaces | ERC1155TokenInterfaces
22
+
23
+ /**
24
+ * The schema for the EVM Token Interface Implemented payload
25
+ */
26
+ export const EvmTokenInterfaceImplementedSchema = 'network.xyo.evm.token.interface.implemented'
27
+ /**
28
+ * The schema for the EVM Token Interface Implemented payload
29
+ */
30
+ export type EvmTokenInterfaceImplementedSchema = typeof EvmTokenInterfaceImplementedSchema
31
+
32
+ /**
33
+ * The EVM Token Interface Implemented payload
34
+ */
35
+ export type EvmTokenInterfaceImplemented = Payload<
36
+ {
37
+ /**
38
+ * The contract address
39
+ */
40
+ address: string
41
+ /**
42
+ * The chain id
43
+ */
44
+ chainId: number
45
+ /**
46
+ * True if the contract implements the interface
47
+ */
48
+ implemented: boolean
49
+ /**
50
+ * The specific token interface
51
+ */
52
+ tokenInterface: TokenInterface
53
+ },
54
+ EvmTokenInterfaceImplementedSchema
55
+ >
56
+
57
+ /**
58
+ * Identity function for EvmTokenInterfaceImplemented payload
59
+ */
60
+ export const isEvmTokenInterfaceImplemented = isPayloadOfSchemaType<EvmTokenInterfaceImplemented>(EvmTokenInterfaceImplementedSchema)
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './Diviner'
2
+ export * from './Payload'
@@ -0,0 +1,222 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/schema.json",
3
+ "nodes": [
4
+ {
5
+ "config": {
6
+ "accountPath": "m/44'/60'/1",
7
+ "name": "ContractWitnessIndexNode",
8
+ "schema": "network.xyo.node.config"
9
+ },
10
+ "modules": {
11
+ "private": [
12
+ {
13
+ "config": {
14
+ "language": "javascript",
15
+ "name": "AddressStateArchivist",
16
+ "schema": "network.xyo.archivist.config",
17
+ "storeQueries": false
18
+ }
19
+ },
20
+ {
21
+ "config": {
22
+ "archivist": "AddressStateArchivist",
23
+ "language": "javascript",
24
+ "name": "AddressStateBoundWitnessDiviner",
25
+ "schema": "network.xyo.diviner.boundwitness.config"
26
+ }
27
+ },
28
+ {
29
+ "config": {
30
+ "archivist": "AddressStateArchivist",
31
+ "language": "javascript",
32
+ "name": "AddressStatePayloadDiviner",
33
+ "schema": "network.xyo.diviner.payload.config"
34
+ }
35
+ },
36
+ {
37
+ "config": {
38
+ "language": "javascript",
39
+ "name": "EvmContractDivinerIndexArchivist",
40
+ "schema": "network.xyo.archivist.config"
41
+ }
42
+ },
43
+ {
44
+ "config": {
45
+ "archivist": "EvmContractDivinerIndexArchivist",
46
+ "language": "javascript",
47
+ "name": "EvmContractDivinerIndexBoundWitnessDiviner",
48
+ "schema": "network.xyo.diviner.boundwitness.config"
49
+ }
50
+ },
51
+ {
52
+ "config": {
53
+ "archivist": "EvmContractDivinerIndexArchivist",
54
+ "language": "javascript",
55
+ "name": "EvmContractDivinerIndexPayloadDiviner",
56
+ "schema": "network.xyo.diviner.payload.config"
57
+ }
58
+ },
59
+ {
60
+ "config": {
61
+ "filter": {
62
+ "payload_schemas": ["network.xyo.evm.contract"]
63
+ },
64
+ "labels": {
65
+ "network.xyo.diviner.stage": "stateToIndexCandidateDiviner"
66
+ },
67
+ "language": "javascript",
68
+ "name": "EvmContractStateToIndexCandidateDiviner",
69
+ "payloadStore": {
70
+ "archivist": "Archivist",
71
+ "boundWitnessDiviner": "BoundWitnessDiviner",
72
+ "payloadDiviner": "PayloadDiviner"
73
+ },
74
+ "schema": "network.xyo.diviner.indexing.temporal.stage.stateToIndexCandidateDiviner.config"
75
+ }
76
+ },
77
+ {
78
+ "config": {
79
+ "labels": {
80
+ "network.xyo.diviner.stage": "indexCandidateToIndexDiviner"
81
+ },
82
+ "language": "javascript",
83
+ "name": "EvmContractIndexCandidateToEvmContractIndexDiviner",
84
+ "schema": "network.xyo.diviner.indexing.temporal.stage.indexCandidateToIndexDiviner.config",
85
+ "schemaTransforms": {
86
+ "network.xyo.evm.contract": [
87
+ {
88
+ "destinationField": "address",
89
+ "sourcePathExpression": "$.address"
90
+ },
91
+ {
92
+ "destinationField": "chainId",
93
+ "sourcePathExpression": "$.chainId"
94
+ }
95
+ ],
96
+ "network.xyo.timestamp": [
97
+ {
98
+ "destinationField": "timestamp",
99
+ "sourcePathExpression": "$.timestamp"
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ },
105
+ {
106
+ "config": {
107
+ "divinerQuerySchema": "network.xyo.diviner.payload.query",
108
+ "indexQuerySchema": "network.xyo.diviner.payload.query",
109
+ "indexSchema": "network.xyo.diviner.indexing.temporal.result.index",
110
+ "labels": {
111
+ "network.xyo.diviner.stage": "divinerQueryToIndexQueryDiviner"
112
+ },
113
+ "language": "javascript",
114
+ "name": "EvmContractQueryToEvmContractIndexQueryDiviner",
115
+ "schema": "network.xyo.diviner.indexing.temporal.stage.divinerQueryToIndexQueryDiviner.config",
116
+ "schemaTransforms": {
117
+ "network.xyo.diviner.payload.query": [
118
+ {
119
+ "destinationField": "address",
120
+ "sourcePathExpression": "$.address"
121
+ },
122
+ {
123
+ "defaultValue": 1,
124
+ "destinationField": "chainId",
125
+ "sourcePathExpression": "$.chainId"
126
+ },
127
+ {
128
+ "defaultValue": 1,
129
+ "destinationField": "limit",
130
+ "sourcePathExpression": "$.limit"
131
+ },
132
+ {
133
+ "defaultValue": 0,
134
+ "destinationField": "offset",
135
+ "sourcePathExpression": "$.offset"
136
+ },
137
+ {
138
+ "defaultValue": "desc",
139
+ "destinationField": "order",
140
+ "sourcePathExpression": "$.order"
141
+ }
142
+ ]
143
+ }
144
+ }
145
+ },
146
+ {
147
+ "config": {
148
+ "labels": {
149
+ "network.xyo.diviner.stage": "indexQueryResponseToDivinerQueryResponseDiviner"
150
+ },
151
+ "language": "javascript",
152
+ "name": "EvmContractIndexQueryResponseToEvmContractQueryResponseDiviner",
153
+ "schema": "network.xyo.diviner.indexing.temporal.stage.indexQueryResponseToDivinerQueryResponseDiviner.config"
154
+ }
155
+ },
156
+ {
157
+ "config": {
158
+ "language": "javascript",
159
+ "name": "EvmContractWitness",
160
+ "schema": "network.xyo.evm.contract.witness.config"
161
+ }
162
+ },
163
+ {
164
+ "config": {
165
+ "language": "javascript",
166
+ "name": "TimestampWitness",
167
+ "schema": "network.xyo.witness.timestamp.config"
168
+ }
169
+ }
170
+ ],
171
+ "public": [
172
+ {
173
+ "config": {
174
+ "indexStore": {
175
+ "archivist": "EvmContractDivinerIndexArchivist",
176
+ "boundWitnessDiviner": "EvmContractDivinerIndexBoundWitnessDiviner",
177
+ "payloadDiviner": "EvmContractDivinerIndexPayloadDiviner"
178
+ },
179
+ "indexingDivinerStages": {
180
+ "divinerQueryToIndexQueryDiviner": "EvmContractQueryToEvmContractIndexQueryDiviner",
181
+ "indexCandidateToIndexDiviner": "EvmContractIndexCandidateToEvmContractIndexDiviner",
182
+ "indexQueryResponseToDivinerQueryResponseDiviner": "EvmContractIndexQueryResponseToEvmContractQueryResponseDiviner",
183
+ "stateToIndexCandidateDiviner": "EvmContractStateToIndexCandidateDiviner"
184
+ },
185
+ "language": "javascript",
186
+ "name": "EvmContractIndexDiviner",
187
+ "pollFrequency": 1,
188
+ "schema": "network.xyo.diviner.indexing.temporal.config",
189
+ "stateStore": {
190
+ "archivist": "AddressStateArchivist",
191
+ "boundWitnessDiviner": "AddressStateBoundWitnessDiviner",
192
+ "payloadDiviner": "AddressStatePayloadDiviner"
193
+ }
194
+ }
195
+ },
196
+ {
197
+ "config": {
198
+ "archiving": {
199
+ "archivists": ["Archivist"]
200
+ },
201
+ "language": "javascript",
202
+ "name": "EvmContractSentinel",
203
+ "schema": "network.xyo.sentinel.config",
204
+ "synchronous": "true",
205
+ "tasks": [
206
+ {
207
+ "input": true,
208
+ "module": "TimestampWitness"
209
+ },
210
+ {
211
+ "input": true,
212
+ "module": "EvmContractWitness"
213
+ }
214
+ ]
215
+ }
216
+ }
217
+ ]
218
+ }
219
+ }
220
+ ],
221
+ "schema": "network.xyo.manifest"
222
+ }
@@ -0,0 +1,272 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/schema.json",
3
+ "nodes": [
4
+ {
5
+ "config": {
6
+ "accountPath": "m/44'/60'/2",
7
+ "name": "TokenDivinerIndexNode",
8
+ "schema": "network.xyo.node.config"
9
+ },
10
+ "modules": {
11
+ "private": [
12
+ {
13
+ "config": {
14
+ "language": "javascript",
15
+ "name": "AddressStateArchivist",
16
+ "schema": "network.xyo.archivist.config",
17
+ "storeQueries": false
18
+ }
19
+ },
20
+ {
21
+ "config": {
22
+ "archivist": "AddressStateArchivist",
23
+ "language": "javascript",
24
+ "name": "AddressStateBoundWitnessDiviner",
25
+ "schema": "network.xyo.diviner.boundwitness.config"
26
+ }
27
+ },
28
+ {
29
+ "config": {
30
+ "archivist": "AddressStateArchivist",
31
+ "language": "javascript",
32
+ "name": "AddressStatePayloadDiviner",
33
+ "schema": "network.xyo.diviner.payload.config"
34
+ }
35
+ },
36
+ {
37
+ "config": {
38
+ "language": "javascript",
39
+ "name": "EvmContractDivinerIndexArchivist",
40
+ "schema": "network.xyo.archivist.config"
41
+ }
42
+ },
43
+ {
44
+ "config": {
45
+ "archivist": "EvmContractDivinerIndexArchivist",
46
+ "language": "javascript",
47
+ "name": "EvmContractDivinerIndexBoundWitnessDiviner",
48
+ "schema": "network.xyo.diviner.boundwitness.config"
49
+ }
50
+ },
51
+ {
52
+ "config": {
53
+ "archivist": "EvmContractDivinerIndexArchivist",
54
+ "language": "javascript",
55
+ "name": "EvmContractDivinerIndexPayloadDiviner",
56
+ "schema": "network.xyo.diviner.payload.config"
57
+ }
58
+ },
59
+ {
60
+ "config": {
61
+ "filter": {
62
+ "payload_schemas": [
63
+ "network.xyo.evm.token.interface.implemented"
64
+ ]
65
+ },
66
+ "labels": {
67
+ "network.xyo.diviner.stage": "stateToIndexCandidateDiviner"
68
+ },
69
+ "language": "javascript",
70
+ "name": "EvmContractStateToIndexCandidateDiviner",
71
+ "payloadStore": {
72
+ "archivist": "Archivist",
73
+ "boundWitnessDiviner": "BoundWitnessDiviner",
74
+ "payloadDiviner": "PayloadDiviner"
75
+ },
76
+ "schema": "network.xyo.diviner.indexing.temporal.stage.stateToIndexCandidateDiviner.config"
77
+ }
78
+ },
79
+ {
80
+ "config": {
81
+ "labels": {
82
+ "network.xyo.diviner.stage": "indexCandidateToIndexDiviner"
83
+ },
84
+ "language": "javascript",
85
+ "name": "EvmContractIndexCandidateToEvmContractIndexDiviner",
86
+ "schema": "network.xyo.diviner.indexing.temporal.stage.indexCandidateToIndexDiviner.config",
87
+ "schemaTransforms": {
88
+ "network.xyo.evm.token.interface.implemented": [
89
+ {
90
+ "destinationField": "address",
91
+ "sourcePathExpression": "$.address"
92
+ },
93
+ {
94
+ "destinationField": "chainId",
95
+ "sourcePathExpression": "$.chainId"
96
+ },
97
+ {
98
+ "destinationField": "tokenInterface",
99
+ "sourcePathExpression": "$.tokenInterface"
100
+ },
101
+ {
102
+ "destinationField": "implemented",
103
+ "sourcePathExpression": "$.implemented"
104
+ }
105
+ ],
106
+ "network.xyo.timestamp": [
107
+ {
108
+ "destinationField": "timestamp",
109
+ "sourcePathExpression": "$.timestamp"
110
+ }
111
+ ]
112
+ }
113
+ }
114
+ },
115
+ {
116
+ "config": {
117
+ "divinerQuerySchema": "network.xyo.diviner.payload.query",
118
+ "indexQuerySchema": "network.xyo.diviner.payload.query",
119
+ "indexSchema": "network.xyo.diviner.indexing.temporal.result.index",
120
+ "labels": {
121
+ "network.xyo.diviner.stage": "divinerQueryToIndexQueryDiviner"
122
+ },
123
+ "language": "javascript",
124
+ "name": "EvmContractQueryToEvmContractIndexQueryDiviner",
125
+ "schema": "network.xyo.diviner.indexing.temporal.stage.divinerQueryToIndexQueryDiviner.config",
126
+ "schemaTransforms": {
127
+ "network.xyo.diviner.payload.query": [
128
+ {
129
+ "destinationField": "address",
130
+ "sourcePathExpression": "$.address"
131
+ },
132
+ {
133
+ "defaultValue": 1,
134
+ "destinationField": "chainId",
135
+ "sourcePathExpression": "$.chainId"
136
+ },
137
+ {
138
+ "defaultValue": 1,
139
+ "destinationField": "tokenInterface",
140
+ "sourcePathExpression": "$.tokenInterface"
141
+ },
142
+ {
143
+ "defaultValue": 1,
144
+ "destinationField": "implemented",
145
+ "sourcePathExpression": "$.implemented"
146
+ },
147
+ {
148
+ "defaultValue": 1,
149
+ "destinationField": "limit",
150
+ "sourcePathExpression": "$.limit"
151
+ },
152
+ {
153
+ "defaultValue": 0,
154
+ "destinationField": "offset",
155
+ "sourcePathExpression": "$.offset"
156
+ },
157
+ {
158
+ "defaultValue": "desc",
159
+ "destinationField": "order",
160
+ "sourcePathExpression": "$.order"
161
+ }
162
+ ]
163
+ }
164
+ }
165
+ },
166
+ {
167
+ "config": {
168
+ "labels": {
169
+ "network.xyo.diviner.stage": "indexQueryResponseToDivinerQueryResponseDiviner"
170
+ },
171
+ "language": "javascript",
172
+ "name": "EvmContractIndexQueryResponseToEvmContractQueryResponseDiviner",
173
+ "schema": "network.xyo.diviner.indexing.temporal.stage.indexQueryResponseToDivinerQueryResponseDiviner.config"
174
+ }
175
+ },
176
+ {
177
+ "config": {
178
+ "language": "javascript",
179
+ "name": "TimestampWitness",
180
+ "schema": "network.xyo.witness.timestamp.config"
181
+ }
182
+ }
183
+ ],
184
+ "public": [
185
+ {
186
+ "config": {
187
+ "language": "javascript",
188
+ "name": "ERC721TokenInterfaceImplementedDiviner",
189
+ "schema": "network.xyo.evm.token.interface.implemented.diviner.config",
190
+ "tokenInterfaces": ["ERC721"]
191
+ }
192
+ },
193
+ {
194
+ "config": {
195
+ "language": "javascript",
196
+ "name": "ERC1155TokenInterfaceImplementedDiviner",
197
+ "schema": "network.xyo.evm.token.interface.implemented.diviner.config",
198
+ "tokenInterfaces": ["ERC1155"]
199
+ }
200
+ },
201
+ {
202
+ "config": {
203
+ "indexStore": {
204
+ "archivist": "EvmContractDivinerIndexArchivist",
205
+ "boundWitnessDiviner": "EvmContractDivinerIndexBoundWitnessDiviner",
206
+ "payloadDiviner": "EvmContractDivinerIndexPayloadDiviner"
207
+ },
208
+ "indexingDivinerStages": {
209
+ "divinerQueryToIndexQueryDiviner": "EvmContractQueryToEvmContractIndexQueryDiviner",
210
+ "indexCandidateToIndexDiviner": "EvmContractIndexCandidateToEvmContractIndexDiviner",
211
+ "indexQueryResponseToDivinerQueryResponseDiviner": "EvmContractIndexQueryResponseToEvmContractQueryResponseDiviner",
212
+ "stateToIndexCandidateDiviner": "EvmContractStateToIndexCandidateDiviner"
213
+ },
214
+ "language": "javascript",
215
+ "name": "EvmTokenInterfaceImplementedIndexDiviner",
216
+ "pollFrequency": 1,
217
+ "schema": "network.xyo.diviner.indexing.temporal.config",
218
+ "stateStore": {
219
+ "archivist": "AddressStateArchivist",
220
+ "boundWitnessDiviner": "AddressStateBoundWitnessDiviner",
221
+ "payloadDiviner": "AddressStatePayloadDiviner"
222
+ }
223
+ }
224
+ },
225
+ {
226
+ "config": {
227
+ "archiving": {
228
+ "archivists": ["Archivist"]
229
+ },
230
+ "language": "javascript",
231
+ "name": "ERC721TokenInterfaceImplementedSentinel",
232
+ "schema": "network.xyo.sentinel.config",
233
+ "synchronous": "true",
234
+ "tasks": [
235
+ {
236
+ "input": true,
237
+ "module": "TimestampWitness"
238
+ },
239
+ {
240
+ "input": true,
241
+ "module": "ERC721TokenInterfaceImplementedDiviner"
242
+ }
243
+ ]
244
+ }
245
+ },
246
+ {
247
+ "config": {
248
+ "archiving": {
249
+ "archivists": ["Archivist"]
250
+ },
251
+ "language": "javascript",
252
+ "name": "ERC1155TokenInterfaceImplementedSentinel",
253
+ "schema": "network.xyo.sentinel.config",
254
+ "synchronous": "true",
255
+ "tasks": [
256
+ {
257
+ "input": true,
258
+ "module": "TimestampWitness"
259
+ },
260
+ {
261
+ "input": true,
262
+ "module": "ERC1155TokenInterfaceImplementedDiviner"
263
+ }
264
+ ]
265
+ }
266
+ }
267
+ ]
268
+ }
269
+ }
270
+ ],
271
+ "schema": "network.xyo.manifest"
272
+ }