@human-protocol/sdk 4.0.0 → 4.0.2
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/constants.d.ts +9 -6
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +19 -159
- package/dist/enums.d.ts +5 -12
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +6 -12
- package/dist/escrow.d.ts +2 -29
- package/dist/escrow.d.ts.map +1 -1
- package/dist/escrow.js +6 -33
- package/dist/graphql/queries/operator.d.ts.map +1 -1
- package/dist/graphql/queries/operator.js +2 -0
- package/dist/interfaces.d.ts +2 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/statistics.js +8 -8
- package/dist/transaction.d.ts.map +1 -1
- package/dist/transaction.js +2 -4
- package/dist/utils.d.ts +7 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +11 -1
- package/package.json +1 -1
- package/src/constants.ts +19 -182
- package/src/enums.ts +5 -11
- package/src/escrow.ts +12 -34
- package/src/graphql/queries/operator.ts +2 -0
- package/src/interfaces.ts +2 -0
- package/src/statistics.ts +9 -9
- package/src/transaction.ts +3 -5
- package/src/utils.ts +10 -0
package/dist/constants.d.ts
CHANGED
|
@@ -19,15 +19,18 @@ export declare const NETWORKS: {
|
|
|
19
19
|
[chainId in ChainId]?: NetworkData;
|
|
20
20
|
};
|
|
21
21
|
export declare const KVStoreKeys: {
|
|
22
|
-
|
|
22
|
+
category: string;
|
|
23
23
|
fee: string;
|
|
24
|
-
publicKey: string;
|
|
25
|
-
webhookUrl: string;
|
|
26
|
-
website: string;
|
|
27
|
-
url: string;
|
|
28
24
|
jobTypes: string;
|
|
29
|
-
|
|
25
|
+
operatorName: string;
|
|
26
|
+
publicKey: string;
|
|
27
|
+
publicKeyHash: string;
|
|
30
28
|
registrationInstructions: string;
|
|
29
|
+
registrationNeeded: string;
|
|
30
|
+
role: string;
|
|
31
|
+
url: string;
|
|
32
|
+
website: string;
|
|
33
|
+
webhookUrl: string;
|
|
31
34
|
};
|
|
32
35
|
export declare const Role: {
|
|
33
36
|
JobLauncher: string;
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC,oBAAY,UAAU;IACpB,EAAE,MAAM;IACR,OAAO,MAAM;IACb,WAAW,MAAM;IACjB,YAAY,MAAM;IAClB,gBAAgB,MAAM;IACtB,SAAS,MAAM;IACf,SAAS,MAAM;IACf,qBAAqB,MAAM;CAC5B;AAED,eAAO,MAAM,QAAQ,EAAE;KACpB,OAAO,IAAI,OAAO,CAAC,CAAC,EAAE,WAAW;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC,oBAAY,UAAU;IACpB,EAAE,MAAM;IACR,OAAO,MAAM;IACb,WAAW,MAAM;IACjB,YAAY,MAAM;IAClB,gBAAgB,MAAM;IACtB,SAAS,MAAM;IACf,SAAS,MAAM;IACf,qBAAqB,MAAM;CAC5B;AAED,eAAO,MAAM,QAAQ,EAAE;KACpB,OAAO,IAAI,OAAO,CAAC,CAAC,EAAE,WAAW;CA2GnC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAavB,CAAC;AAEF,eAAO,MAAM,IAAI;;;;;CAKhB,CAAC;AAEF,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AAEjE,eAAO,MAAM,4BAA4B,KAAK,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -28,36 +28,10 @@ exports.NETWORKS = {
|
|
|
28
28
|
stakingAddress: '0xEf6Da3aB52c33925Be3F84038193a7e1331F51E6',
|
|
29
29
|
kvstoreAddress: '0xB6d36B1CDaD50302BCB3DB43bAb0D349458e1b8D',
|
|
30
30
|
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/ethereum/version/latest',
|
|
31
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
31
|
+
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmc8ikCj9y2uvYGTeELkM9wybPdcD2PgpW4tjJMwnogLrq',
|
|
32
32
|
oldSubgraphUrl: '',
|
|
33
33
|
oldFactoryAddress: '',
|
|
34
34
|
},
|
|
35
|
-
[enums_1.ChainId.RINKEBY]: {
|
|
36
|
-
chainId: enums_1.ChainId.RINKEBY,
|
|
37
|
-
title: 'Ethereum Rinkeby',
|
|
38
|
-
scanUrl: 'https://rinkeby.etherscan.io',
|
|
39
|
-
factoryAddress: '0x925B24444511c86F4d4E63141D8Be0A025E2dca4',
|
|
40
|
-
hmtAddress: '0x4dCf5ac4509888714dd43A5cCc46d7ab389D9c23',
|
|
41
|
-
stakingAddress: '',
|
|
42
|
-
kvstoreAddress: '',
|
|
43
|
-
subgraphUrl: '',
|
|
44
|
-
subgraphUrlApiKey: '',
|
|
45
|
-
oldSubgraphUrl: '',
|
|
46
|
-
oldFactoryAddress: '',
|
|
47
|
-
},
|
|
48
|
-
[enums_1.ChainId.GOERLI]: {
|
|
49
|
-
chainId: enums_1.ChainId.GOERLI,
|
|
50
|
-
title: 'Ethereum Goerli',
|
|
51
|
-
scanUrl: 'https://goerli.etherscan.io',
|
|
52
|
-
factoryAddress: '0x87469B4f2Fcf37cBd34E54244c0BD4Fa0603664c',
|
|
53
|
-
hmtAddress: '0xd3A31D57FDD790725d0F6B78095F62E8CD4ab317',
|
|
54
|
-
stakingAddress: '0xf46B45Df3d956369726d8Bd93Ba33963Ab692920',
|
|
55
|
-
kvstoreAddress: '0x19Fc3e859C1813ac9427a7a78BeB9ae102CE96d3',
|
|
56
|
-
subgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/goerli-v2',
|
|
57
|
-
subgraphUrlApiKey: '',
|
|
58
|
-
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/goerli',
|
|
59
|
-
oldFactoryAddress: '0xaAe6a2646C1F88763E62e0cD08aD050Ea66AC46F',
|
|
60
|
-
},
|
|
61
35
|
[enums_1.ChainId.SEPOLIA]: {
|
|
62
36
|
chainId: enums_1.ChainId.SEPOLIA,
|
|
63
37
|
title: 'Ethereum Sepolia',
|
|
@@ -67,7 +41,7 @@ exports.NETWORKS = {
|
|
|
67
41
|
stakingAddress: '0x2163e3A40032Af1C359ac731deaB48258b317890',
|
|
68
42
|
kvstoreAddress: '0xCc0AF0635aa19fE799B6aFDBe28fcFAeA7f00a60',
|
|
69
43
|
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/sepolia/version/latest',
|
|
70
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
44
|
+
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmfB1oqYCMTKZB2vcYJzQmGGvVS8cMCHohpYbjKFWoFo8z',
|
|
71
45
|
oldSubgraphUrl: '',
|
|
72
46
|
oldFactoryAddress: '',
|
|
73
47
|
},
|
|
@@ -80,7 +54,7 @@ exports.NETWORKS = {
|
|
|
80
54
|
stakingAddress: '0xE24e5C08E28331D24758b69A5E9f383D2bDD1c98',
|
|
81
55
|
kvstoreAddress: '0x21A0C4CED7aE447fCf87D9FE3A29FA9B3AB20Ff1',
|
|
82
56
|
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/bsc/version/latest',
|
|
83
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
57
|
+
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmPEaCSuzbVHDrGEWTS7T4N8U7kBMMMfkj4b4ZeqheVuMc',
|
|
84
58
|
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsc',
|
|
85
59
|
oldFactoryAddress: '0xc88bC422cAAb2ac8812de03176402dbcA09533f4',
|
|
86
60
|
},
|
|
@@ -93,7 +67,7 @@ exports.NETWORKS = {
|
|
|
93
67
|
stakingAddress: '0xD6D347ba6987519B4e42EcED43dF98eFf5465a23',
|
|
94
68
|
kvstoreAddress: '0x32e27177BA6Ea91cf28dfd91a0Da9822A4b74EcF',
|
|
95
69
|
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/bsc-testnet/version/latest',
|
|
96
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
70
|
+
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmbp8jzcYurrKdk1Mg5ycJ8jcxwou3wWsmNcRdAc16aQEt',
|
|
97
71
|
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsctest',
|
|
98
72
|
oldFactoryAddress: '0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f',
|
|
99
73
|
},
|
|
@@ -106,23 +80,10 @@ exports.NETWORKS = {
|
|
|
106
80
|
stakingAddress: '0x01D115E9E8bF0C58318793624CC662a030D07F1D',
|
|
107
81
|
kvstoreAddress: '0xbcB28672F826a50B03EE91B28145EAbddA73B2eD',
|
|
108
82
|
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/polygon/version/latest',
|
|
109
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
83
|
+
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmeSoEuFieiKXtqzDY3WUBz5gKFWwYVPP7iaebpBpJyo7Y',
|
|
110
84
|
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
|
|
111
85
|
oldFactoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794',
|
|
112
86
|
},
|
|
113
|
-
[enums_1.ChainId.POLYGON_MUMBAI]: {
|
|
114
|
-
chainId: enums_1.ChainId.POLYGON_MUMBAI,
|
|
115
|
-
title: 'Polygon Mumbai',
|
|
116
|
-
scanUrl: 'https://mumbai.polygonscan.com',
|
|
117
|
-
factoryAddress: '0xA8D927C4DA17A6b71675d2D49dFda4E9eBE58f2d',
|
|
118
|
-
hmtAddress: '0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4',
|
|
119
|
-
stakingAddress: '0x7Fd3dF914E7b6Bd96B4c744Df32183b51368Bfac',
|
|
120
|
-
kvstoreAddress: '0xD96158c7267Ea658a4688F4aEf1c85659851625d',
|
|
121
|
-
subgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/mumbai-v2',
|
|
122
|
-
subgraphUrlApiKey: '',
|
|
123
|
-
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/mumbai',
|
|
124
|
-
oldFactoryAddress: '0x558cd800f9F0B02f3B149667bDe003284c867E94',
|
|
125
|
-
},
|
|
126
87
|
[enums_1.ChainId.POLYGON_AMOY]: {
|
|
127
88
|
chainId: enums_1.ChainId.POLYGON_AMOY,
|
|
128
89
|
title: 'Polygon Amoy',
|
|
@@ -132,111 +93,7 @@ exports.NETWORKS = {
|
|
|
132
93
|
stakingAddress: '0xffE496683F842a923110415b7278ded3F265f2C5',
|
|
133
94
|
kvstoreAddress: '0x724AeFC243EdacCA27EAB86D3ec5a76Af4436Fc7',
|
|
134
95
|
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/amoy/version/latest',
|
|
135
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
136
|
-
oldSubgraphUrl: '',
|
|
137
|
-
oldFactoryAddress: '',
|
|
138
|
-
},
|
|
139
|
-
[enums_1.ChainId.MOONBEAM]: {
|
|
140
|
-
chainId: enums_1.ChainId.MOONBEAM,
|
|
141
|
-
title: 'Moonbeam',
|
|
142
|
-
scanUrl: 'https://moonbeam.moonscan.io',
|
|
143
|
-
factoryAddress: '0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a',
|
|
144
|
-
hmtAddress: '0x3b25BC1dC591D24d60560d0135D6750A561D4764',
|
|
145
|
-
stakingAddress: '0x05398211bA2046E296fBc9a9D3EB49e3F15C3123',
|
|
146
|
-
kvstoreAddress: '0x2B95bEcb6EBC4589f64CB000dFCF716b4aeF8aA6',
|
|
147
|
-
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/moonbeam/version/latest',
|
|
148
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYe9hsFYuVgQsH719AsqRNqgVM8YBYfCuhBNYjXtBqQru',
|
|
149
|
-
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/moonbeam',
|
|
150
|
-
oldFactoryAddress: '0x98108c28B7767a52BE38B4860832dd4e11A7ecad',
|
|
151
|
-
},
|
|
152
|
-
[enums_1.ChainId.MOONBASE_ALPHA]: {
|
|
153
|
-
chainId: enums_1.ChainId.MOONBASE_ALPHA,
|
|
154
|
-
title: 'Moonbase Alpha',
|
|
155
|
-
scanUrl: 'https://moonbase.moonscan.io/',
|
|
156
|
-
factoryAddress: '0x5e622FF522D81aa426f082bDD95210BC25fCA7Ed',
|
|
157
|
-
hmtAddress: '0x2dd72db2bBA65cE663e476bA8b84A1aAF802A8e3',
|
|
158
|
-
stakingAddress: '0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940',
|
|
159
|
-
kvstoreAddress: '0xcC561f4482f4Ff051D2Dcc65c2cE1A0f291bbA46',
|
|
160
|
-
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/moonbase-alpha/version/latest',
|
|
161
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmSDPbm5xxMvYVSJzHFVsRiMekvJVYSJ7UfZw17DhPMdaH',
|
|
162
|
-
oldSubgraphUrl: '',
|
|
163
|
-
oldFactoryAddress: '',
|
|
164
|
-
},
|
|
165
|
-
[enums_1.ChainId.AVALANCHE_TESTNET]: {
|
|
166
|
-
chainId: enums_1.ChainId.AVALANCHE_TESTNET,
|
|
167
|
-
title: 'Fuji C-Chain',
|
|
168
|
-
scanUrl: 'https://testnet.snowtrace.io',
|
|
169
|
-
factoryAddress: '0x56C2ba540726ED4f46E7a134b6b9Ee9C867FcF92',
|
|
170
|
-
hmtAddress: '0x9406d5c635AD22b0d76c75E52De57A2177919ca3',
|
|
171
|
-
stakingAddress: '0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940',
|
|
172
|
-
kvstoreAddress: '0x3aD4B091E054f192a822D1406f4535eAd38580e4',
|
|
173
|
-
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/fuji/version/latest',
|
|
174
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYXwNPwC5DcitK1SLVUR6gPANmEn3UsVvGeTbjCv1tTb2',
|
|
175
|
-
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/fuji',
|
|
176
|
-
oldFactoryAddress: '0xfb4469201951C3B9a7F1996c477cb7BDBEcE0A88',
|
|
177
|
-
},
|
|
178
|
-
[enums_1.ChainId.AVALANCHE]: {
|
|
179
|
-
chainId: enums_1.ChainId.AVALANCHE,
|
|
180
|
-
title: 'Avalanche C-Chain Mainnet',
|
|
181
|
-
scanUrl: 'https://snowtrace.io',
|
|
182
|
-
factoryAddress: '0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a',
|
|
183
|
-
hmtAddress: '0x12365293cb6477d4fc2686e46BB97E3Fb64f1550',
|
|
184
|
-
stakingAddress: '0x05398211bA2046E296fBc9a9D3EB49e3F15C3123',
|
|
185
|
-
kvstoreAddress: '0x9Bc7bff35B2Be2413708d48c3B0aEF5c43646728',
|
|
186
|
-
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/avalanche/version/latest',
|
|
187
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYR8NUuAQVoGmGSwKanUJLjX9iZxrEyGH39HjUuXLmsum',
|
|
188
|
-
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/avalanche',
|
|
189
|
-
oldFactoryAddress: '0x9767a578ba7a5FA1563c8229943cB01cd8446BB4',
|
|
190
|
-
},
|
|
191
|
-
[enums_1.ChainId.CELO_ALFAJORES]: {
|
|
192
|
-
chainId: enums_1.ChainId.CELO_ALFAJORES,
|
|
193
|
-
title: 'Celo Alfajores',
|
|
194
|
-
scanUrl: 'https://alfajores.celoscan.io/',
|
|
195
|
-
factoryAddress: '0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569',
|
|
196
|
-
hmtAddress: '0x2736B33455A872dC478E1E004106D04c35472468',
|
|
197
|
-
stakingAddress: '0x003548Df34be8836cF0F9673403a1E40ba449a0F',
|
|
198
|
-
kvstoreAddress: '0x938335006ea6F9Eb0e8020969cFF94404425e298',
|
|
199
|
-
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/celo-alfajores/version/latest',
|
|
200
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmb2WKCFFhT7REAjTuMd9pZvGw7rRpzeZSPJ3KRztD2pMM',
|
|
201
|
-
oldSubgraphUrl: '',
|
|
202
|
-
oldFactoryAddress: '',
|
|
203
|
-
},
|
|
204
|
-
[enums_1.ChainId.CELO]: {
|
|
205
|
-
chainId: enums_1.ChainId.CELO,
|
|
206
|
-
title: 'Celo',
|
|
207
|
-
scanUrl: 'https://celoscan.io/',
|
|
208
|
-
factoryAddress: '0xc90B43a5d576D9d8026c48904dfbaED50C15Fa08',
|
|
209
|
-
hmtAddress: '0x19Ead835951493A763c96910255d5eeF147E914F',
|
|
210
|
-
stakingAddress: '0x34cD3Bd6B16c559f321799b516dE61E12017fFd1',
|
|
211
|
-
kvstoreAddress: '0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569',
|
|
212
|
-
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/celo/version/latest',
|
|
213
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmeeb5zshw1z9Q38NNPun2Pd7P951Mkzz5ywK171tauNRY',
|
|
214
|
-
oldSubgraphUrl: '',
|
|
215
|
-
oldFactoryAddress: '',
|
|
216
|
-
},
|
|
217
|
-
[enums_1.ChainId.XLAYER]: {
|
|
218
|
-
chainId: enums_1.ChainId.XLAYER,
|
|
219
|
-
title: 'XLayer',
|
|
220
|
-
scanUrl: 'https://www.oklink.com/xlayer',
|
|
221
|
-
factoryAddress: '0x4949C9DFFD83F0D5Ab0AB24C57C4D403D5c20C15',
|
|
222
|
-
hmtAddress: '0x10acbe3b9e6a2ff7f341e5cbf4b6617741ff44aa',
|
|
223
|
-
stakingAddress: '0x01D115E9E8bF0C58318793624CC662a030D07F1D',
|
|
224
|
-
kvstoreAddress: '0x6512d894cc3d3FE93Da9d0420430136fA889FaB9',
|
|
225
|
-
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/xlayer/version/latest',
|
|
226
|
-
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmWTggMrB5sRSs2fePuqQG9WbLMk8HtnfLH3VbRhmVdF8s',
|
|
227
|
-
oldSubgraphUrl: '',
|
|
228
|
-
oldFactoryAddress: '',
|
|
229
|
-
},
|
|
230
|
-
[enums_1.ChainId.XLAYER_TESTNET]: {
|
|
231
|
-
chainId: enums_1.ChainId.XLAYER_TESTNET,
|
|
232
|
-
title: 'XLayer Testnet',
|
|
233
|
-
scanUrl: 'https://www.okx.com/explorer/xlayer-test',
|
|
234
|
-
factoryAddress: '0x6Cd3ecAD36ee88E9ef3665CF381D9dAE0FE0a32e',
|
|
235
|
-
hmtAddress: '0x792abbcC99c01dbDec49c9fa9A828a186Da45C33',
|
|
236
|
-
stakingAddress: '0xeF9849a904dF0d494D69ac0B0a6860a3A7936114',
|
|
237
|
-
kvstoreAddress: '0xdE8BE9E3C12E9F546309A429cd88d026a25EaF8C',
|
|
238
|
-
subgraphUrl: 'https://api.studio.thegraph.com/query/74256/xlayer-testnet/version/latest',
|
|
239
|
-
subgraphUrlApiKey: 'https://gateway-testnet-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmNoRyqZtJTRrkbKAmWMZQUHuah7YSs8U9R3nzPu8WEhtY',
|
|
96
|
+
subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmQUUv8SK2skarDrJpB8LXXqMwjzxg3Z42dx12uEL5Pmeq',
|
|
240
97
|
oldSubgraphUrl: '',
|
|
241
98
|
oldFactoryAddress: '',
|
|
242
99
|
},
|
|
@@ -255,21 +112,24 @@ exports.NETWORKS = {
|
|
|
255
112
|
},
|
|
256
113
|
};
|
|
257
114
|
exports.KVStoreKeys = {
|
|
258
|
-
|
|
115
|
+
category: 'category',
|
|
259
116
|
fee: 'fee',
|
|
260
|
-
publicKey: 'public_key',
|
|
261
|
-
webhookUrl: 'webhook_url',
|
|
262
|
-
website: 'website',
|
|
263
|
-
url: 'url',
|
|
264
117
|
jobTypes: 'job_types',
|
|
265
|
-
|
|
118
|
+
operatorName: 'name',
|
|
119
|
+
publicKey: 'public_key',
|
|
120
|
+
publicKeyHash: 'public_key_hash',
|
|
266
121
|
registrationInstructions: 'registration_instructions',
|
|
122
|
+
registrationNeeded: 'registration_needed',
|
|
123
|
+
role: 'role',
|
|
124
|
+
url: 'url',
|
|
125
|
+
website: 'website',
|
|
126
|
+
webhookUrl: 'webhook_url',
|
|
267
127
|
};
|
|
268
128
|
exports.Role = {
|
|
269
|
-
JobLauncher: '
|
|
270
|
-
ExchangeOracle: '
|
|
271
|
-
ReputationOracle: '
|
|
272
|
-
RecordingOracle: '
|
|
129
|
+
JobLauncher: 'job_launcher',
|
|
130
|
+
ExchangeOracle: 'exchange_oracle',
|
|
131
|
+
ReputationOracle: 'reputation_oracle',
|
|
132
|
+
RecordingOracle: 'recording_oracle',
|
|
273
133
|
};
|
|
274
134
|
exports.SUBGRAPH_API_KEY_PLACEHOLDER = '[SUBGRAPH_API_KEY]';
|
|
275
135
|
exports.ESCROW_BULK_PAYOUT_MAX_ITEMS = 99;
|
package/dist/enums.d.ts
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
export declare enum ChainId {
|
|
2
2
|
ALL = -1,
|
|
3
3
|
MAINNET = 1,
|
|
4
|
-
RINKEBY = 4,
|
|
5
|
-
GOERLI = 5,
|
|
6
4
|
SEPOLIA = 11155111,
|
|
7
5
|
BSC_MAINNET = 56,
|
|
8
6
|
BSC_TESTNET = 97,
|
|
9
7
|
POLYGON = 137,
|
|
10
|
-
POLYGON_MUMBAI = 80001,
|
|
11
8
|
POLYGON_AMOY = 80002,
|
|
12
|
-
|
|
13
|
-
MOONBASE_ALPHA = 1287,
|
|
14
|
-
AVALANCHE_TESTNET = 43113,
|
|
15
|
-
AVALANCHE = 43114,
|
|
16
|
-
CELO = 42220,
|
|
17
|
-
CELO_ALFAJORES = 44787,
|
|
18
|
-
XLAYER_TESTNET = 195,
|
|
19
|
-
LOCALHOST = 1338,
|
|
20
|
-
XLAYER = 196
|
|
9
|
+
LOCALHOST = 1338
|
|
21
10
|
}
|
|
22
11
|
export declare enum OrderDirection {
|
|
23
12
|
ASC = "asc",
|
|
24
13
|
DESC = "desc"
|
|
25
14
|
}
|
|
15
|
+
export declare enum LeaderCategory {
|
|
16
|
+
MACHINE_LEARNING = "machine_learning",
|
|
17
|
+
MARKET_MAKING = "market_making"
|
|
18
|
+
}
|
|
26
19
|
//# sourceMappingURL=enums.d.ts.map
|
package/dist/enums.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO;IACjB,GAAG,KAAK;IACR,OAAO,IAAI;IACX,OAAO,
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO;IACjB,GAAG,KAAK;IACR,OAAO,IAAI;IACX,OAAO,WAAW;IAClB,WAAW,KAAK;IAChB,WAAW,KAAK;IAChB,OAAO,MAAM;IACb,YAAY,QAAQ;IACpB,SAAS,OAAO;CACjB;AAED,oBAAY,cAAc;IACxB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,oBAAY,cAAc;IACxB,gBAAgB,qBAAqB;IACrC,aAAa,kBAAkB;CAChC"}
|
package/dist/enums.js
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrderDirection = exports.ChainId = void 0;
|
|
3
|
+
exports.LeaderCategory = exports.OrderDirection = exports.ChainId = void 0;
|
|
4
4
|
var ChainId;
|
|
5
5
|
(function (ChainId) {
|
|
6
6
|
ChainId[ChainId["ALL"] = -1] = "ALL";
|
|
7
7
|
ChainId[ChainId["MAINNET"] = 1] = "MAINNET";
|
|
8
|
-
ChainId[ChainId["RINKEBY"] = 4] = "RINKEBY";
|
|
9
|
-
ChainId[ChainId["GOERLI"] = 5] = "GOERLI";
|
|
10
8
|
ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
|
|
11
9
|
ChainId[ChainId["BSC_MAINNET"] = 56] = "BSC_MAINNET";
|
|
12
10
|
ChainId[ChainId["BSC_TESTNET"] = 97] = "BSC_TESTNET";
|
|
13
11
|
ChainId[ChainId["POLYGON"] = 137] = "POLYGON";
|
|
14
|
-
ChainId[ChainId["POLYGON_MUMBAI"] = 80001] = "POLYGON_MUMBAI";
|
|
15
12
|
ChainId[ChainId["POLYGON_AMOY"] = 80002] = "POLYGON_AMOY";
|
|
16
|
-
ChainId[ChainId["MOONBEAM"] = 1284] = "MOONBEAM";
|
|
17
|
-
ChainId[ChainId["MOONBASE_ALPHA"] = 1287] = "MOONBASE_ALPHA";
|
|
18
|
-
ChainId[ChainId["AVALANCHE_TESTNET"] = 43113] = "AVALANCHE_TESTNET";
|
|
19
|
-
ChainId[ChainId["AVALANCHE"] = 43114] = "AVALANCHE";
|
|
20
|
-
ChainId[ChainId["CELO"] = 42220] = "CELO";
|
|
21
|
-
ChainId[ChainId["CELO_ALFAJORES"] = 44787] = "CELO_ALFAJORES";
|
|
22
|
-
ChainId[ChainId["XLAYER_TESTNET"] = 195] = "XLAYER_TESTNET";
|
|
23
13
|
ChainId[ChainId["LOCALHOST"] = 1338] = "LOCALHOST";
|
|
24
|
-
ChainId[ChainId["XLAYER"] = 196] = "XLAYER";
|
|
25
14
|
})(ChainId || (exports.ChainId = ChainId = {}));
|
|
26
15
|
var OrderDirection;
|
|
27
16
|
(function (OrderDirection) {
|
|
28
17
|
OrderDirection["ASC"] = "asc";
|
|
29
18
|
OrderDirection["DESC"] = "desc";
|
|
30
19
|
})(OrderDirection || (exports.OrderDirection = OrderDirection = {}));
|
|
20
|
+
var LeaderCategory;
|
|
21
|
+
(function (LeaderCategory) {
|
|
22
|
+
LeaderCategory["MACHINE_LEARNING"] = "machine_learning";
|
|
23
|
+
LeaderCategory["MARKET_MAKING"] = "market_making";
|
|
24
|
+
})(LeaderCategory || (exports.LeaderCategory = LeaderCategory = {}));
|
package/dist/escrow.d.ts
CHANGED
|
@@ -732,19 +732,11 @@ export declare class EscrowUtils {
|
|
|
732
732
|
* enum ChainId {
|
|
733
733
|
* ALL = -1,
|
|
734
734
|
* MAINNET = 1,
|
|
735
|
-
*
|
|
736
|
-
* GOERLI = 5,
|
|
735
|
+
* SEPOLIA = 11155111,
|
|
737
736
|
* BSC_MAINNET = 56,
|
|
738
737
|
* BSC_TESTNET = 97,
|
|
739
738
|
* POLYGON = 137,
|
|
740
|
-
* POLYGON_MUMBAI = 80001,
|
|
741
739
|
* POLYGON_AMOY=80002,
|
|
742
|
-
* MOONBEAM = 1284,
|
|
743
|
-
* MOONBASE_ALPHA = 1287,
|
|
744
|
-
* AVALANCHE = 43114,
|
|
745
|
-
* AVALANCHE_TESTNET = 43113,
|
|
746
|
-
* CELO = 42220,
|
|
747
|
-
* CELO_ALFAJORES = 44787,
|
|
748
740
|
* LOCALHOST = 1338,
|
|
749
741
|
* }
|
|
750
742
|
* ```
|
|
@@ -821,19 +813,11 @@ export declare class EscrowUtils {
|
|
|
821
813
|
* enum ChainId {
|
|
822
814
|
* ALL = -1,
|
|
823
815
|
* MAINNET = 1,
|
|
824
|
-
*
|
|
825
|
-
* GOERLI = 5,
|
|
816
|
+
* SEPOLIA = 11155111,
|
|
826
817
|
* BSC_MAINNET = 56,
|
|
827
818
|
* BSC_TESTNET = 97,
|
|
828
819
|
* POLYGON = 137,
|
|
829
|
-
* POLYGON_MUMBAI = 80001,
|
|
830
820
|
* POLYGON_AMOY = 80002,
|
|
831
|
-
* MOONBEAM = 1284,
|
|
832
|
-
* MOONBASE_ALPHA = 1287,
|
|
833
|
-
* AVALANCHE = 43114,
|
|
834
|
-
* AVALANCHE_TESTNET = 43113,
|
|
835
|
-
* CELO = 42220,
|
|
836
|
-
* CELO_ALFAJORES = 44787,
|
|
837
821
|
* LOCALHOST = 1338,
|
|
838
822
|
* }
|
|
839
823
|
* ```
|
|
@@ -887,23 +871,12 @@ export declare class EscrowUtils {
|
|
|
887
871
|
* enum ChainId {
|
|
888
872
|
* ALL = -1,
|
|
889
873
|
* MAINNET = 1,
|
|
890
|
-
* RINKEBY = 4,
|
|
891
|
-
* GOERLI = 5,
|
|
892
874
|
* SEPOLIA = 11155111,
|
|
893
875
|
* BSC_MAINNET = 56,
|
|
894
876
|
* BSC_TESTNET = 97,
|
|
895
877
|
* POLYGON = 137,
|
|
896
|
-
* POLYGON_MUMBAI = 80001,
|
|
897
878
|
* POLYGON_AMOY = 80002,
|
|
898
|
-
* MOONBEAM = 1284,
|
|
899
|
-
* MOONBASE_ALPHA = 1287,
|
|
900
|
-
* AVALANCHE = 43114,
|
|
901
|
-
* AVALANCHE_TESTNET = 43113,
|
|
902
|
-
* CELO = 42220,
|
|
903
|
-
* CELO_ALFAJORES = 44787,
|
|
904
879
|
* LOCALHOST = 1338,
|
|
905
|
-
* XLAYER_TESTNET = 195,
|
|
906
|
-
* XLAYER = 196,
|
|
907
880
|
* }
|
|
908
881
|
* ```
|
|
909
882
|
*
|
package/dist/escrow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../src/escrow.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,cAAc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AAe,CACjC,OAAO,EAAE,OAAO,EAChB,QAAQ,CAAC,EAAE,YAAY,EAAE,EACzB,IAAI,CAAC,EAAE,IAAI,EACX,EAAE,CAAC,EAAE,IAAI,EACT,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,WAAW,EAAE,CAAC;CAuD1B"}
|
package/dist/escrow.js
CHANGED
|
@@ -1323,19 +1323,11 @@ class EscrowUtils {
|
|
|
1323
1323
|
* enum ChainId {
|
|
1324
1324
|
* ALL = -1,
|
|
1325
1325
|
* MAINNET = 1,
|
|
1326
|
-
*
|
|
1327
|
-
* GOERLI = 5,
|
|
1326
|
+
* SEPOLIA = 11155111,
|
|
1328
1327
|
* BSC_MAINNET = 56,
|
|
1329
1328
|
* BSC_TESTNET = 97,
|
|
1330
1329
|
* POLYGON = 137,
|
|
1331
|
-
* POLYGON_MUMBAI = 80001,
|
|
1332
1330
|
* POLYGON_AMOY=80002,
|
|
1333
|
-
* MOONBEAM = 1284,
|
|
1334
|
-
* MOONBASE_ALPHA = 1287,
|
|
1335
|
-
* AVALANCHE = 43114,
|
|
1336
|
-
* AVALANCHE_TESTNET = 43113,
|
|
1337
|
-
* CELO = 42220,
|
|
1338
|
-
* CELO_ALFAJORES = 44787,
|
|
1339
1331
|
* LOCALHOST = 1338,
|
|
1340
1332
|
* }
|
|
1341
1333
|
* ```
|
|
@@ -1429,8 +1421,8 @@ class EscrowUtils {
|
|
|
1429
1421
|
status: filter.status !== undefined
|
|
1430
1422
|
? Object.entries(types_1.EscrowStatus).find(([, value]) => value === filter.status)?.[0]
|
|
1431
1423
|
: undefined,
|
|
1432
|
-
from: filter.from ?
|
|
1433
|
-
to: filter.to ?
|
|
1424
|
+
from: filter.from ? (0, utils_1.getUnixTimestamp)(filter.from) : undefined,
|
|
1425
|
+
to: filter.to ? (0, utils_1.getUnixTimestamp)(filter.to) : undefined,
|
|
1434
1426
|
orderDirection: orderDirection,
|
|
1435
1427
|
first: first,
|
|
1436
1428
|
skip: skip,
|
|
@@ -1452,19 +1444,11 @@ class EscrowUtils {
|
|
|
1452
1444
|
* enum ChainId {
|
|
1453
1445
|
* ALL = -1,
|
|
1454
1446
|
* MAINNET = 1,
|
|
1455
|
-
*
|
|
1456
|
-
* GOERLI = 5,
|
|
1447
|
+
* SEPOLIA = 11155111,
|
|
1457
1448
|
* BSC_MAINNET = 56,
|
|
1458
1449
|
* BSC_TESTNET = 97,
|
|
1459
1450
|
* POLYGON = 137,
|
|
1460
|
-
* POLYGON_MUMBAI = 80001,
|
|
1461
1451
|
* POLYGON_AMOY = 80002,
|
|
1462
|
-
* MOONBEAM = 1284,
|
|
1463
|
-
* MOONBASE_ALPHA = 1287,
|
|
1464
|
-
* AVALANCHE = 43114,
|
|
1465
|
-
* AVALANCHE_TESTNET = 43113,
|
|
1466
|
-
* CELO = 42220,
|
|
1467
|
-
* CELO_ALFAJORES = 44787,
|
|
1468
1452
|
* LOCALHOST = 1338,
|
|
1469
1453
|
* }
|
|
1470
1454
|
* ```
|
|
@@ -1528,23 +1512,12 @@ class EscrowUtils {
|
|
|
1528
1512
|
* enum ChainId {
|
|
1529
1513
|
* ALL = -1,
|
|
1530
1514
|
* MAINNET = 1,
|
|
1531
|
-
* RINKEBY = 4,
|
|
1532
|
-
* GOERLI = 5,
|
|
1533
1515
|
* SEPOLIA = 11155111,
|
|
1534
1516
|
* BSC_MAINNET = 56,
|
|
1535
1517
|
* BSC_TESTNET = 97,
|
|
1536
1518
|
* POLYGON = 137,
|
|
1537
|
-
* POLYGON_MUMBAI = 80001,
|
|
1538
1519
|
* POLYGON_AMOY = 80002,
|
|
1539
|
-
* MOONBEAM = 1284,
|
|
1540
|
-
* MOONBASE_ALPHA = 1287,
|
|
1541
|
-
* AVALANCHE = 43114,
|
|
1542
|
-
* AVALANCHE_TESTNET = 43113,
|
|
1543
|
-
* CELO = 42220,
|
|
1544
|
-
* CELO_ALFAJORES = 44787,
|
|
1545
1520
|
* LOCALHOST = 1338,
|
|
1546
|
-
* XLAYER_TESTNET = 195,
|
|
1547
|
-
* XLAYER = 196,
|
|
1548
1521
|
* }
|
|
1549
1522
|
* ```
|
|
1550
1523
|
*
|
|
@@ -1614,8 +1587,8 @@ class EscrowUtils {
|
|
|
1614
1587
|
const statusNames = effectiveStatuses.map((status) => types_1.EscrowStatus[status]);
|
|
1615
1588
|
const data = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_STATUS_UPDATES_QUERY)(from, to, launcher), {
|
|
1616
1589
|
status: statusNames,
|
|
1617
|
-
from: from ?
|
|
1618
|
-
to: to ?
|
|
1590
|
+
from: from ? (0, utils_1.getUnixTimestamp)(from) : undefined,
|
|
1591
|
+
to: to ? (0, utils_1.getUnixTimestamp)(to) : undefined,
|
|
1619
1592
|
launcher: launcher || undefined,
|
|
1620
1593
|
orderDirection: orderDirection,
|
|
1621
1594
|
first: first,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/operator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/operator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA4BhD,eAAO,MAAM,iBAAiB,WAAY,cAAc,mCA+BvD,CAAC;AAEF,eAAO,MAAM,4BAA4B,UAAW,MAAM,mCA0BzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,gCAO5B,CAAC"}
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export interface ILeader {
|
|
|
25
25
|
registrationNeeded?: boolean;
|
|
26
26
|
registrationInstructions?: string;
|
|
27
27
|
reputationNetworks?: string[];
|
|
28
|
+
name?: string;
|
|
29
|
+
category?: string;
|
|
28
30
|
}
|
|
29
31
|
export interface ILeaderSubgraph extends Omit<ILeader, 'jobTypes' | 'reputationNetworks' | 'chainId'> {
|
|
30
32
|
jobTypes?: string;
|
package/dist/interfaces.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,WAAW,OAAO;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceR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,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;CAC5B"}
|
package/dist/statistics.js
CHANGED
|
@@ -107,8 +107,8 @@ class StatisticsClient {
|
|
|
107
107
|
const orderDirection = filter.orderDirection || enums_1.OrderDirection.ASC;
|
|
108
108
|
const { escrowStatistics } = await (0, graphql_request_1.default)(this.subgraphUrl, graphql_1.GET_ESCROW_STATISTICS_QUERY);
|
|
109
109
|
const { eventDayDatas } = await (0, graphql_request_1.default)(this.subgraphUrl, (0, graphql_1.GET_EVENT_DAY_DATA_QUERY)(filter), {
|
|
110
|
-
from: filter.from ? filter.from
|
|
111
|
-
to: filter.to ? filter.to
|
|
110
|
+
from: filter.from ? (0, utils_1.getUnixTimestamp)(filter.from) : undefined,
|
|
111
|
+
to: filter.to ? (0, utils_1.getUnixTimestamp)(filter.to) : undefined,
|
|
112
112
|
orderDirection: orderDirection,
|
|
113
113
|
first: first,
|
|
114
114
|
skip: skip,
|
|
@@ -180,8 +180,8 @@ class StatisticsClient {
|
|
|
180
180
|
const skip = filter.skip || 0;
|
|
181
181
|
const orderDirection = filter.orderDirection || enums_1.OrderDirection.ASC;
|
|
182
182
|
const { eventDayDatas } = await (0, graphql_request_1.default)(this.subgraphUrl, (0, graphql_1.GET_EVENT_DAY_DATA_QUERY)(filter), {
|
|
183
|
-
from: filter.from ? filter.from
|
|
184
|
-
to: filter.to ? filter.to
|
|
183
|
+
from: filter.from ? (0, utils_1.getUnixTimestamp)(filter.from) : undefined,
|
|
184
|
+
to: filter.to ? (0, utils_1.getUnixTimestamp)(filter.to) : undefined,
|
|
185
185
|
orderDirection: orderDirection,
|
|
186
186
|
first: first,
|
|
187
187
|
skip: skip,
|
|
@@ -269,8 +269,8 @@ class StatisticsClient {
|
|
|
269
269
|
const skip = filter.skip || 0;
|
|
270
270
|
const orderDirection = filter.orderDirection || enums_1.OrderDirection.ASC;
|
|
271
271
|
const { eventDayDatas } = await (0, graphql_request_1.default)(this.subgraphUrl, (0, graphql_1.GET_EVENT_DAY_DATA_QUERY)(filter), {
|
|
272
|
-
from: filter.from ? filter.from
|
|
273
|
-
to: filter.to ? filter.to
|
|
272
|
+
from: filter.from ? (0, utils_1.getUnixTimestamp)(filter.from) : undefined,
|
|
273
|
+
to: filter.to ? (0, utils_1.getUnixTimestamp)(filter.to) : undefined,
|
|
274
274
|
orderDirection: orderDirection,
|
|
275
275
|
first: first,
|
|
276
276
|
skip: skip,
|
|
@@ -428,8 +428,8 @@ class StatisticsClient {
|
|
|
428
428
|
const skip = filter.skip || 0;
|
|
429
429
|
const orderDirection = filter.orderDirection || enums_1.OrderDirection.ASC;
|
|
430
430
|
const { eventDayDatas } = await (0, graphql_request_1.default)(this.subgraphUrl, (0, graphql_1.GET_EVENT_DAY_DATA_QUERY)(filter), {
|
|
431
|
-
from: filter.from ? filter.from
|
|
432
|
-
to: filter.to ? filter.to
|
|
431
|
+
from: filter.from ? (0, utils_1.getUnixTimestamp)(filter.from) : undefined,
|
|
432
|
+
to: filter.to ? (0, utils_1.getUnixTimestamp)(filter.to) : undefined,
|
|
433
433
|
orderDirection: orderDirection,
|
|
434
434
|
first: first,
|
|
435
435
|
skip: skip,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAC;AAUlD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGjE,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;;OAcG;WACiB,cAAc,CAChC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,YAAY,CAAC;IAmBxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;WACiB,eAAe,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,YAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../src/transaction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAC;AAUlD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGjE,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;;OAcG;WACiB,cAAc,CAChC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,YAAY,CAAC;IAmBxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoDG;WACiB,eAAe,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,YAAY,EAAE,CAAC;CAwC3B"}
|
package/dist/transaction.js
CHANGED
|
@@ -110,11 +110,9 @@ class TransactionUtils {
|
|
|
110
110
|
fromAddress: filter?.fromAddress,
|
|
111
111
|
toAddress: filter?.toAddress,
|
|
112
112
|
startDate: filter?.startDate
|
|
113
|
-
?
|
|
114
|
-
: undefined,
|
|
115
|
-
endDate: filter.endDate
|
|
116
|
-
? Math.floor(filter.endDate.getTime() / 1000)
|
|
113
|
+
? (0, utils_1.getUnixTimestamp)(filter?.startDate)
|
|
117
114
|
: undefined,
|
|
115
|
+
endDate: filter.endDate ? (0, utils_1.getUnixTimestamp)(filter.endDate) : undefined,
|
|
118
116
|
startBlock: filter.startBlock ? filter.startBlock : undefined,
|
|
119
117
|
endBlock: filter.endBlock ? filter.endBlock : undefined,
|
|
120
118
|
orderDirection: orderDirection,
|
package/dist/utils.d.ts
CHANGED
|
@@ -20,4 +20,11 @@ export declare const isValidUrl: (url: string) => boolean;
|
|
|
20
20
|
* @returns
|
|
21
21
|
*/
|
|
22
22
|
export declare const getSubgraphUrl: (networkData: NetworkData) => string;
|
|
23
|
+
/**
|
|
24
|
+
* **Convert a date to Unix timestamp (seconds since epoch).*
|
|
25
|
+
*
|
|
26
|
+
* @param {Date} date
|
|
27
|
+
* @returns {number}
|
|
28
|
+
*/
|
|
29
|
+
export declare const getUnixTimestamp: (date: Date) => number;
|
|
23
30
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,MAAO,GAAG,UAgBhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,YAOrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,gBAAiB,WAAW,WAatD,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,MAAO,GAAG,UAgBhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,YAOrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,gBAAiB,WAAW,WAatD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,SAAU,IAAI,KAAG,MAE7C,CAAC"}
|
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSubgraphUrl = exports.isValidUrl = exports.throwError = void 0;
|
|
3
|
+
exports.getUnixTimestamp = exports.getSubgraphUrl = exports.isValidUrl = exports.throwError = void 0;
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
5
|
const ethers_1 = require("ethers");
|
|
6
6
|
const error_1 = require("./error");
|
|
@@ -69,3 +69,13 @@ const getSubgraphUrl = (networkData) => {
|
|
|
69
69
|
return subgraphUrl;
|
|
70
70
|
};
|
|
71
71
|
exports.getSubgraphUrl = getSubgraphUrl;
|
|
72
|
+
/**
|
|
73
|
+
* **Convert a date to Unix timestamp (seconds since epoch).*
|
|
74
|
+
*
|
|
75
|
+
* @param {Date} date
|
|
76
|
+
* @returns {number}
|
|
77
|
+
*/
|
|
78
|
+
const getUnixTimestamp = (date) => {
|
|
79
|
+
return Math.floor(date.getTime() / 1000);
|
|
80
|
+
};
|
|
81
|
+
exports.getUnixTimestamp = getUnixTimestamp;
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -36,38 +36,10 @@ export const NETWORKS: {
|
|
|
36
36
|
subgraphUrl:
|
|
37
37
|
'https://api.studio.thegraph.com/query/74256/ethereum/version/latest',
|
|
38
38
|
subgraphUrlApiKey:
|
|
39
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
39
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmc8ikCj9y2uvYGTeELkM9wybPdcD2PgpW4tjJMwnogLrq',
|
|
40
40
|
oldSubgraphUrl: '',
|
|
41
41
|
oldFactoryAddress: '',
|
|
42
42
|
},
|
|
43
|
-
[ChainId.RINKEBY]: {
|
|
44
|
-
chainId: ChainId.RINKEBY,
|
|
45
|
-
title: 'Ethereum Rinkeby',
|
|
46
|
-
scanUrl: 'https://rinkeby.etherscan.io',
|
|
47
|
-
factoryAddress: '0x925B24444511c86F4d4E63141D8Be0A025E2dca4',
|
|
48
|
-
hmtAddress: '0x4dCf5ac4509888714dd43A5cCc46d7ab389D9c23',
|
|
49
|
-
stakingAddress: '',
|
|
50
|
-
kvstoreAddress: '',
|
|
51
|
-
subgraphUrl: '',
|
|
52
|
-
subgraphUrlApiKey: '',
|
|
53
|
-
oldSubgraphUrl: '',
|
|
54
|
-
oldFactoryAddress: '',
|
|
55
|
-
},
|
|
56
|
-
[ChainId.GOERLI]: {
|
|
57
|
-
chainId: ChainId.GOERLI,
|
|
58
|
-
title: 'Ethereum Goerli',
|
|
59
|
-
scanUrl: 'https://goerli.etherscan.io',
|
|
60
|
-
factoryAddress: '0x87469B4f2Fcf37cBd34E54244c0BD4Fa0603664c',
|
|
61
|
-
hmtAddress: '0xd3A31D57FDD790725d0F6B78095F62E8CD4ab317',
|
|
62
|
-
stakingAddress: '0xf46B45Df3d956369726d8Bd93Ba33963Ab692920',
|
|
63
|
-
kvstoreAddress: '0x19Fc3e859C1813ac9427a7a78BeB9ae102CE96d3',
|
|
64
|
-
subgraphUrl:
|
|
65
|
-
'https://api.thegraph.com/subgraphs/name/humanprotocol/goerli-v2',
|
|
66
|
-
subgraphUrlApiKey: '',
|
|
67
|
-
oldSubgraphUrl:
|
|
68
|
-
'https://api.thegraph.com/subgraphs/name/humanprotocol/goerli',
|
|
69
|
-
oldFactoryAddress: '0xaAe6a2646C1F88763E62e0cD08aD050Ea66AC46F',
|
|
70
|
-
},
|
|
71
43
|
[ChainId.SEPOLIA]: {
|
|
72
44
|
chainId: ChainId.SEPOLIA,
|
|
73
45
|
title: 'Ethereum Sepolia',
|
|
@@ -79,7 +51,7 @@ export const NETWORKS: {
|
|
|
79
51
|
subgraphUrl:
|
|
80
52
|
'https://api.studio.thegraph.com/query/74256/sepolia/version/latest',
|
|
81
53
|
subgraphUrlApiKey:
|
|
82
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
54
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmfB1oqYCMTKZB2vcYJzQmGGvVS8cMCHohpYbjKFWoFo8z',
|
|
83
55
|
oldSubgraphUrl: '',
|
|
84
56
|
oldFactoryAddress: '',
|
|
85
57
|
},
|
|
@@ -94,7 +66,7 @@ export const NETWORKS: {
|
|
|
94
66
|
subgraphUrl:
|
|
95
67
|
'https://api.studio.thegraph.com/query/74256/bsc/version/latest',
|
|
96
68
|
subgraphUrlApiKey:
|
|
97
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
69
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmPEaCSuzbVHDrGEWTS7T4N8U7kBMMMfkj4b4ZeqheVuMc',
|
|
98
70
|
oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsc',
|
|
99
71
|
oldFactoryAddress: '0xc88bC422cAAb2ac8812de03176402dbcA09533f4',
|
|
100
72
|
},
|
|
@@ -109,7 +81,7 @@ export const NETWORKS: {
|
|
|
109
81
|
subgraphUrl:
|
|
110
82
|
'https://api.studio.thegraph.com/query/74256/bsc-testnet/version/latest',
|
|
111
83
|
subgraphUrlApiKey:
|
|
112
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
84
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmbp8jzcYurrKdk1Mg5ycJ8jcxwou3wWsmNcRdAc16aQEt',
|
|
113
85
|
oldSubgraphUrl:
|
|
114
86
|
'https://api.thegraph.com/subgraphs/name/humanprotocol/bsctest',
|
|
115
87
|
oldFactoryAddress: '0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f',
|
|
@@ -125,26 +97,11 @@ export const NETWORKS: {
|
|
|
125
97
|
subgraphUrl:
|
|
126
98
|
'https://api.studio.thegraph.com/query/74256/polygon/version/latest',
|
|
127
99
|
subgraphUrlApiKey:
|
|
128
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
100
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmeSoEuFieiKXtqzDY3WUBz5gKFWwYVPP7iaebpBpJyo7Y',
|
|
129
101
|
oldSubgraphUrl:
|
|
130
102
|
'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
|
|
131
103
|
oldFactoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794',
|
|
132
104
|
},
|
|
133
|
-
[ChainId.POLYGON_MUMBAI]: {
|
|
134
|
-
chainId: ChainId.POLYGON_MUMBAI,
|
|
135
|
-
title: 'Polygon Mumbai',
|
|
136
|
-
scanUrl: 'https://mumbai.polygonscan.com',
|
|
137
|
-
factoryAddress: '0xA8D927C4DA17A6b71675d2D49dFda4E9eBE58f2d',
|
|
138
|
-
hmtAddress: '0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4',
|
|
139
|
-
stakingAddress: '0x7Fd3dF914E7b6Bd96B4c744Df32183b51368Bfac',
|
|
140
|
-
kvstoreAddress: '0xD96158c7267Ea658a4688F4aEf1c85659851625d',
|
|
141
|
-
subgraphUrl:
|
|
142
|
-
'https://api.thegraph.com/subgraphs/name/humanprotocol/mumbai-v2',
|
|
143
|
-
subgraphUrlApiKey: '',
|
|
144
|
-
oldSubgraphUrl:
|
|
145
|
-
'https://api.thegraph.com/subgraphs/name/humanprotocol/mumbai',
|
|
146
|
-
oldFactoryAddress: '0x558cd800f9F0B02f3B149667bDe003284c867E94',
|
|
147
|
-
},
|
|
148
105
|
[ChainId.POLYGON_AMOY]: {
|
|
149
106
|
chainId: ChainId.POLYGON_AMOY,
|
|
150
107
|
title: 'Polygon Amoy',
|
|
@@ -156,130 +113,7 @@ export const NETWORKS: {
|
|
|
156
113
|
subgraphUrl:
|
|
157
114
|
'https://api.studio.thegraph.com/query/74256/amoy/version/latest',
|
|
158
115
|
subgraphUrlApiKey:
|
|
159
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/
|
|
160
|
-
oldSubgraphUrl: '',
|
|
161
|
-
oldFactoryAddress: '',
|
|
162
|
-
},
|
|
163
|
-
[ChainId.MOONBEAM]: {
|
|
164
|
-
chainId: ChainId.MOONBEAM,
|
|
165
|
-
title: 'Moonbeam',
|
|
166
|
-
scanUrl: 'https://moonbeam.moonscan.io',
|
|
167
|
-
factoryAddress: '0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a',
|
|
168
|
-
hmtAddress: '0x3b25BC1dC591D24d60560d0135D6750A561D4764',
|
|
169
|
-
stakingAddress: '0x05398211bA2046E296fBc9a9D3EB49e3F15C3123',
|
|
170
|
-
kvstoreAddress: '0x2B95bEcb6EBC4589f64CB000dFCF716b4aeF8aA6',
|
|
171
|
-
subgraphUrl:
|
|
172
|
-
'https://api.studio.thegraph.com/query/74256/moonbeam/version/latest',
|
|
173
|
-
subgraphUrlApiKey:
|
|
174
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYe9hsFYuVgQsH719AsqRNqgVM8YBYfCuhBNYjXtBqQru',
|
|
175
|
-
oldSubgraphUrl:
|
|
176
|
-
'https://api.thegraph.com/subgraphs/name/humanprotocol/moonbeam',
|
|
177
|
-
oldFactoryAddress: '0x98108c28B7767a52BE38B4860832dd4e11A7ecad',
|
|
178
|
-
},
|
|
179
|
-
[ChainId.MOONBASE_ALPHA]: {
|
|
180
|
-
chainId: ChainId.MOONBASE_ALPHA,
|
|
181
|
-
title: 'Moonbase Alpha',
|
|
182
|
-
scanUrl: 'https://moonbase.moonscan.io/',
|
|
183
|
-
factoryAddress: '0x5e622FF522D81aa426f082bDD95210BC25fCA7Ed',
|
|
184
|
-
hmtAddress: '0x2dd72db2bBA65cE663e476bA8b84A1aAF802A8e3',
|
|
185
|
-
stakingAddress: '0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940',
|
|
186
|
-
kvstoreAddress: '0xcC561f4482f4Ff051D2Dcc65c2cE1A0f291bbA46',
|
|
187
|
-
subgraphUrl:
|
|
188
|
-
'https://api.studio.thegraph.com/query/74256/moonbase-alpha/version/latest',
|
|
189
|
-
subgraphUrlApiKey:
|
|
190
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmSDPbm5xxMvYVSJzHFVsRiMekvJVYSJ7UfZw17DhPMdaH',
|
|
191
|
-
oldSubgraphUrl: '',
|
|
192
|
-
oldFactoryAddress: '',
|
|
193
|
-
},
|
|
194
|
-
[ChainId.AVALANCHE_TESTNET]: {
|
|
195
|
-
chainId: ChainId.AVALANCHE_TESTNET,
|
|
196
|
-
title: 'Fuji C-Chain',
|
|
197
|
-
scanUrl: 'https://testnet.snowtrace.io',
|
|
198
|
-
factoryAddress: '0x56C2ba540726ED4f46E7a134b6b9Ee9C867FcF92',
|
|
199
|
-
hmtAddress: '0x9406d5c635AD22b0d76c75E52De57A2177919ca3',
|
|
200
|
-
stakingAddress: '0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940',
|
|
201
|
-
kvstoreAddress: '0x3aD4B091E054f192a822D1406f4535eAd38580e4',
|
|
202
|
-
subgraphUrl:
|
|
203
|
-
'https://api.studio.thegraph.com/query/74256/fuji/version/latest',
|
|
204
|
-
subgraphUrlApiKey:
|
|
205
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYXwNPwC5DcitK1SLVUR6gPANmEn3UsVvGeTbjCv1tTb2',
|
|
206
|
-
oldSubgraphUrl:
|
|
207
|
-
'https://api.thegraph.com/subgraphs/name/humanprotocol/fuji',
|
|
208
|
-
oldFactoryAddress: '0xfb4469201951C3B9a7F1996c477cb7BDBEcE0A88',
|
|
209
|
-
},
|
|
210
|
-
[ChainId.AVALANCHE]: {
|
|
211
|
-
chainId: ChainId.AVALANCHE,
|
|
212
|
-
title: 'Avalanche C-Chain Mainnet',
|
|
213
|
-
scanUrl: 'https://snowtrace.io',
|
|
214
|
-
factoryAddress: '0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a',
|
|
215
|
-
hmtAddress: '0x12365293cb6477d4fc2686e46BB97E3Fb64f1550',
|
|
216
|
-
stakingAddress: '0x05398211bA2046E296fBc9a9D3EB49e3F15C3123',
|
|
217
|
-
kvstoreAddress: '0x9Bc7bff35B2Be2413708d48c3B0aEF5c43646728',
|
|
218
|
-
subgraphUrl:
|
|
219
|
-
'https://api.studio.thegraph.com/query/74256/avalanche/version/latest',
|
|
220
|
-
subgraphUrlApiKey:
|
|
221
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYR8NUuAQVoGmGSwKanUJLjX9iZxrEyGH39HjUuXLmsum',
|
|
222
|
-
oldSubgraphUrl:
|
|
223
|
-
'https://api.thegraph.com/subgraphs/name/humanprotocol/avalanche',
|
|
224
|
-
oldFactoryAddress: '0x9767a578ba7a5FA1563c8229943cB01cd8446BB4',
|
|
225
|
-
},
|
|
226
|
-
[ChainId.CELO_ALFAJORES]: {
|
|
227
|
-
chainId: ChainId.CELO_ALFAJORES,
|
|
228
|
-
title: 'Celo Alfajores',
|
|
229
|
-
scanUrl: 'https://alfajores.celoscan.io/',
|
|
230
|
-
factoryAddress: '0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569',
|
|
231
|
-
hmtAddress: '0x2736B33455A872dC478E1E004106D04c35472468',
|
|
232
|
-
stakingAddress: '0x003548Df34be8836cF0F9673403a1E40ba449a0F',
|
|
233
|
-
kvstoreAddress: '0x938335006ea6F9Eb0e8020969cFF94404425e298',
|
|
234
|
-
subgraphUrl:
|
|
235
|
-
'https://api.studio.thegraph.com/query/74256/celo-alfajores/version/latest',
|
|
236
|
-
subgraphUrlApiKey:
|
|
237
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmb2WKCFFhT7REAjTuMd9pZvGw7rRpzeZSPJ3KRztD2pMM',
|
|
238
|
-
oldSubgraphUrl: '',
|
|
239
|
-
oldFactoryAddress: '',
|
|
240
|
-
},
|
|
241
|
-
[ChainId.CELO]: {
|
|
242
|
-
chainId: ChainId.CELO,
|
|
243
|
-
title: 'Celo',
|
|
244
|
-
scanUrl: 'https://celoscan.io/',
|
|
245
|
-
factoryAddress: '0xc90B43a5d576D9d8026c48904dfbaED50C15Fa08',
|
|
246
|
-
hmtAddress: '0x19Ead835951493A763c96910255d5eeF147E914F',
|
|
247
|
-
stakingAddress: '0x34cD3Bd6B16c559f321799b516dE61E12017fFd1',
|
|
248
|
-
kvstoreAddress: '0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569',
|
|
249
|
-
subgraphUrl:
|
|
250
|
-
'https://api.studio.thegraph.com/query/74256/celo/version/latest',
|
|
251
|
-
subgraphUrlApiKey:
|
|
252
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmeeb5zshw1z9Q38NNPun2Pd7P951Mkzz5ywK171tauNRY',
|
|
253
|
-
oldSubgraphUrl: '',
|
|
254
|
-
oldFactoryAddress: '',
|
|
255
|
-
},
|
|
256
|
-
[ChainId.XLAYER]: {
|
|
257
|
-
chainId: ChainId.XLAYER,
|
|
258
|
-
title: 'XLayer',
|
|
259
|
-
scanUrl: 'https://www.oklink.com/xlayer',
|
|
260
|
-
factoryAddress: '0x4949C9DFFD83F0D5Ab0AB24C57C4D403D5c20C15',
|
|
261
|
-
hmtAddress: '0x10acbe3b9e6a2ff7f341e5cbf4b6617741ff44aa',
|
|
262
|
-
stakingAddress: '0x01D115E9E8bF0C58318793624CC662a030D07F1D',
|
|
263
|
-
kvstoreAddress: '0x6512d894cc3d3FE93Da9d0420430136fA889FaB9',
|
|
264
|
-
subgraphUrl:
|
|
265
|
-
'https://api.studio.thegraph.com/query/74256/xlayer/version/latest',
|
|
266
|
-
subgraphUrlApiKey:
|
|
267
|
-
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmWTggMrB5sRSs2fePuqQG9WbLMk8HtnfLH3VbRhmVdF8s',
|
|
268
|
-
oldSubgraphUrl: '',
|
|
269
|
-
oldFactoryAddress: '',
|
|
270
|
-
},
|
|
271
|
-
[ChainId.XLAYER_TESTNET]: {
|
|
272
|
-
chainId: ChainId.XLAYER_TESTNET,
|
|
273
|
-
title: 'XLayer Testnet',
|
|
274
|
-
scanUrl: 'https://www.okx.com/explorer/xlayer-test',
|
|
275
|
-
factoryAddress: '0x6Cd3ecAD36ee88E9ef3665CF381D9dAE0FE0a32e',
|
|
276
|
-
hmtAddress: '0x792abbcC99c01dbDec49c9fa9A828a186Da45C33',
|
|
277
|
-
stakingAddress: '0xeF9849a904dF0d494D69ac0B0a6860a3A7936114',
|
|
278
|
-
kvstoreAddress: '0xdE8BE9E3C12E9F546309A429cd88d026a25EaF8C',
|
|
279
|
-
subgraphUrl:
|
|
280
|
-
'https://api.studio.thegraph.com/query/74256/xlayer-testnet/version/latest',
|
|
281
|
-
subgraphUrlApiKey:
|
|
282
|
-
'https://gateway-testnet-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmNoRyqZtJTRrkbKAmWMZQUHuah7YSs8U9R3nzPu8WEhtY',
|
|
116
|
+
'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmQUUv8SK2skarDrJpB8LXXqMwjzxg3Z42dx12uEL5Pmeq',
|
|
283
117
|
oldSubgraphUrl: '',
|
|
284
118
|
oldFactoryAddress: '',
|
|
285
119
|
},
|
|
@@ -299,22 +133,25 @@ export const NETWORKS: {
|
|
|
299
133
|
};
|
|
300
134
|
|
|
301
135
|
export const KVStoreKeys = {
|
|
302
|
-
|
|
136
|
+
category: 'category',
|
|
303
137
|
fee: 'fee',
|
|
304
|
-
publicKey: 'public_key',
|
|
305
|
-
webhookUrl: 'webhook_url',
|
|
306
|
-
website: 'website',
|
|
307
|
-
url: 'url',
|
|
308
138
|
jobTypes: 'job_types',
|
|
309
|
-
|
|
139
|
+
operatorName: 'name',
|
|
140
|
+
publicKey: 'public_key',
|
|
141
|
+
publicKeyHash: 'public_key_hash',
|
|
310
142
|
registrationInstructions: 'registration_instructions',
|
|
143
|
+
registrationNeeded: 'registration_needed',
|
|
144
|
+
role: 'role',
|
|
145
|
+
url: 'url',
|
|
146
|
+
website: 'website',
|
|
147
|
+
webhookUrl: 'webhook_url',
|
|
311
148
|
};
|
|
312
149
|
|
|
313
150
|
export const Role = {
|
|
314
|
-
JobLauncher: '
|
|
315
|
-
ExchangeOracle: '
|
|
316
|
-
ReputationOracle: '
|
|
317
|
-
RecordingOracle: '
|
|
151
|
+
JobLauncher: 'job_launcher',
|
|
152
|
+
ExchangeOracle: 'exchange_oracle',
|
|
153
|
+
ReputationOracle: 'reputation_oracle',
|
|
154
|
+
RecordingOracle: 'recording_oracle',
|
|
318
155
|
};
|
|
319
156
|
|
|
320
157
|
export const SUBGRAPH_API_KEY_PLACEHOLDER = '[SUBGRAPH_API_KEY]';
|
package/src/enums.ts
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
export enum ChainId {
|
|
2
2
|
ALL = -1,
|
|
3
3
|
MAINNET = 1,
|
|
4
|
-
RINKEBY = 4,
|
|
5
|
-
GOERLI = 5,
|
|
6
4
|
SEPOLIA = 11155111,
|
|
7
5
|
BSC_MAINNET = 56,
|
|
8
6
|
BSC_TESTNET = 97,
|
|
9
7
|
POLYGON = 137,
|
|
10
|
-
POLYGON_MUMBAI = 80001,
|
|
11
8
|
POLYGON_AMOY = 80002,
|
|
12
|
-
MOONBEAM = 1284,
|
|
13
|
-
MOONBASE_ALPHA = 1287,
|
|
14
|
-
AVALANCHE_TESTNET = 43113,
|
|
15
|
-
AVALANCHE = 43114,
|
|
16
|
-
CELO = 42220,
|
|
17
|
-
CELO_ALFAJORES = 44787,
|
|
18
|
-
XLAYER_TESTNET = 195,
|
|
19
9
|
LOCALHOST = 1338,
|
|
20
|
-
XLAYER = 196,
|
|
21
10
|
}
|
|
22
11
|
|
|
23
12
|
export enum OrderDirection {
|
|
24
13
|
ASC = 'asc',
|
|
25
14
|
DESC = 'desc',
|
|
26
15
|
}
|
|
16
|
+
|
|
17
|
+
export enum LeaderCategory {
|
|
18
|
+
MACHINE_LEARNING = 'machine_learning',
|
|
19
|
+
MARKET_MAKING = 'market_making',
|
|
20
|
+
}
|
package/src/escrow.ts
CHANGED
|
@@ -55,7 +55,12 @@ import {
|
|
|
55
55
|
NetworkData,
|
|
56
56
|
TransactionLikeWithNonce,
|
|
57
57
|
} from './types';
|
|
58
|
-
import {
|
|
58
|
+
import {
|
|
59
|
+
getSubgraphUrl,
|
|
60
|
+
getUnixTimestamp,
|
|
61
|
+
isValidUrl,
|
|
62
|
+
throwError,
|
|
63
|
+
} from './utils';
|
|
59
64
|
|
|
60
65
|
/**
|
|
61
66
|
* ## Introduction
|
|
@@ -1578,19 +1583,11 @@ export class EscrowUtils {
|
|
|
1578
1583
|
* enum ChainId {
|
|
1579
1584
|
* ALL = -1,
|
|
1580
1585
|
* MAINNET = 1,
|
|
1581
|
-
*
|
|
1582
|
-
* GOERLI = 5,
|
|
1586
|
+
* SEPOLIA = 11155111,
|
|
1583
1587
|
* BSC_MAINNET = 56,
|
|
1584
1588
|
* BSC_TESTNET = 97,
|
|
1585
1589
|
* POLYGON = 137,
|
|
1586
|
-
* POLYGON_MUMBAI = 80001,
|
|
1587
1590
|
* POLYGON_AMOY=80002,
|
|
1588
|
-
* MOONBEAM = 1284,
|
|
1589
|
-
* MOONBASE_ALPHA = 1287,
|
|
1590
|
-
* AVALANCHE = 43114,
|
|
1591
|
-
* AVALANCHE_TESTNET = 43113,
|
|
1592
|
-
* CELO = 42220,
|
|
1593
|
-
* CELO_ALFAJORES = 44787,
|
|
1594
1591
|
* LOCALHOST = 1338,
|
|
1595
1592
|
* }
|
|
1596
1593
|
* ```
|
|
@@ -1700,8 +1697,8 @@ export class EscrowUtils {
|
|
|
1700
1697
|
([, value]) => value === filter.status
|
|
1701
1698
|
)?.[0]
|
|
1702
1699
|
: undefined,
|
|
1703
|
-
from: filter.from ?
|
|
1704
|
-
to: filter.to ?
|
|
1700
|
+
from: filter.from ? getUnixTimestamp(filter.from) : undefined,
|
|
1701
|
+
to: filter.to ? getUnixTimestamp(filter.to) : undefined,
|
|
1705
1702
|
orderDirection: orderDirection,
|
|
1706
1703
|
first: first,
|
|
1707
1704
|
skip: skip,
|
|
@@ -1727,19 +1724,11 @@ export class EscrowUtils {
|
|
|
1727
1724
|
* enum ChainId {
|
|
1728
1725
|
* ALL = -1,
|
|
1729
1726
|
* MAINNET = 1,
|
|
1730
|
-
*
|
|
1731
|
-
* GOERLI = 5,
|
|
1727
|
+
* SEPOLIA = 11155111,
|
|
1732
1728
|
* BSC_MAINNET = 56,
|
|
1733
1729
|
* BSC_TESTNET = 97,
|
|
1734
1730
|
* POLYGON = 137,
|
|
1735
|
-
* POLYGON_MUMBAI = 80001,
|
|
1736
1731
|
* POLYGON_AMOY = 80002,
|
|
1737
|
-
* MOONBEAM = 1284,
|
|
1738
|
-
* MOONBASE_ALPHA = 1287,
|
|
1739
|
-
* AVALANCHE = 43114,
|
|
1740
|
-
* AVALANCHE_TESTNET = 43113,
|
|
1741
|
-
* CELO = 42220,
|
|
1742
|
-
* CELO_ALFAJORES = 44787,
|
|
1743
1732
|
* LOCALHOST = 1338,
|
|
1744
1733
|
* }
|
|
1745
1734
|
* ```
|
|
@@ -1815,23 +1804,12 @@ export class EscrowUtils {
|
|
|
1815
1804
|
* enum ChainId {
|
|
1816
1805
|
* ALL = -1,
|
|
1817
1806
|
* MAINNET = 1,
|
|
1818
|
-
* RINKEBY = 4,
|
|
1819
|
-
* GOERLI = 5,
|
|
1820
1807
|
* SEPOLIA = 11155111,
|
|
1821
1808
|
* BSC_MAINNET = 56,
|
|
1822
1809
|
* BSC_TESTNET = 97,
|
|
1823
1810
|
* POLYGON = 137,
|
|
1824
|
-
* POLYGON_MUMBAI = 80001,
|
|
1825
1811
|
* POLYGON_AMOY = 80002,
|
|
1826
|
-
* MOONBEAM = 1284,
|
|
1827
|
-
* MOONBASE_ALPHA = 1287,
|
|
1828
|
-
* AVALANCHE = 43114,
|
|
1829
|
-
* AVALANCHE_TESTNET = 43113,
|
|
1830
|
-
* CELO = 42220,
|
|
1831
|
-
* CELO_ALFAJORES = 44787,
|
|
1832
1812
|
* LOCALHOST = 1338,
|
|
1833
|
-
* XLAYER_TESTNET = 195,
|
|
1834
|
-
* XLAYER = 196,
|
|
1835
1813
|
* }
|
|
1836
1814
|
* ```
|
|
1837
1815
|
*
|
|
@@ -1921,8 +1899,8 @@ export class EscrowUtils {
|
|
|
1921
1899
|
GET_STATUS_UPDATES_QUERY(from, to, launcher),
|
|
1922
1900
|
{
|
|
1923
1901
|
status: statusNames,
|
|
1924
|
-
from: from ?
|
|
1925
|
-
to: to ?
|
|
1902
|
+
from: from ? getUnixTimestamp(from) : undefined,
|
|
1903
|
+
to: to ? getUnixTimestamp(to) : undefined,
|
|
1926
1904
|
launcher: launcher || undefined,
|
|
1927
1905
|
orderDirection: orderDirection,
|
|
1928
1906
|
first: first,
|
package/src/interfaces.ts
CHANGED
package/src/statistics.ts
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from './graphql';
|
|
21
21
|
import { IHMTHoldersParams, IStatisticsFilter } from './interfaces';
|
|
22
22
|
import { NetworkData } from './types';
|
|
23
|
-
import { getSubgraphUrl, throwError } from './utils';
|
|
23
|
+
import { getSubgraphUrl, getUnixTimestamp, throwError } from './utils';
|
|
24
24
|
import { OrderDirection } from './enums';
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -133,8 +133,8 @@ export class StatisticsClient {
|
|
|
133
133
|
const { eventDayDatas } = await gqlFetch<{
|
|
134
134
|
eventDayDatas: EventDayData[];
|
|
135
135
|
}>(this.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(filter), {
|
|
136
|
-
from: filter.from ? filter.from
|
|
137
|
-
to: filter.to ? filter.to
|
|
136
|
+
from: filter.from ? getUnixTimestamp(filter.from) : undefined,
|
|
137
|
+
to: filter.to ? getUnixTimestamp(filter.to) : undefined,
|
|
138
138
|
orderDirection: orderDirection,
|
|
139
139
|
first: first,
|
|
140
140
|
skip: skip,
|
|
@@ -213,8 +213,8 @@ export class StatisticsClient {
|
|
|
213
213
|
const { eventDayDatas } = await gqlFetch<{
|
|
214
214
|
eventDayDatas: EventDayData[];
|
|
215
215
|
}>(this.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(filter), {
|
|
216
|
-
from: filter.from ? filter.from
|
|
217
|
-
to: filter.to ? filter.to
|
|
216
|
+
from: filter.from ? getUnixTimestamp(filter.from) : undefined,
|
|
217
|
+
to: filter.to ? getUnixTimestamp(filter.to) : undefined,
|
|
218
218
|
orderDirection: orderDirection,
|
|
219
219
|
first: first,
|
|
220
220
|
skip: skip,
|
|
@@ -309,8 +309,8 @@ export class StatisticsClient {
|
|
|
309
309
|
const { eventDayDatas } = await gqlFetch<{
|
|
310
310
|
eventDayDatas: EventDayData[];
|
|
311
311
|
}>(this.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(filter), {
|
|
312
|
-
from: filter.from ? filter.from
|
|
313
|
-
to: filter.to ? filter.to
|
|
312
|
+
from: filter.from ? getUnixTimestamp(filter.from) : undefined,
|
|
313
|
+
to: filter.to ? getUnixTimestamp(filter.to) : undefined,
|
|
314
314
|
orderDirection: orderDirection,
|
|
315
315
|
first: first,
|
|
316
316
|
skip: skip,
|
|
@@ -487,8 +487,8 @@ export class StatisticsClient {
|
|
|
487
487
|
const { eventDayDatas } = await gqlFetch<{
|
|
488
488
|
eventDayDatas: EventDayData[];
|
|
489
489
|
}>(this.subgraphUrl, GET_EVENT_DAY_DATA_QUERY(filter), {
|
|
490
|
-
from: filter.from ? filter.from
|
|
491
|
-
to: filter.to ? filter.to
|
|
490
|
+
from: filter.from ? getUnixTimestamp(filter.from) : undefined,
|
|
491
|
+
to: filter.to ? getUnixTimestamp(filter.to) : undefined,
|
|
492
492
|
orderDirection: orderDirection,
|
|
493
493
|
first: first,
|
|
494
494
|
skip: skip,
|
package/src/transaction.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
GET_TRANSACTION_QUERY,
|
|
14
14
|
} from './graphql/queries/transaction';
|
|
15
15
|
import { ITransaction, ITransactionsFilter } from './interfaces';
|
|
16
|
-
import { getSubgraphUrl } from './utils';
|
|
16
|
+
import { getSubgraphUrl, getUnixTimestamp } from './utils';
|
|
17
17
|
|
|
18
18
|
export class TransactionUtils {
|
|
19
19
|
/**
|
|
@@ -132,11 +132,9 @@ export class TransactionUtils {
|
|
|
132
132
|
fromAddress: filter?.fromAddress,
|
|
133
133
|
toAddress: filter?.toAddress,
|
|
134
134
|
startDate: filter?.startDate
|
|
135
|
-
?
|
|
136
|
-
: undefined,
|
|
137
|
-
endDate: filter.endDate
|
|
138
|
-
? Math.floor(filter.endDate.getTime() / 1000)
|
|
135
|
+
? getUnixTimestamp(filter?.startDate)
|
|
139
136
|
: undefined,
|
|
137
|
+
endDate: filter.endDate ? getUnixTimestamp(filter.endDate) : undefined,
|
|
140
138
|
startBlock: filter.startBlock ? filter.startBlock : undefined,
|
|
141
139
|
endBlock: filter.endBlock ? filter.endBlock : undefined,
|
|
142
140
|
orderDirection: orderDirection,
|
package/src/utils.ts
CHANGED
|
@@ -73,3 +73,13 @@ export const getSubgraphUrl = (networkData: NetworkData) => {
|
|
|
73
73
|
|
|
74
74
|
return subgraphUrl;
|
|
75
75
|
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* **Convert a date to Unix timestamp (seconds since epoch).*
|
|
79
|
+
*
|
|
80
|
+
* @param {Date} date
|
|
81
|
+
* @returns {number}
|
|
82
|
+
*/
|
|
83
|
+
export const getUnixTimestamp = (date: Date): number => {
|
|
84
|
+
return Math.floor(date.getTime() / 1000);
|
|
85
|
+
};
|