@sentio/sdk 2.40.0-rc.16 → 2.40.0-rc.18
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/lib/eth/account-processor.d.ts +21 -7
- package/lib/eth/account-processor.d.ts.map +1 -1
- package/lib/eth/account-processor.js +2 -2
- package/lib/eth/account-processor.js.map +1 -1
- package/lib/eth/base-processor-template.d.ts +24 -8
- package/lib/eth/base-processor-template.d.ts.map +1 -1
- package/lib/eth/base-processor-template.js.map +1 -1
- package/lib/eth/base-processor.d.ts +30 -10
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.js +6 -6
- package/lib/eth/base-processor.js.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts +24 -8
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +23 -23
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.d.ts +24 -8
- package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js +8 -8
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.d.ts +18 -6
- package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js +18 -18
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts +12 -4
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js +9 -9
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.d.ts +18 -6
- package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js +14 -14
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.d.ts +24 -8
- package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js +11 -11
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/event-handler.js +1 -1
- package/lib/eth/codegen/function-calls.js +1 -1
- package/lib/eth/codegen/function-calls.js.map +1 -1
- package/lib/eth/eth-plugin.d.ts +27 -9
- package/lib/eth/eth-plugin.d.ts.map +1 -1
- package/lib/eth/eth-plugin.js +13 -13
- package/lib/eth/eth-plugin.js.map +1 -1
- package/package.json +3 -3
- package/src/eth/account-processor.ts +28 -12
- package/src/eth/base-processor-template.ts +16 -8
- package/src/eth/base-processor.ts +25 -16
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +59 -31
- package/src/eth/builtin/internal/erc1155-processor.ts +65 -37
- package/src/eth/builtin/internal/erc20-processor.ts +66 -40
- package/src/eth/builtin/internal/erc20bytes-processor.ts +24 -13
- package/src/eth/builtin/internal/erc721-processor.ts +65 -38
- package/src/eth/builtin/internal/weth9-processor.ts +34 -19
- package/src/eth/codegen/event-handler.ts +1 -1
- package/src/eth/codegen/function-calls.ts +3 -3
- package/src/eth/eth-plugin.ts +27 -22
@@ -151,8 +151,8 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
151
151
|
const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
|
152
152
|
return result.length == 1 ? result[0] : result;
|
153
153
|
}
|
154
|
+
console.log("missing eth call key:", "balanceOf", account, id, key);
|
154
155
|
}
|
155
|
-
console.debug("missing eth call:", "balanceOf", account, id);
|
156
156
|
return await this.contract.getFunction("balanceOf(address,uint256)")(
|
157
157
|
account,
|
158
158
|
id,
|
@@ -193,8 +193,14 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
193
193
|
.toArray();
|
194
194
|
return result.length == 1 ? result[0] : result;
|
195
195
|
}
|
196
|
+
console.log(
|
197
|
+
"missing eth call key:",
|
198
|
+
"balanceOfBatch",
|
199
|
+
accounts,
|
200
|
+
ids,
|
201
|
+
key
|
202
|
+
);
|
196
203
|
}
|
197
|
-
console.debug("missing eth call:", "balanceOfBatch", accounts, ids);
|
198
204
|
return await this.contract.getFunction(
|
199
205
|
"balanceOfBatch(address[],uint256[])"
|
200
206
|
)(accounts, ids, overrides || {});
|
@@ -233,8 +239,14 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
233
239
|
.toArray();
|
234
240
|
return result.length == 1 ? result[0] : result;
|
235
241
|
}
|
242
|
+
console.log(
|
243
|
+
"missing eth call key:",
|
244
|
+
"isApprovedForAll",
|
245
|
+
account,
|
246
|
+
operator,
|
247
|
+
key
|
248
|
+
);
|
236
249
|
}
|
237
|
-
console.debug("missing eth call:", "isApprovedForAll", account, operator);
|
238
250
|
return await this.contract.getFunction(
|
239
251
|
"isApprovedForAll(address,address)"
|
240
252
|
)(account, operator, overrides || {});
|
@@ -271,8 +283,13 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
271
283
|
.toArray();
|
272
284
|
return result.length == 1 ? result[0] : result;
|
273
285
|
}
|
286
|
+
console.log(
|
287
|
+
"missing eth call key:",
|
288
|
+
"supportsInterface",
|
289
|
+
interfaceId,
|
290
|
+
key
|
291
|
+
);
|
274
292
|
}
|
275
|
-
console.debug("missing eth call:", "supportsInterface", interfaceId);
|
276
293
|
return await this.contract.getFunction("supportsInterface(bytes4)")(
|
277
294
|
interfaceId,
|
278
295
|
overrides || {}
|
@@ -306,8 +323,8 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
306
323
|
const result = iface.decodeFunctionResult("uri", ret).toArray();
|
307
324
|
return result.length == 1 ? result[0] : result;
|
308
325
|
}
|
326
|
+
console.log("missing eth call key:", "uri", id, key);
|
309
327
|
}
|
310
|
-
console.debug("missing eth call:", "uri", id);
|
311
328
|
return await this.contract.getFunction("uri(uint256)")(
|
312
329
|
id,
|
313
330
|
overrides || {}
|
@@ -356,16 +373,17 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
356
373
|
.toArray();
|
357
374
|
return result.length == 1 ? result[0] : result;
|
358
375
|
}
|
376
|
+
console.log(
|
377
|
+
"missing eth call key:",
|
378
|
+
"safeBatchTransferFrom",
|
379
|
+
from,
|
380
|
+
to,
|
381
|
+
ids,
|
382
|
+
amounts,
|
383
|
+
data,
|
384
|
+
key
|
385
|
+
);
|
359
386
|
}
|
360
|
-
console.debug(
|
361
|
-
"missing eth call:",
|
362
|
-
"safeBatchTransferFrom",
|
363
|
-
from,
|
364
|
-
to,
|
365
|
-
ids,
|
366
|
-
amounts,
|
367
|
-
data
|
368
|
-
);
|
369
387
|
return await this.contract
|
370
388
|
.getFunction(
|
371
389
|
"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"
|
@@ -411,16 +429,17 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
411
429
|
.toArray();
|
412
430
|
return result.length == 1 ? result[0] : result;
|
413
431
|
}
|
432
|
+
console.log(
|
433
|
+
"missing eth call key:",
|
434
|
+
"safeTransferFrom",
|
435
|
+
from,
|
436
|
+
to,
|
437
|
+
id,
|
438
|
+
amount,
|
439
|
+
data,
|
440
|
+
key
|
441
|
+
);
|
414
442
|
}
|
415
|
-
console.debug(
|
416
|
-
"missing eth call:",
|
417
|
-
"safeTransferFrom",
|
418
|
-
from,
|
419
|
-
to,
|
420
|
-
id,
|
421
|
-
amount,
|
422
|
-
data
|
423
|
-
);
|
424
443
|
return await this.contract
|
425
444
|
.getFunction(
|
426
445
|
"safeTransferFrom(address,address,uint256,uint256,bytes)"
|
@@ -460,13 +479,14 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
|
|
460
479
|
.toArray();
|
461
480
|
return result.length == 1 ? result[0] : result;
|
462
481
|
}
|
482
|
+
console.log(
|
483
|
+
"missing eth call key:",
|
484
|
+
"setApprovalForAll",
|
485
|
+
operator,
|
486
|
+
approved,
|
487
|
+
key
|
488
|
+
);
|
463
489
|
}
|
464
|
-
console.debug(
|
465
|
-
"missing eth call:",
|
466
|
-
"setApprovalForAll",
|
467
|
-
operator,
|
468
|
-
approved
|
469
|
-
);
|
470
490
|
return await this.contract
|
471
491
|
.getFunction("setApprovalForAll(address,bool)")
|
472
492
|
.staticCall(operator, approved, overrides || {});
|
@@ -1034,7 +1054,8 @@ export class ERC1155Processor extends BaseProcessor<
|
|
1034
1054
|
fetchConfig?: Partial<EthFetchConfig>,
|
1035
1055
|
preprocessHandler?: (
|
1036
1056
|
event: ApprovalForAllEvent,
|
1037
|
-
ctx: ERC1155Context
|
1057
|
+
ctx: ERC1155Context,
|
1058
|
+
preprocessStore: { [k: string]: any }
|
1038
1059
|
) => Promise<PreprocessResult>
|
1039
1060
|
): this {
|
1040
1061
|
if (!filter) {
|
@@ -1053,7 +1074,8 @@ export class ERC1155Processor extends BaseProcessor<
|
|
1053
1074
|
fetchConfig?: Partial<EthFetchConfig>,
|
1054
1075
|
preprocessHandler?: (
|
1055
1076
|
event: TransferBatchEvent,
|
1056
|
-
ctx: ERC1155Context
|
1077
|
+
ctx: ERC1155Context,
|
1078
|
+
preprocessStore: { [k: string]: any }
|
1057
1079
|
) => Promise<PreprocessResult>
|
1058
1080
|
): this {
|
1059
1081
|
if (!filter) {
|
@@ -1070,7 +1092,8 @@ export class ERC1155Processor extends BaseProcessor<
|
|
1070
1092
|
fetchConfig?: Partial<EthFetchConfig>,
|
1071
1093
|
preprocessHandler?: (
|
1072
1094
|
event: TransferSingleEvent,
|
1073
|
-
ctx: ERC1155Context
|
1095
|
+
ctx: ERC1155Context,
|
1096
|
+
preprocessStore: { [k: string]: any }
|
1074
1097
|
) => Promise<PreprocessResult>
|
1075
1098
|
): this {
|
1076
1099
|
if (!filter) {
|
@@ -1087,7 +1110,8 @@ export class ERC1155Processor extends BaseProcessor<
|
|
1087
1110
|
fetchConfig?: Partial<EthFetchConfig>,
|
1088
1111
|
preprocessHandler?: (
|
1089
1112
|
event: URIEvent,
|
1090
|
-
ctx: ERC1155Context
|
1113
|
+
ctx: ERC1155Context,
|
1114
|
+
preprocessStore: { [k: string]: any }
|
1091
1115
|
) => Promise<PreprocessResult>
|
1092
1116
|
): this {
|
1093
1117
|
if (!filter) {
|
@@ -1306,7 +1330,8 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1306
1330
|
fetchConfig?: Partial<EthFetchConfig>,
|
1307
1331
|
preprocessHandler?: (
|
1308
1332
|
event: ApprovalForAllEvent,
|
1309
|
-
ctx: ERC1155Context
|
1333
|
+
ctx: ERC1155Context,
|
1334
|
+
preprocessStore: { [k: string]: any }
|
1310
1335
|
) => Promise<PreprocessResult>
|
1311
1336
|
): this {
|
1312
1337
|
if (!filter) {
|
@@ -1325,7 +1350,8 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1325
1350
|
fetchConfig?: Partial<EthFetchConfig>,
|
1326
1351
|
preprocessHandler?: (
|
1327
1352
|
event: TransferBatchEvent,
|
1328
|
-
ctx: ERC1155Context
|
1353
|
+
ctx: ERC1155Context,
|
1354
|
+
preprocessStore: { [k: string]: any }
|
1329
1355
|
) => Promise<PreprocessResult>
|
1330
1356
|
): this {
|
1331
1357
|
if (!filter) {
|
@@ -1342,7 +1368,8 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1342
1368
|
fetchConfig?: Partial<EthFetchConfig>,
|
1343
1369
|
preprocessHandler?: (
|
1344
1370
|
event: TransferSingleEvent,
|
1345
|
-
ctx: ERC1155Context
|
1371
|
+
ctx: ERC1155Context,
|
1372
|
+
preprocessStore: { [k: string]: any }
|
1346
1373
|
) => Promise<PreprocessResult>
|
1347
1374
|
): this {
|
1348
1375
|
if (!filter) {
|
@@ -1359,7 +1386,8 @@ export class ERC1155ProcessorTemplate extends BaseProcessorTemplate<
|
|
1359
1386
|
fetchConfig?: Partial<EthFetchConfig>,
|
1360
1387
|
preprocessHandler?: (
|
1361
1388
|
event: URIEvent,
|
1362
|
-
ctx: ERC1155Context
|
1389
|
+
ctx: ERC1155Context,
|
1390
|
+
preprocessStore: { [k: string]: any }
|
1363
1391
|
) => Promise<PreprocessResult>
|
1364
1392
|
): this {
|
1365
1393
|
if (!filter) {
|
@@ -200,8 +200,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
200
200
|
const result = iface.decodeFunctionResult("allowance", ret).toArray();
|
201
201
|
return result.length == 1 ? result[0] : result;
|
202
202
|
}
|
203
|
+
console.log("missing eth call key:", "allowance", owner, spender, key);
|
203
204
|
}
|
204
|
-
console.debug("missing eth call:", "allowance", owner, spender);
|
205
205
|
return await this.contract.getFunction("allowance(address,address)")(
|
206
206
|
owner,
|
207
207
|
spender,
|
@@ -236,8 +236,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
236
236
|
const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
|
237
237
|
return result.length == 1 ? result[0] : result;
|
238
238
|
}
|
239
|
+
console.log("missing eth call key:", "balanceOf", account, key);
|
239
240
|
}
|
240
|
-
console.debug("missing eth call:", "balanceOf", account);
|
241
241
|
return await this.contract.getFunction("balanceOf(address)")(
|
242
242
|
account,
|
243
243
|
overrides || {}
|
@@ -270,8 +270,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
270
270
|
const result = iface.decodeFunctionResult("decimals", ret).toArray();
|
271
271
|
return result.length == 1 ? result[0] : result;
|
272
272
|
}
|
273
|
+
console.log("missing eth call key:", "decimals", key);
|
273
274
|
}
|
274
|
-
console.debug("missing eth call:", "decimals");
|
275
275
|
return await this.contract.getFunction("decimals()")(overrides || {});
|
276
276
|
} catch (e) {
|
277
277
|
const stack = new Error().stack;
|
@@ -301,8 +301,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
301
301
|
const result = iface.decodeFunctionResult("locker", ret).toArray();
|
302
302
|
return result.length == 1 ? result[0] : result;
|
303
303
|
}
|
304
|
+
console.log("missing eth call key:", "locker", key);
|
304
305
|
}
|
305
|
-
console.debug("missing eth call:", "locker");
|
306
306
|
return await this.contract.getFunction("locker()")(overrides || {});
|
307
307
|
} catch (e) {
|
308
308
|
const stack = new Error().stack;
|
@@ -330,8 +330,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
330
330
|
const result = iface.decodeFunctionResult("name", ret).toArray();
|
331
331
|
return result.length == 1 ? result[0] : result;
|
332
332
|
}
|
333
|
+
console.log("missing eth call key:", "name", key);
|
333
334
|
}
|
334
|
-
console.debug("missing eth call:", "name");
|
335
335
|
return await this.contract.getFunction("name()")(overrides || {});
|
336
336
|
} catch (e) {
|
337
337
|
const stack = new Error().stack;
|
@@ -361,8 +361,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
361
361
|
const result = iface.decodeFunctionResult("owner", ret).toArray();
|
362
362
|
return result.length == 1 ? result[0] : result;
|
363
363
|
}
|
364
|
+
console.log("missing eth call key:", "owner", key);
|
364
365
|
}
|
365
|
-
console.debug("missing eth call:", "owner");
|
366
366
|
return await this.contract.getFunction("owner()")(overrides || {});
|
367
367
|
} catch (e) {
|
368
368
|
const stack = new Error().stack;
|
@@ -392,8 +392,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
392
392
|
const result = iface.decodeFunctionResult("symbol", ret).toArray();
|
393
393
|
return result.length == 1 ? result[0] : result;
|
394
394
|
}
|
395
|
+
console.log("missing eth call key:", "symbol", key);
|
395
396
|
}
|
396
|
-
console.debug("missing eth call:", "symbol");
|
397
397
|
return await this.contract.getFunction("symbol()")(overrides || {});
|
398
398
|
} catch (e) {
|
399
399
|
const stack = new Error().stack;
|
@@ -425,8 +425,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
425
425
|
.toArray();
|
426
426
|
return result.length == 1 ? result[0] : result;
|
427
427
|
}
|
428
|
+
console.log("missing eth call key:", "totalSupply", key);
|
428
429
|
}
|
429
|
-
console.debug("missing eth call:", "totalSupply");
|
430
430
|
return await this.contract.getFunction("totalSupply()")(overrides || {});
|
431
431
|
} catch (e) {
|
432
432
|
const stack = new Error().stack;
|
@@ -464,8 +464,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
464
464
|
const result = iface.decodeFunctionResult("approve", ret).toArray();
|
465
465
|
return result.length == 1 ? result[0] : result;
|
466
466
|
}
|
467
|
+
console.log("missing eth call key:", "approve", spender, amount, key);
|
467
468
|
}
|
468
|
-
console.debug("missing eth call:", "approve", spender, amount);
|
469
469
|
return await this.contract
|
470
470
|
.getFunction("approve(address,uint256)")
|
471
471
|
.staticCall(spender, amount, overrides || {});
|
@@ -497,8 +497,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
497
497
|
const result = iface.decodeFunctionResult("burn", ret).toArray();
|
498
498
|
return result.length == 1 ? result[0] : result;
|
499
499
|
}
|
500
|
+
console.log("missing eth call key:", "burn", amount, key);
|
500
501
|
}
|
501
|
-
console.debug("missing eth call:", "burn", amount);
|
502
502
|
return await this.contract
|
503
503
|
.getFunction("burn(uint256)")
|
504
504
|
.staticCall(amount, overrides || {});
|
@@ -536,8 +536,14 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
536
536
|
.toArray();
|
537
537
|
return result.length == 1 ? result[0] : result;
|
538
538
|
}
|
539
|
+
console.log(
|
540
|
+
"missing eth call key:",
|
541
|
+
"burnFrom",
|
542
|
+
account,
|
543
|
+
amount,
|
544
|
+
key
|
545
|
+
);
|
539
546
|
}
|
540
|
-
console.debug("missing eth call:", "burnFrom", account, amount);
|
541
547
|
return await this.contract
|
542
548
|
.getFunction("burnFrom(address,uint256)")
|
543
549
|
.staticCall(account, amount, overrides || {});
|
@@ -575,13 +581,14 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
575
581
|
.toArray();
|
576
582
|
return result.length == 1 ? result[0] : result;
|
577
583
|
}
|
584
|
+
console.log(
|
585
|
+
"missing eth call key:",
|
586
|
+
"decreaseAllowance",
|
587
|
+
spender,
|
588
|
+
subtractedValue,
|
589
|
+
key
|
590
|
+
);
|
578
591
|
}
|
579
|
-
console.debug(
|
580
|
-
"missing eth call:",
|
581
|
-
"decreaseAllowance",
|
582
|
-
spender,
|
583
|
-
subtractedValue
|
584
|
-
);
|
585
592
|
return await this.contract
|
586
593
|
.getFunction("decreaseAllowance(address,uint256)")
|
587
594
|
.staticCall(spender, subtractedValue, overrides || {});
|
@@ -619,13 +626,14 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
619
626
|
.toArray();
|
620
627
|
return result.length == 1 ? result[0] : result;
|
621
628
|
}
|
629
|
+
console.log(
|
630
|
+
"missing eth call key:",
|
631
|
+
"increaseAllowance",
|
632
|
+
spender,
|
633
|
+
addedValue,
|
634
|
+
key
|
635
|
+
);
|
622
636
|
}
|
623
|
-
console.debug(
|
624
|
-
"missing eth call:",
|
625
|
-
"increaseAllowance",
|
626
|
-
spender,
|
627
|
-
addedValue
|
628
|
-
);
|
629
637
|
return await this.contract
|
630
638
|
.getFunction("increaseAllowance(address,uint256)")
|
631
639
|
.staticCall(spender, addedValue, overrides || {});
|
@@ -658,8 +666,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
658
666
|
.toArray();
|
659
667
|
return result.length == 1 ? result[0] : result;
|
660
668
|
}
|
669
|
+
console.log("missing eth call key:", "renounceOwnership", key);
|
661
670
|
}
|
662
|
-
console.debug("missing eth call:", "renounceOwnership");
|
663
671
|
return await this.contract
|
664
672
|
.getFunction("renounceOwnership()")
|
665
673
|
.staticCall(overrides || {});
|
@@ -693,8 +701,8 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
693
701
|
.toArray();
|
694
702
|
return result.length == 1 ? result[0] : result;
|
695
703
|
}
|
704
|
+
console.log("missing eth call key:", "setLocker", _locker, key);
|
696
705
|
}
|
697
|
-
console.debug("missing eth call:", "setLocker", _locker);
|
698
706
|
return await this.contract
|
699
707
|
.getFunction("setLocker(address)")
|
700
708
|
.staticCall(_locker, overrides || {});
|
@@ -732,8 +740,14 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
732
740
|
.toArray();
|
733
741
|
return result.length == 1 ? result[0] : result;
|
734
742
|
}
|
743
|
+
console.log(
|
744
|
+
"missing eth call key:",
|
745
|
+
"transfer",
|
746
|
+
recipient,
|
747
|
+
amount,
|
748
|
+
key
|
749
|
+
);
|
735
750
|
}
|
736
|
-
console.debug("missing eth call:", "transfer", recipient, amount);
|
737
751
|
return await this.contract
|
738
752
|
.getFunction("transfer(address,uint256)")
|
739
753
|
.staticCall(recipient, amount, overrides || {});
|
@@ -773,14 +787,15 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
773
787
|
.toArray();
|
774
788
|
return result.length == 1 ? result[0] : result;
|
775
789
|
}
|
790
|
+
console.log(
|
791
|
+
"missing eth call key:",
|
792
|
+
"transferFrom",
|
793
|
+
sender,
|
794
|
+
recipient,
|
795
|
+
amount,
|
796
|
+
key
|
797
|
+
);
|
776
798
|
}
|
777
|
-
console.debug(
|
778
|
-
"missing eth call:",
|
779
|
-
"transferFrom",
|
780
|
-
sender,
|
781
|
-
recipient,
|
782
|
-
amount
|
783
|
-
);
|
784
799
|
return await this.contract
|
785
800
|
.getFunction("transferFrom(address,address,uint256)")
|
786
801
|
.staticCall(sender, recipient, amount, overrides || {});
|
@@ -816,8 +831,13 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
816
831
|
.toArray();
|
817
832
|
return result.length == 1 ? result[0] : result;
|
818
833
|
}
|
834
|
+
console.log(
|
835
|
+
"missing eth call key:",
|
836
|
+
"transferOwnership",
|
837
|
+
newOwner,
|
838
|
+
key
|
839
|
+
);
|
819
840
|
}
|
820
|
-
console.debug("missing eth call:", "transferOwnership", newOwner);
|
821
841
|
return await this.contract
|
822
842
|
.getFunction("transferOwnership(address)")
|
823
843
|
.staticCall(newOwner, overrides || {});
|
@@ -1808,7 +1828,8 @@ export class ERC20Processor extends BaseProcessor<
|
|
1808
1828
|
fetchConfig?: Partial<EthFetchConfig>,
|
1809
1829
|
preprocessHandler?: (
|
1810
1830
|
event: ApprovalEvent,
|
1811
|
-
ctx: ERC20Context
|
1831
|
+
ctx: ERC20Context,
|
1832
|
+
preprocessStore: { [k: string]: any }
|
1812
1833
|
) => Promise<PreprocessResult>
|
1813
1834
|
): this {
|
1814
1835
|
if (!filter) {
|
@@ -1829,7 +1850,8 @@ export class ERC20Processor extends BaseProcessor<
|
|
1829
1850
|
fetchConfig?: Partial<EthFetchConfig>,
|
1830
1851
|
preprocessHandler?: (
|
1831
1852
|
event: OwnershipTransferredEvent,
|
1832
|
-
ctx: ERC20Context
|
1853
|
+
ctx: ERC20Context,
|
1854
|
+
preprocessStore: { [k: string]: any }
|
1833
1855
|
) => Promise<PreprocessResult>
|
1834
1856
|
): this {
|
1835
1857
|
if (!filter) {
|
@@ -1846,7 +1868,8 @@ export class ERC20Processor extends BaseProcessor<
|
|
1846
1868
|
fetchConfig?: Partial<EthFetchConfig>,
|
1847
1869
|
preprocessHandler?: (
|
1848
1870
|
event: TransferEvent,
|
1849
|
-
ctx: ERC20Context
|
1871
|
+
ctx: ERC20Context,
|
1872
|
+
preprocessStore: { [k: string]: any }
|
1850
1873
|
) => Promise<PreprocessResult>
|
1851
1874
|
): this {
|
1852
1875
|
if (!filter) {
|
@@ -2221,7 +2244,8 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
|
|
2221
2244
|
fetchConfig?: Partial<EthFetchConfig>,
|
2222
2245
|
preprocessHandler?: (
|
2223
2246
|
event: ApprovalEvent,
|
2224
|
-
ctx: ERC20Context
|
2247
|
+
ctx: ERC20Context,
|
2248
|
+
preprocessStore: { [k: string]: any }
|
2225
2249
|
) => Promise<PreprocessResult>
|
2226
2250
|
): this {
|
2227
2251
|
if (!filter) {
|
@@ -2242,7 +2266,8 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
|
|
2242
2266
|
fetchConfig?: Partial<EthFetchConfig>,
|
2243
2267
|
preprocessHandler?: (
|
2244
2268
|
event: OwnershipTransferredEvent,
|
2245
|
-
ctx: ERC20Context
|
2269
|
+
ctx: ERC20Context,
|
2270
|
+
preprocessStore: { [k: string]: any }
|
2246
2271
|
) => Promise<PreprocessResult>
|
2247
2272
|
): this {
|
2248
2273
|
if (!filter) {
|
@@ -2259,7 +2284,8 @@ export class ERC20ProcessorTemplate extends BaseProcessorTemplate<
|
|
2259
2284
|
fetchConfig?: Partial<EthFetchConfig>,
|
2260
2285
|
preprocessHandler?: (
|
2261
2286
|
event: TransferEvent,
|
2262
|
-
ctx: ERC20Context
|
2287
|
+
ctx: ERC20Context,
|
2288
|
+
preprocessStore: { [k: string]: any }
|
2263
2289
|
) => Promise<PreprocessResult>
|
2264
2290
|
): this {
|
2265
2291
|
if (!filter) {
|
@@ -125,8 +125,8 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
125
125
|
const result = iface.decodeFunctionResult("name", ret).toArray();
|
126
126
|
return result.length == 1 ? result[0] : result;
|
127
127
|
}
|
128
|
+
console.log("missing eth call key:", "name", key);
|
128
129
|
}
|
129
|
-
console.debug("missing eth call:", "name");
|
130
130
|
return await this.contract.getFunction("name()")(overrides || {});
|
131
131
|
} catch (e) {
|
132
132
|
const stack = new Error().stack;
|
@@ -158,8 +158,8 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
158
158
|
.toArray();
|
159
159
|
return result.length == 1 ? result[0] : result;
|
160
160
|
}
|
161
|
+
console.log("missing eth call key:", "totalSupply", key);
|
161
162
|
}
|
162
|
-
console.debug("missing eth call:", "totalSupply");
|
163
163
|
return await this.contract.getFunction("totalSupply()")(overrides || {});
|
164
164
|
} catch (e) {
|
165
165
|
const stack = new Error().stack;
|
@@ -189,8 +189,8 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
189
189
|
const result = iface.decodeFunctionResult("decimals", ret).toArray();
|
190
190
|
return result.length == 1 ? result[0] : result;
|
191
191
|
}
|
192
|
+
console.log("missing eth call key:", "decimals", key);
|
192
193
|
}
|
193
|
-
console.debug("missing eth call:", "decimals");
|
194
194
|
return await this.contract.getFunction("decimals()")(overrides || {});
|
195
195
|
} catch (e) {
|
196
196
|
const stack = new Error().stack;
|
@@ -221,8 +221,8 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
221
221
|
const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
|
222
222
|
return result.length == 1 ? result[0] : result;
|
223
223
|
}
|
224
|
+
console.log("missing eth call key:", "balanceOf", who, key);
|
224
225
|
}
|
225
|
-
console.debug("missing eth call:", "balanceOf", who);
|
226
226
|
return await this.contract.getFunction("balanceOf(address)")(
|
227
227
|
who,
|
228
228
|
overrides || {}
|
@@ -255,8 +255,8 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
255
255
|
const result = iface.decodeFunctionResult("symbol", ret).toArray();
|
256
256
|
return result.length == 1 ? result[0] : result;
|
257
257
|
}
|
258
|
+
console.log("missing eth call key:", "symbol", key);
|
258
259
|
}
|
259
|
-
console.debug("missing eth call:", "symbol");
|
260
260
|
return await this.contract.getFunction("symbol()")(overrides || {});
|
261
261
|
} catch (e) {
|
262
262
|
const stack = new Error().stack;
|
@@ -291,8 +291,8 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
291
291
|
const result = iface.decodeFunctionResult("allowance", ret).toArray();
|
292
292
|
return result.length == 1 ? result[0] : result;
|
293
293
|
}
|
294
|
+
console.log("missing eth call key:", "allowance", owner, spender, key);
|
294
295
|
}
|
295
|
-
console.debug("missing eth call:", "allowance", owner, spender);
|
296
296
|
return await this.contract.getFunction("allowance(address,address)")(
|
297
297
|
owner,
|
298
298
|
spender,
|
@@ -334,8 +334,8 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
334
334
|
const result = iface.decodeFunctionResult("approve", ret).toArray();
|
335
335
|
return result.length == 1 ? result[0] : result;
|
336
336
|
}
|
337
|
+
console.log("missing eth call key:", "approve", spender, value, key);
|
337
338
|
}
|
338
|
-
console.debug("missing eth call:", "approve", spender, value);
|
339
339
|
return await this.contract
|
340
340
|
.getFunction("approve(address,uint256)")
|
341
341
|
.staticCall(spender, value, overrides || {});
|
@@ -375,8 +375,15 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
375
375
|
.toArray();
|
376
376
|
return result.length == 1 ? result[0] : result;
|
377
377
|
}
|
378
|
+
console.log(
|
379
|
+
"missing eth call key:",
|
380
|
+
"transferFrom",
|
381
|
+
from,
|
382
|
+
to,
|
383
|
+
value,
|
384
|
+
key
|
385
|
+
);
|
378
386
|
}
|
379
|
-
console.debug("missing eth call:", "transferFrom", from, to, value);
|
380
387
|
return await this.contract
|
381
388
|
.getFunction("transferFrom(address,address,uint256)")
|
382
389
|
.staticCall(from, to, value, overrides || {});
|
@@ -411,8 +418,8 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
|
|
411
418
|
.toArray();
|
412
419
|
return result.length == 1 ? result[0] : result;
|
413
420
|
}
|
421
|
+
console.log("missing eth call key:", "transfer", to, value, key);
|
414
422
|
}
|
415
|
-
console.debug("missing eth call:", "transfer", to, value);
|
416
423
|
return await this.contract
|
417
424
|
.getFunction("transfer(address,uint256)")
|
418
425
|
.staticCall(to, value, overrides || {});
|
@@ -933,7 +940,8 @@ export class ERC20BytesProcessor extends BaseProcessor<
|
|
933
940
|
fetchConfig?: Partial<EthFetchConfig>,
|
934
941
|
preprocessHandler?: (
|
935
942
|
event: ApprovalEvent,
|
936
|
-
ctx: ERC20BytesContext
|
943
|
+
ctx: ERC20BytesContext,
|
944
|
+
preprocessStore: { [k: string]: any }
|
937
945
|
) => Promise<PreprocessResult>
|
938
946
|
): this {
|
939
947
|
if (!filter) {
|
@@ -952,7 +960,8 @@ export class ERC20BytesProcessor extends BaseProcessor<
|
|
952
960
|
fetchConfig?: Partial<EthFetchConfig>,
|
953
961
|
preprocessHandler?: (
|
954
962
|
event: TransferEvent,
|
955
|
-
ctx: ERC20BytesContext
|
963
|
+
ctx: ERC20BytesContext,
|
964
|
+
preprocessStore: { [k: string]: any }
|
956
965
|
) => Promise<PreprocessResult>
|
957
966
|
): this {
|
958
967
|
if (!filter) {
|
@@ -1177,7 +1186,8 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
|
|
1177
1186
|
fetchConfig?: Partial<EthFetchConfig>,
|
1178
1187
|
preprocessHandler?: (
|
1179
1188
|
event: ApprovalEvent,
|
1180
|
-
ctx: ERC20BytesContext
|
1189
|
+
ctx: ERC20BytesContext,
|
1190
|
+
preprocessStore: { [k: string]: any }
|
1181
1191
|
) => Promise<PreprocessResult>
|
1182
1192
|
): this {
|
1183
1193
|
if (!filter) {
|
@@ -1196,7 +1206,8 @@ export class ERC20BytesProcessorTemplate extends BaseProcessorTemplate<
|
|
1196
1206
|
fetchConfig?: Partial<EthFetchConfig>,
|
1197
1207
|
preprocessHandler?: (
|
1198
1208
|
event: TransferEvent,
|
1199
|
-
ctx: ERC20BytesContext
|
1209
|
+
ctx: ERC20BytesContext,
|
1210
|
+
preprocessStore: { [k: string]: any }
|
1200
1211
|
) => Promise<PreprocessResult>
|
1201
1212
|
): this {
|
1202
1213
|
if (!filter) {
|