@sentio/sdk 1.10.0 → 1.10.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.
@@ -118,6 +118,32 @@ function codeGenSentioFile(contract) {
118
118
  return contract
119
119
  }
120
120
  `;
121
+ const eventsImports = Object.values(contract.events).flatMap((events) => {
122
+ if (events.length === 1) {
123
+ return [`${events[0].name}Event`, `${events[0].name}EventFilter`];
124
+ }
125
+ else {
126
+ return events.flatMap((e) => [
127
+ `${(0, typechain_1.getFullSignatureAsSymbolForEvent)(e)}_Event`,
128
+ `${(0, typechain_1.getFullSignatureAsSymbolForEvent)(e)}_EventFilter`,
129
+ ]);
130
+ }
131
+ });
132
+ const structImports = Object.values(contract.structs).flatMap((structs) => {
133
+ return structs.flatMap((s) => {
134
+ if (!s.structName) {
135
+ return [];
136
+ }
137
+ if (s.structName.namespace) {
138
+ return [s.structName.namespace];
139
+ }
140
+ else {
141
+ return [s.structName.identifier];
142
+ }
143
+ });
144
+ });
145
+ // dedup namespace
146
+ const uniqueStructImports = [...new Set(structImports)];
121
147
  const imports = (0, typechain_1.createImportsForUsedIdentifiers)({
122
148
  ethers: ['BigNumber', 'BigNumberish', 'CallOverrides', 'BytesLike'],
123
149
  '@ethersproject/providers': ['Networkish'],
@@ -140,17 +166,7 @@ function codeGenSentioFile(contract) {
140
166
  ],
141
167
  './common': ['PromiseOrValue'],
142
168
  './index': [`${contract.name}`, `${contract.name}__factory`],
143
- [`./${contract.name}`]: [].concat(...Object.values(contract.events).map((events) => {
144
- if (events.length === 1) {
145
- return [`${events[0].name}Event`, `${events[0].name}EventFilter`];
146
- }
147
- else {
148
- return events.flatMap((e) => [
149
- `${(0, typechain_1.getFullSignatureAsSymbolForEvent)(e)}_Event`,
150
- `${(0, typechain_1.getFullSignatureAsSymbolForEvent)(e)}_EventFilter`,
151
- ]);
152
- }
153
- })),
169
+ [`./${contract.name}`]: eventsImports.concat(uniqueStructImports),
154
170
  }, source);
155
171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AAA;KACzD;IAED,OAAO;0BACiB,SAAS,uCAAuC,SAAS;4BACvD,YAAY;;mDAEW,sBAAsB;;;;;;;;;;GAUtE,CAAA;AACH,CAAC"}
@@ -33,15 +33,17 @@ const os_1 = __importDefault(require("os"));
33
33
  describe('Test EVM codegen', () => {
34
34
  const codeGenFolder = fs.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), 'codegen_test'));
35
35
  jest.setTimeout(20000);
36
- test('code gen for anyswapRouter', async () => {
36
+ // TODO make sure code could be compile
37
+ test('code gen for evm', async () => {
38
+ console.log('source code generated to ' + codeGenFolder);
37
39
  await (0, build_1.codeGenEthersProcessor)(path_1.default.join(__dirname, 'abis/evm'), 'lib/target-ethers-sentio', `${codeGenFolder}/internal`);
38
40
  expect(fs.existsSync(codeGenFolder)).toEqual(true);
39
- expect(fs.readdirSync(codeGenFolder).length).toEqual(2);
40
- });
41
- afterAll(() => {
42
- if (fs.existsSync(codeGenFolder)) {
43
- fs.rmSync(codeGenFolder, { recursive: true, force: true });
44
- }
41
+ expect(fs.readdirSync(codeGenFolder).length).toEqual(3);
45
42
  });
43
+ // afterAll(() => {
44
+ // if (fs.existsSync(codeGenFolder)) {
45
+ // fs.rmSync(codeGenFolder, { recursive: true, force: true })
46
+ // }
47
+ // })
46
48
  });
47
49
  //# sourceMappingURL=codegen.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codegen.test.js","sourceRoot":"","sources":["../../src/test/codegen.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAqD;AACrD,gDAAuB;AACvB,uCAAwB;AACxB,4CAAmB;AAEnB,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,aAAa,GAAG,EAAE,CAAC,WAAW,CAAC,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,cAAc,CAAC,CAAC,CAAA;IAE5E,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAEtB,IAAI,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAA,8BAAsB,EAC1B,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAChC,0BAA0B,EAC1B,GAAG,aAAa,WAAW,CAC5B,CAAA;QACD,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAClD,MAAM,CAAC,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACzD,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,GAAG,EAAE;QACZ,IAAI,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;YAChC,EAAE,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;SAC3D;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { codeGenEthersProcessor } from '../cli/build'\nimport path from 'path'\nimport * as fs from 'fs'\nimport os from 'os'\n\ndescribe('Test EVM codegen', () => {\n const codeGenFolder = fs.mkdtempSync(path.join(os.tmpdir(), 'codegen_test'))\n\n jest.setTimeout(20000)\n\n test('code gen for anyswapRouter', async () => {\n await codeGenEthersProcessor(\n path.join(__dirname, 'abis/evm'),\n 'lib/target-ethers-sentio',\n `${codeGenFolder}/internal`\n )\n expect(fs.existsSync(codeGenFolder)).toEqual(true)\n expect(fs.readdirSync(codeGenFolder).length).toEqual(2)\n })\n\n afterAll(() => {\n if (fs.existsSync(codeGenFolder)) {\n fs.rmSync(codeGenFolder, { recursive: true, force: true })\n }\n })\n})\n"]}
1
+ {"version":3,"file":"codegen.test.js","sourceRoot":"","sources":["../../src/test/codegen.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAqD;AACrD,gDAAuB;AACvB,uCAAwB;AACxB,4CAAmB;AAEnB,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,aAAa,GAAG,EAAE,CAAC,WAAW,CAAC,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,MAAM,EAAE,EAAE,cAAc,CAAC,CAAC,CAAA;IAE5E,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAEtB,uCAAuC;IACvC,IAAI,CAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAClC,OAAO,CAAC,GAAG,CAAC,2BAA2B,GAAG,aAAa,CAAC,CAAA;QAExD,MAAM,IAAA,8BAAsB,EAC1B,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAChC,0BAA0B,EAC1B,GAAG,aAAa,WAAW,CAC5B,CAAA;QACD,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QAClD,MAAM,CAAC,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACzD,CAAC,CAAC,CAAA;IAEF,mBAAmB;IACnB,wCAAwC;IACxC,iEAAiE;IACjE,MAAM;IACN,KAAK;AACP,CAAC,CAAC,CAAA","sourcesContent":["import { codeGenEthersProcessor } from '../cli/build'\nimport path from 'path'\nimport * as fs from 'fs'\nimport os from 'os'\n\ndescribe('Test EVM codegen', () => {\n const codeGenFolder = fs.mkdtempSync(path.join(os.tmpdir(), 'codegen_test'))\n\n jest.setTimeout(20000)\n\n // TODO make sure code could be compile\n test('code gen for evm', async () => {\n console.log('source code generated to ' + codeGenFolder)\n\n await codeGenEthersProcessor(\n path.join(__dirname, 'abis/evm'),\n 'lib/target-ethers-sentio',\n `${codeGenFolder}/internal`\n )\n expect(fs.existsSync(codeGenFolder)).toEqual(true)\n expect(fs.readdirSync(codeGenFolder).length).toEqual(3)\n })\n\n // afterAll(() => {\n // if (fs.existsSync(codeGenFolder)) {\n // fs.rmSync(codeGenFolder, { recursive: true, force: true })\n // }\n // })\n})\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentio/sdk",
3
3
  "license": "Apache-2.0",
4
- "version": "1.10.0",
4
+ "version": "1.10.1",
5
5
  "scripts": {
6
6
  "compile_target": "yarn tsc -b src/target-ethers-sentio/tsconfig.json",
7
7
  "compile": "tsc -p . && cp src/cli/webpack.config.js lib/cli",
@@ -125,6 +125,31 @@ export function codeGenSentioFile(contract: Contract): string {
125
125
  return contract
126
126
  }
127
127
  `
128
+ const eventsImports = Object.values(contract.events).flatMap((events) => {
129
+ if (events.length === 1) {
130
+ return [`${events[0].name}Event`, `${events[0].name}EventFilter`]
131
+ } else {
132
+ return events.flatMap((e) => [
133
+ `${getFullSignatureAsSymbolForEvent(e)}_Event`,
134
+ `${getFullSignatureAsSymbolForEvent(e)}_EventFilter`,
135
+ ])
136
+ }
137
+ })
138
+
139
+ const structImports = Object.values(contract.structs).flatMap((structs) => {
140
+ return structs.flatMap((s) => {
141
+ if (!s.structName) {
142
+ return []
143
+ }
144
+ if (s.structName.namespace) {
145
+ return [s.structName.namespace]
146
+ } else {
147
+ return [s.structName.identifier]
148
+ }
149
+ })
150
+ })
151
+ // dedup namespace
152
+ const uniqueStructImports = [...new Set(structImports)]
128
153
 
129
154
  const imports = createImportsForUsedIdentifiers(
130
155
  {
@@ -149,18 +174,7 @@ export function codeGenSentioFile(contract: Contract): string {
149
174
  ],
150
175
  './common': ['PromiseOrValue'],
151
176
  './index': [`${contract.name}`, `${contract.name}__factory`],
152
- [`./${contract.name}`]: (<string[]>[]).concat(
153
- ...Object.values(contract.events).map((events) => {
154
- if (events.length === 1) {
155
- return [`${events[0].name}Event`, `${events[0].name}EventFilter`]
156
- } else {
157
- return events.flatMap((e) => [
158
- `${getFullSignatureAsSymbolForEvent(e)}_Event`,
159
- `${getFullSignatureAsSymbolForEvent(e)}_EventFilter`,
160
- ])
161
- }
162
- })
163
- ),
177
+ [`./${contract.name}`]: eventsImports.concat(uniqueStructImports),
164
178
  },
165
179
  source
166
180
  )
@@ -0,0 +1,1034 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "CommitmentPool",
4
+ "sourceName": "contracts/core/commitment/CommitmentPool.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [],
8
+ "name": "CommitmentHasBeenSubmitted",
9
+ "type": "error"
10
+ },
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "string",
15
+ "name": "param",
16
+ "type": "string"
17
+ }
18
+ ],
19
+ "name": "Duplicated",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [],
24
+ "name": "IndexOutOfBound",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "internalType": "string",
31
+ "name": "param",
32
+ "type": "string"
33
+ }
34
+ ],
35
+ "name": "Invalid",
36
+ "type": "error"
37
+ },
38
+ {
39
+ "inputs": [],
40
+ "name": "NewRootIsDuplicated",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [],
45
+ "name": "NoteHasBeenSpent",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "NumInputsGreaterThanZero",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [],
55
+ "name": "OnlyOperator",
56
+ "type": "error"
57
+ },
58
+ {
59
+ "inputs": [],
60
+ "name": "OnlyWhitelistedRoller",
61
+ "type": "error"
62
+ },
63
+ {
64
+ "inputs": [],
65
+ "name": "OnlyWhitelistedSender",
66
+ "type": "error"
67
+ },
68
+ {
69
+ "inputs": [],
70
+ "name": "OutputNotesLessThanThree",
71
+ "type": "error"
72
+ },
73
+ {
74
+ "inputs": [],
75
+ "name": "RollupFeeToFew",
76
+ "type": "error"
77
+ },
78
+ {
79
+ "inputs": [],
80
+ "name": "RollupSizeNotPowerOfTwo",
81
+ "type": "error"
82
+ },
83
+ {
84
+ "inputs": [],
85
+ "name": "SanctionedAddress",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [],
90
+ "name": "TreeHeightLessThanZero",
91
+ "type": "error"
92
+ },
93
+ {
94
+ "inputs": [],
95
+ "name": "TreeHeightOutOfBounds",
96
+ "type": "error"
97
+ },
98
+ {
99
+ "inputs": [],
100
+ "name": "TreeIsFull",
101
+ "type": "error"
102
+ },
103
+ {
104
+ "inputs": [],
105
+ "name": "VerifierUpdatesHasBeenDisabled",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "anonymous": false,
110
+ "inputs": [
111
+ {
112
+ "indexed": true,
113
+ "internalType": "uint256",
114
+ "name": "commitment",
115
+ "type": "uint256"
116
+ }
117
+ ],
118
+ "name": "CommitmentIncluded",
119
+ "type": "event"
120
+ },
121
+ {
122
+ "anonymous": false,
123
+ "inputs": [
124
+ {
125
+ "indexed": true,
126
+ "internalType": "uint256",
127
+ "name": "commitment",
128
+ "type": "uint256"
129
+ },
130
+ {
131
+ "indexed": false,
132
+ "internalType": "uint256",
133
+ "name": "rollupFee",
134
+ "type": "uint256"
135
+ },
136
+ {
137
+ "indexed": false,
138
+ "internalType": "uint256",
139
+ "name": "leafIndex",
140
+ "type": "uint256"
141
+ },
142
+ {
143
+ "indexed": false,
144
+ "internalType": "bytes",
145
+ "name": "encryptedNote",
146
+ "type": "bytes"
147
+ }
148
+ ],
149
+ "name": "CommitmentQueued",
150
+ "type": "event"
151
+ },
152
+ {
153
+ "anonymous": false,
154
+ "inputs": [
155
+ {
156
+ "indexed": true,
157
+ "internalType": "uint256",
158
+ "name": "rootHash",
159
+ "type": "uint256"
160
+ },
161
+ {
162
+ "indexed": true,
163
+ "internalType": "uint256",
164
+ "name": "serialNumber",
165
+ "type": "uint256"
166
+ }
167
+ ],
168
+ "name": "CommitmentSpent",
169
+ "type": "event"
170
+ },
171
+ {
172
+ "anonymous": false,
173
+ "inputs": [
174
+ {
175
+ "indexed": false,
176
+ "internalType": "bool",
177
+ "name": "state",
178
+ "type": "bool"
179
+ }
180
+ ],
181
+ "name": "RollupWhitelistDisabled",
182
+ "type": "event"
183
+ },
184
+ {
185
+ "anonymous": false,
186
+ "inputs": [
187
+ {
188
+ "indexed": false,
189
+ "internalType": "bool",
190
+ "name": "state",
191
+ "type": "bool"
192
+ }
193
+ ],
194
+ "name": "SanctionsCheckDisabled",
195
+ "type": "event"
196
+ },
197
+ {
198
+ "anonymous": false,
199
+ "inputs": [
200
+ {
201
+ "indexed": false,
202
+ "internalType": "contract ISanctionsList",
203
+ "name": "sanctions",
204
+ "type": "address"
205
+ }
206
+ ],
207
+ "name": "SanctionsList",
208
+ "type": "event"
209
+ },
210
+ {
211
+ "anonymous": false,
212
+ "inputs": [
213
+ {
214
+ "indexed": false,
215
+ "internalType": "bool",
216
+ "name": "state",
217
+ "type": "bool"
218
+ }
219
+ ],
220
+ "name": "VerifierUpdateDisabled",
221
+ "type": "event"
222
+ },
223
+ {
224
+ "inputs": [
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "_fullPath",
228
+ "type": "uint256"
229
+ },
230
+ {
231
+ "internalType": "uint32",
232
+ "name": "_rollupSize",
233
+ "type": "uint32"
234
+ }
235
+ ],
236
+ "name": "_pathIndices",
237
+ "outputs": [
238
+ {
239
+ "internalType": "uint256",
240
+ "name": "",
241
+ "type": "uint256"
242
+ }
243
+ ],
244
+ "stateMutability": "pure",
245
+ "type": "function"
246
+ },
247
+ {
248
+ "inputs": [
249
+ {
250
+ "internalType": "address",
251
+ "name": "_actor",
252
+ "type": "address"
253
+ }
254
+ ],
255
+ "name": "addEnqueueWhitelist",
256
+ "outputs": [],
257
+ "stateMutability": "nonpayable",
258
+ "type": "function"
259
+ },
260
+ {
261
+ "inputs": [
262
+ {
263
+ "internalType": "address",
264
+ "name": "_roller",
265
+ "type": "address"
266
+ }
267
+ ],
268
+ "name": "addRollupWhitelist",
269
+ "outputs": [],
270
+ "stateMutability": "nonpayable",
271
+ "type": "function"
272
+ },
273
+ {
274
+ "inputs": [],
275
+ "name": "assetType",
276
+ "outputs": [
277
+ {
278
+ "internalType": "enum AssetPool.AssetType",
279
+ "name": "",
280
+ "type": "uint8"
281
+ }
282
+ ],
283
+ "stateMutability": "view",
284
+ "type": "function"
285
+ },
286
+ {
287
+ "inputs": [
288
+ {
289
+ "internalType": "bytes8",
290
+ "name": "c__42ae54c0",
291
+ "type": "bytes8"
292
+ }
293
+ ],
294
+ "name": "c_42ae54c0",
295
+ "outputs": [],
296
+ "stateMutability": "pure",
297
+ "type": "function"
298
+ },
299
+ {
300
+ "inputs": [
301
+ {
302
+ "internalType": "bytes8",
303
+ "name": "c__9f3d2211",
304
+ "type": "bytes8"
305
+ }
306
+ ],
307
+ "name": "c_9f3d2211",
308
+ "outputs": [],
309
+ "stateMutability": "pure",
310
+ "type": "function"
311
+ },
312
+ {
313
+ "inputs": [
314
+ {
315
+ "internalType": "bytes8",
316
+ "name": "c__bfaab06f",
317
+ "type": "bytes8"
318
+ }
319
+ ],
320
+ "name": "c_bfaab06f",
321
+ "outputs": [],
322
+ "stateMutability": "pure",
323
+ "type": "function"
324
+ },
325
+ {
326
+ "inputs": [
327
+ {
328
+ "internalType": "bytes8",
329
+ "name": "c__42ae54c0",
330
+ "type": "bytes8"
331
+ }
332
+ ],
333
+ "name": "c_false42ae54c0",
334
+ "outputs": [
335
+ {
336
+ "internalType": "bool",
337
+ "name": "",
338
+ "type": "bool"
339
+ }
340
+ ],
341
+ "stateMutability": "pure",
342
+ "type": "function"
343
+ },
344
+ {
345
+ "inputs": [
346
+ {
347
+ "internalType": "bytes8",
348
+ "name": "c__9f3d2211",
349
+ "type": "bytes8"
350
+ }
351
+ ],
352
+ "name": "c_false9f3d2211",
353
+ "outputs": [
354
+ {
355
+ "internalType": "bool",
356
+ "name": "",
357
+ "type": "bool"
358
+ }
359
+ ],
360
+ "stateMutability": "pure",
361
+ "type": "function"
362
+ },
363
+ {
364
+ "inputs": [
365
+ {
366
+ "internalType": "bytes8",
367
+ "name": "c__bfaab06f",
368
+ "type": "bytes8"
369
+ }
370
+ ],
371
+ "name": "c_falsebfaab06f",
372
+ "outputs": [
373
+ {
374
+ "internalType": "bool",
375
+ "name": "",
376
+ "type": "bool"
377
+ }
378
+ ],
379
+ "stateMutability": "pure",
380
+ "type": "function"
381
+ },
382
+ {
383
+ "inputs": [
384
+ {
385
+ "internalType": "bytes8",
386
+ "name": "c__42ae54c0",
387
+ "type": "bytes8"
388
+ }
389
+ ],
390
+ "name": "c_true42ae54c0",
391
+ "outputs": [
392
+ {
393
+ "internalType": "bool",
394
+ "name": "",
395
+ "type": "bool"
396
+ }
397
+ ],
398
+ "stateMutability": "pure",
399
+ "type": "function"
400
+ },
401
+ {
402
+ "inputs": [
403
+ {
404
+ "internalType": "bytes8",
405
+ "name": "c__9f3d2211",
406
+ "type": "bytes8"
407
+ }
408
+ ],
409
+ "name": "c_true9f3d2211",
410
+ "outputs": [
411
+ {
412
+ "internalType": "bool",
413
+ "name": "",
414
+ "type": "bool"
415
+ }
416
+ ],
417
+ "stateMutability": "pure",
418
+ "type": "function"
419
+ },
420
+ {
421
+ "inputs": [
422
+ {
423
+ "internalType": "bytes8",
424
+ "name": "c__bfaab06f",
425
+ "type": "bytes8"
426
+ }
427
+ ],
428
+ "name": "c_truebfaab06f",
429
+ "outputs": [
430
+ {
431
+ "internalType": "bool",
432
+ "name": "",
433
+ "type": "bool"
434
+ }
435
+ ],
436
+ "stateMutability": "pure",
437
+ "type": "function"
438
+ },
439
+ {
440
+ "inputs": [
441
+ {
442
+ "internalType": "address",
443
+ "name": "_newOperator",
444
+ "type": "address"
445
+ }
446
+ ],
447
+ "name": "changeOperator",
448
+ "outputs": [],
449
+ "stateMutability": "nonpayable",
450
+ "type": "function"
451
+ },
452
+ {
453
+ "inputs": [
454
+ {
455
+ "internalType": "uint32",
456
+ "name": "_rollupSize",
457
+ "type": "uint32"
458
+ }
459
+ ],
460
+ "name": "disableRollupVerifier",
461
+ "outputs": [],
462
+ "stateMutability": "nonpayable",
463
+ "type": "function"
464
+ },
465
+ {
466
+ "inputs": [
467
+ {
468
+ "internalType": "uint32",
469
+ "name": "_numInputs",
470
+ "type": "uint32"
471
+ },
472
+ {
473
+ "internalType": "uint32",
474
+ "name": "_numOutputs",
475
+ "type": "uint32"
476
+ }
477
+ ],
478
+ "name": "disableTransactVerifier",
479
+ "outputs": [],
480
+ "stateMutability": "nonpayable",
481
+ "type": "function"
482
+ },
483
+ {
484
+ "inputs": [
485
+ {
486
+ "internalType": "uint32",
487
+ "name": "_rollupSize",
488
+ "type": "uint32"
489
+ },
490
+ {
491
+ "internalType": "contract IVerifier",
492
+ "name": "_rollupVerifier",
493
+ "type": "address"
494
+ }
495
+ ],
496
+ "name": "enableRollupVerifier",
497
+ "outputs": [],
498
+ "stateMutability": "nonpayable",
499
+ "type": "function"
500
+ },
501
+ {
502
+ "inputs": [
503
+ {
504
+ "internalType": "uint32",
505
+ "name": "_numInputs",
506
+ "type": "uint32"
507
+ },
508
+ {
509
+ "internalType": "uint32",
510
+ "name": "_numOutputs",
511
+ "type": "uint32"
512
+ },
513
+ {
514
+ "internalType": "contract IVerifier",
515
+ "name": "_transactVerifier",
516
+ "type": "address"
517
+ }
518
+ ],
519
+ "name": "enableTransactVerifier",
520
+ "outputs": [],
521
+ "stateMutability": "nonpayable",
522
+ "type": "function"
523
+ },
524
+ {
525
+ "inputs": [
526
+ {
527
+ "components": [
528
+ {
529
+ "internalType": "uint256",
530
+ "name": "amount",
531
+ "type": "uint256"
532
+ },
533
+ {
534
+ "internalType": "uint256",
535
+ "name": "commitment",
536
+ "type": "uint256"
537
+ },
538
+ {
539
+ "internalType": "uint256",
540
+ "name": "executorFee",
541
+ "type": "uint256"
542
+ },
543
+ {
544
+ "internalType": "uint256",
545
+ "name": "rollupFee",
546
+ "type": "uint256"
547
+ },
548
+ {
549
+ "internalType": "bytes",
550
+ "name": "encryptedNote",
551
+ "type": "bytes"
552
+ }
553
+ ],
554
+ "internalType": "struct ICommitmentPool.CommitmentRequest",
555
+ "name": "_request",
556
+ "type": "tuple"
557
+ },
558
+ {
559
+ "internalType": "address",
560
+ "name": "_executor",
561
+ "type": "address"
562
+ }
563
+ ],
564
+ "name": "enqueue",
565
+ "outputs": [],
566
+ "stateMutability": "nonpayable",
567
+ "type": "function"
568
+ },
569
+ {
570
+ "inputs": [],
571
+ "name": "getCommitmentIncludedCount",
572
+ "outputs": [
573
+ {
574
+ "internalType": "uint256",
575
+ "name": "",
576
+ "type": "uint256"
577
+ }
578
+ ],
579
+ "stateMutability": "view",
580
+ "type": "function"
581
+ },
582
+ {
583
+ "inputs": [],
584
+ "name": "getMinRollupFee",
585
+ "outputs": [
586
+ {
587
+ "internalType": "uint256",
588
+ "name": "",
589
+ "type": "uint256"
590
+ }
591
+ ],
592
+ "stateMutability": "view",
593
+ "type": "function"
594
+ },
595
+ {
596
+ "inputs": [],
597
+ "name": "getTreeCapacity",
598
+ "outputs": [
599
+ {
600
+ "internalType": "uint256",
601
+ "name": "",
602
+ "type": "uint256"
603
+ }
604
+ ],
605
+ "stateMutability": "view",
606
+ "type": "function"
607
+ },
608
+ {
609
+ "inputs": [
610
+ {
611
+ "internalType": "uint256",
612
+ "name": "_commitment",
613
+ "type": "uint256"
614
+ }
615
+ ],
616
+ "name": "isHistoricCommitment",
617
+ "outputs": [
618
+ {
619
+ "internalType": "bool",
620
+ "name": "",
621
+ "type": "bool"
622
+ }
623
+ ],
624
+ "stateMutability": "view",
625
+ "type": "function"
626
+ },
627
+ {
628
+ "inputs": [
629
+ {
630
+ "internalType": "uint256",
631
+ "name": "root",
632
+ "type": "uint256"
633
+ }
634
+ ],
635
+ "name": "isKnownRoot",
636
+ "outputs": [
637
+ {
638
+ "internalType": "bool",
639
+ "name": "",
640
+ "type": "bool"
641
+ }
642
+ ],
643
+ "stateMutability": "view",
644
+ "type": "function"
645
+ },
646
+ {
647
+ "inputs": [],
648
+ "name": "isRollupWhitelistDisabled",
649
+ "outputs": [
650
+ {
651
+ "internalType": "bool",
652
+ "name": "",
653
+ "type": "bool"
654
+ }
655
+ ],
656
+ "stateMutability": "view",
657
+ "type": "function"
658
+ },
659
+ {
660
+ "inputs": [
661
+ {
662
+ "internalType": "uint256",
663
+ "name": "_serialNumber",
664
+ "type": "uint256"
665
+ }
666
+ ],
667
+ "name": "isSpentSerialNumber",
668
+ "outputs": [
669
+ {
670
+ "internalType": "bool",
671
+ "name": "",
672
+ "type": "bool"
673
+ }
674
+ ],
675
+ "stateMutability": "view",
676
+ "type": "function"
677
+ },
678
+ {
679
+ "inputs": [],
680
+ "name": "isVerifierUpdateDisabled",
681
+ "outputs": [
682
+ {
683
+ "internalType": "bool",
684
+ "name": "",
685
+ "type": "bool"
686
+ }
687
+ ],
688
+ "stateMutability": "view",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "inputs": [
693
+ {
694
+ "internalType": "address",
695
+ "name": "_actor",
696
+ "type": "address"
697
+ }
698
+ ],
699
+ "name": "removeEnqueueWhitelist",
700
+ "outputs": [],
701
+ "stateMutability": "nonpayable",
702
+ "type": "function"
703
+ },
704
+ {
705
+ "inputs": [
706
+ {
707
+ "internalType": "address",
708
+ "name": "_roller",
709
+ "type": "address"
710
+ }
711
+ ],
712
+ "name": "removeRollupWhitelist",
713
+ "outputs": [],
714
+ "stateMutability": "nonpayable",
715
+ "type": "function"
716
+ },
717
+ {
718
+ "inputs": [
719
+ {
720
+ "components": [
721
+ {
722
+ "components": [
723
+ {
724
+ "components": [
725
+ {
726
+ "internalType": "uint256",
727
+ "name": "X",
728
+ "type": "uint256"
729
+ },
730
+ {
731
+ "internalType": "uint256",
732
+ "name": "Y",
733
+ "type": "uint256"
734
+ }
735
+ ],
736
+ "internalType": "struct IVerifier.G1Point",
737
+ "name": "a",
738
+ "type": "tuple"
739
+ },
740
+ {
741
+ "components": [
742
+ {
743
+ "internalType": "uint256[2]",
744
+ "name": "X",
745
+ "type": "uint256[2]"
746
+ },
747
+ {
748
+ "internalType": "uint256[2]",
749
+ "name": "Y",
750
+ "type": "uint256[2]"
751
+ }
752
+ ],
753
+ "internalType": "struct IVerifier.G2Point",
754
+ "name": "b",
755
+ "type": "tuple"
756
+ },
757
+ {
758
+ "components": [
759
+ {
760
+ "internalType": "uint256",
761
+ "name": "X",
762
+ "type": "uint256"
763
+ },
764
+ {
765
+ "internalType": "uint256",
766
+ "name": "Y",
767
+ "type": "uint256"
768
+ }
769
+ ],
770
+ "internalType": "struct IVerifier.G1Point",
771
+ "name": "c",
772
+ "type": "tuple"
773
+ }
774
+ ],
775
+ "internalType": "struct IVerifier.Proof",
776
+ "name": "proof",
777
+ "type": "tuple"
778
+ },
779
+ {
780
+ "internalType": "uint32",
781
+ "name": "rollupSize",
782
+ "type": "uint32"
783
+ },
784
+ {
785
+ "internalType": "uint256",
786
+ "name": "newRoot",
787
+ "type": "uint256"
788
+ },
789
+ {
790
+ "internalType": "uint256",
791
+ "name": "leafHash",
792
+ "type": "uint256"
793
+ }
794
+ ],
795
+ "internalType": "struct ICommitmentPool.RollupRequest",
796
+ "name": "_request",
797
+ "type": "tuple"
798
+ }
799
+ ],
800
+ "name": "rollup",
801
+ "outputs": [],
802
+ "stateMutability": "nonpayable",
803
+ "type": "function"
804
+ },
805
+ {
806
+ "inputs": [],
807
+ "name": "sanctionsCheckDisabled",
808
+ "outputs": [
809
+ {
810
+ "internalType": "bool",
811
+ "name": "",
812
+ "type": "bool"
813
+ }
814
+ ],
815
+ "stateMutability": "view",
816
+ "type": "function"
817
+ },
818
+ {
819
+ "inputs": [],
820
+ "name": "sanctionsList",
821
+ "outputs": [
822
+ {
823
+ "internalType": "contract ISanctionsList",
824
+ "name": "",
825
+ "type": "address"
826
+ }
827
+ ],
828
+ "stateMutability": "view",
829
+ "type": "function"
830
+ },
831
+ {
832
+ "inputs": [
833
+ {
834
+ "internalType": "uint256",
835
+ "name": "_minRollupFee",
836
+ "type": "uint256"
837
+ }
838
+ ],
839
+ "name": "setMinRollupFee",
840
+ "outputs": [],
841
+ "stateMutability": "nonpayable",
842
+ "type": "function"
843
+ },
844
+ {
845
+ "inputs": [
846
+ {
847
+ "internalType": "bool",
848
+ "name": "_state",
849
+ "type": "bool"
850
+ }
851
+ ],
852
+ "name": "setRollupWhitelistDisabled",
853
+ "outputs": [],
854
+ "stateMutability": "nonpayable",
855
+ "type": "function"
856
+ },
857
+ {
858
+ "inputs": [
859
+ {
860
+ "internalType": "bool",
861
+ "name": "_state",
862
+ "type": "bool"
863
+ }
864
+ ],
865
+ "name": "setSanctionCheckDisabled",
866
+ "outputs": [],
867
+ "stateMutability": "nonpayable",
868
+ "type": "function"
869
+ },
870
+ {
871
+ "inputs": [
872
+ {
873
+ "internalType": "bool",
874
+ "name": "_state",
875
+ "type": "bool"
876
+ }
877
+ ],
878
+ "name": "setVerifierUpdateDisabled",
879
+ "outputs": [],
880
+ "stateMutability": "nonpayable",
881
+ "type": "function"
882
+ },
883
+ {
884
+ "inputs": [
885
+ {
886
+ "components": [
887
+ {
888
+ "components": [
889
+ {
890
+ "components": [
891
+ {
892
+ "internalType": "uint256",
893
+ "name": "X",
894
+ "type": "uint256"
895
+ },
896
+ {
897
+ "internalType": "uint256",
898
+ "name": "Y",
899
+ "type": "uint256"
900
+ }
901
+ ],
902
+ "internalType": "struct IVerifier.G1Point",
903
+ "name": "a",
904
+ "type": "tuple"
905
+ },
906
+ {
907
+ "components": [
908
+ {
909
+ "internalType": "uint256[2]",
910
+ "name": "X",
911
+ "type": "uint256[2]"
912
+ },
913
+ {
914
+ "internalType": "uint256[2]",
915
+ "name": "Y",
916
+ "type": "uint256[2]"
917
+ }
918
+ ],
919
+ "internalType": "struct IVerifier.G2Point",
920
+ "name": "b",
921
+ "type": "tuple"
922
+ },
923
+ {
924
+ "components": [
925
+ {
926
+ "internalType": "uint256",
927
+ "name": "X",
928
+ "type": "uint256"
929
+ },
930
+ {
931
+ "internalType": "uint256",
932
+ "name": "Y",
933
+ "type": "uint256"
934
+ }
935
+ ],
936
+ "internalType": "struct IVerifier.G1Point",
937
+ "name": "c",
938
+ "type": "tuple"
939
+ }
940
+ ],
941
+ "internalType": "struct IVerifier.Proof",
942
+ "name": "proof",
943
+ "type": "tuple"
944
+ },
945
+ {
946
+ "internalType": "uint256",
947
+ "name": "rootHash",
948
+ "type": "uint256"
949
+ },
950
+ {
951
+ "internalType": "uint256[]",
952
+ "name": "serialNumbers",
953
+ "type": "uint256[]"
954
+ },
955
+ {
956
+ "internalType": "uint256[]",
957
+ "name": "sigHashes",
958
+ "type": "uint256[]"
959
+ },
960
+ {
961
+ "internalType": "bytes32",
962
+ "name": "sigPk",
963
+ "type": "bytes32"
964
+ },
965
+ {
966
+ "internalType": "uint256",
967
+ "name": "publicAmount",
968
+ "type": "uint256"
969
+ },
970
+ {
971
+ "internalType": "uint256",
972
+ "name": "relayerFeeAmount",
973
+ "type": "uint256"
974
+ },
975
+ {
976
+ "internalType": "uint256[]",
977
+ "name": "outCommitments",
978
+ "type": "uint256[]"
979
+ },
980
+ {
981
+ "internalType": "uint256[]",
982
+ "name": "outRollupFees",
983
+ "type": "uint256[]"
984
+ },
985
+ {
986
+ "internalType": "address",
987
+ "name": "publicRecipient",
988
+ "type": "address"
989
+ },
990
+ {
991
+ "internalType": "address",
992
+ "name": "relayerAddress",
993
+ "type": "address"
994
+ },
995
+ {
996
+ "internalType": "bytes[]",
997
+ "name": "outEncryptedNotes",
998
+ "type": "bytes[]"
999
+ }
1000
+ ],
1001
+ "internalType": "struct ICommitmentPool.TransactRequest",
1002
+ "name": "_request",
1003
+ "type": "tuple"
1004
+ },
1005
+ {
1006
+ "internalType": "bytes",
1007
+ "name": "_signature",
1008
+ "type": "bytes"
1009
+ }
1010
+ ],
1011
+ "name": "transact",
1012
+ "outputs": [],
1013
+ "stateMutability": "nonpayable",
1014
+ "type": "function"
1015
+ },
1016
+ {
1017
+ "inputs": [
1018
+ {
1019
+ "internalType": "contract ISanctionsList",
1020
+ "name": "_sanction",
1021
+ "type": "address"
1022
+ }
1023
+ ],
1024
+ "name": "updateSanctionsListAddress",
1025
+ "outputs": [],
1026
+ "stateMutability": "nonpayable",
1027
+ "type": "function"
1028
+ }
1029
+ ],
1030
+ "bytecode": "0x",
1031
+ "deployedBytecode": "0x",
1032
+ "linkReferences": {},
1033
+ "deployedLinkReferences": {}
1034
+ }
@@ -8,19 +8,22 @@ describe('Test EVM codegen', () => {
8
8
 
9
9
  jest.setTimeout(20000)
10
10
 
11
- test('code gen for anyswapRouter', async () => {
11
+ // TODO make sure code could be compile
12
+ test('code gen for evm', async () => {
13
+ console.log('source code generated to ' + codeGenFolder)
14
+
12
15
  await codeGenEthersProcessor(
13
16
  path.join(__dirname, 'abis/evm'),
14
17
  'lib/target-ethers-sentio',
15
18
  `${codeGenFolder}/internal`
16
19
  )
17
20
  expect(fs.existsSync(codeGenFolder)).toEqual(true)
18
- expect(fs.readdirSync(codeGenFolder).length).toEqual(2)
21
+ expect(fs.readdirSync(codeGenFolder).length).toEqual(3)
19
22
  })
20
23
 
21
- afterAll(() => {
22
- if (fs.existsSync(codeGenFolder)) {
23
- fs.rmSync(codeGenFolder, { recursive: true, force: true })
24
- }
25
- })
24
+ // afterAll(() => {
25
+ // if (fs.existsSync(codeGenFolder)) {
26
+ // fs.rmSync(codeGenFolder, { recursive: true, force: true })
27
+ // }
28
+ // })
26
29
  })