@sentio/sdk 2.40.0-rc.15 → 2.40.0-rc.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
  2. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +23 -0
  3. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
  4. package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
  5. package/lib/eth/builtin/internal/erc1155-processor.js +8 -0
  6. package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
  7. package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
  8. package/lib/eth/builtin/internal/erc20-processor.js +18 -0
  9. package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
  10. package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
  11. package/lib/eth/builtin/internal/erc20bytes-processor.js +9 -0
  12. package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
  13. package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
  14. package/lib/eth/builtin/internal/erc721-processor.js +14 -0
  15. package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
  16. package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
  17. package/lib/eth/builtin/internal/weth9-processor.js +11 -0
  18. package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
  19. package/lib/eth/codegen/function-calls.d.ts.map +1 -1
  20. package/lib/eth/codegen/function-calls.js +1 -0
  21. package/lib/eth/codegen/function-calls.js.map +1 -1
  22. package/package.json +3 -3
  23. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +43 -0
  24. package/src/eth/builtin/internal/erc1155-processor.ts +49 -0
  25. package/src/eth/builtin/internal/erc20-processor.ts +54 -0
  26. package/src/eth/builtin/internal/erc20bytes-processor.ts +16 -0
  27. package/src/eth/builtin/internal/erc721-processor.ts +53 -0
  28. package/src/eth/builtin/internal/weth9-processor.ts +18 -0
  29. package/src/eth/codegen/function-calls.ts +3 -0
@@ -181,6 +181,7 @@ export class ERC721ContractView extends ContractView<ERC721> {
181
181
  .toArray();
182
182
  return result.length == 1 ? result[0] : result;
183
183
  }
184
+ console.log("missing eth call key:", "totalSupply", key);
184
185
  }
185
186
  return await this.contract.getFunction("totalSupply()")(overrides || {});
186
187
  } catch (e) {
@@ -212,6 +213,7 @@ export class ERC721ContractView extends ContractView<ERC721> {
212
213
  const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
213
214
  return result.length == 1 ? result[0] : result;
214
215
  }
216
+ console.log("missing eth call key:", "balanceOf", owner, key);
215
217
  }
216
218
  return await this.contract.getFunction("balanceOf(address)")(
217
219
  owner,
@@ -248,6 +250,7 @@ export class ERC721ContractView extends ContractView<ERC721> {
248
250
  .toArray();
249
251
  return result.length == 1 ? result[0] : result;
250
252
  }
253
+ console.log("missing eth call key:", "getApproved", tokenId, key);
251
254
  }
252
255
  return await this.contract.getFunction("getApproved(uint256)")(
253
256
  tokenId,
@@ -288,6 +291,13 @@ export class ERC721ContractView extends ContractView<ERC721> {
288
291
  .toArray();
289
292
  return result.length == 1 ? result[0] : result;
290
293
  }
294
+ console.log(
295
+ "missing eth call key:",
296
+ "isApprovedForAll",
297
+ owner,
298
+ operator,
299
+ key
300
+ );
291
301
  }
292
302
  return await this.contract.getFunction(
293
303
  "isApprovedForAll(address,address)"
@@ -318,6 +328,7 @@ export class ERC721ContractView extends ContractView<ERC721> {
318
328
  const result = iface.decodeFunctionResult("name", ret).toArray();
319
329
  return result.length == 1 ? result[0] : result;
320
330
  }
331
+ console.log("missing eth call key:", "name", key);
321
332
  }
322
333
  return await this.contract.getFunction("name()")(overrides || {});
323
334
  } catch (e) {
@@ -349,6 +360,7 @@ export class ERC721ContractView extends ContractView<ERC721> {
349
360
  const result = iface.decodeFunctionResult("ownerOf", ret).toArray();
350
361
  return result.length == 1 ? result[0] : result;
351
362
  }
363
+ console.log("missing eth call key:", "ownerOf", tokenId, key);
352
364
  }
353
365
  return await this.contract.getFunction("ownerOf(uint256)")(
354
366
  tokenId,
@@ -387,6 +399,12 @@ export class ERC721ContractView extends ContractView<ERC721> {
387
399
  .toArray();
388
400
  return result.length == 1 ? result[0] : result;
389
401
  }
402
+ console.log(
403
+ "missing eth call key:",
404
+ "supportsInterface",
405
+ interfaceId,
406
+ key
407
+ );
390
408
  }
391
409
  return await this.contract.getFunction("supportsInterface(bytes4)")(
392
410
  interfaceId,
@@ -420,6 +438,7 @@ export class ERC721ContractView extends ContractView<ERC721> {
420
438
  const result = iface.decodeFunctionResult("symbol", ret).toArray();
421
439
  return result.length == 1 ? result[0] : result;
422
440
  }
441
+ console.log("missing eth call key:", "symbol", key);
423
442
  }
424
443
  return await this.contract.getFunction("symbol()")(overrides || {});
425
444
  } catch (e) {
@@ -451,6 +470,7 @@ export class ERC721ContractView extends ContractView<ERC721> {
451
470
  const result = iface.decodeFunctionResult("tokenURI", ret).toArray();
452
471
  return result.length == 1 ? result[0] : result;
453
472
  }
473
+ console.log("missing eth call key:", "tokenURI", tokenId, key);
454
474
  }
455
475
  return await this.contract.getFunction("tokenURI(uint256)")(
456
476
  tokenId,
@@ -489,6 +509,7 @@ export class ERC721ContractView extends ContractView<ERC721> {
489
509
  const result = iface.decodeFunctionResult("approve", ret).toArray();
490
510
  return result.length == 1 ? result[0] : result;
491
511
  }
512
+ console.log("missing eth call key:", "approve", to, tokenId, key);
492
513
  }
493
514
  return await this.contract
494
515
  .getFunction("approve(address,uint256)")
@@ -529,6 +550,14 @@ export class ERC721ContractView extends ContractView<ERC721> {
529
550
  .toArray();
530
551
  return result.length == 1 ? result[0] : result;
531
552
  }
553
+ console.log(
554
+ "missing eth call key:",
555
+ "safeTransferFrom",
556
+ from,
557
+ to,
558
+ tokenId,
559
+ key
560
+ );
532
561
  }
533
562
  return await this.contract
534
563
  .getFunction("safeTransferFrom(address,address,uint256)")
@@ -571,6 +600,15 @@ export class ERC721ContractView extends ContractView<ERC721> {
571
600
  .toArray();
572
601
  return result.length == 1 ? result[0] : result;
573
602
  }
603
+ console.log(
604
+ "missing eth call key:",
605
+ "safeTransferFrom",
606
+ from,
607
+ to,
608
+ tokenId,
609
+ data,
610
+ key
611
+ );
574
612
  }
575
613
  return await this.contract
576
614
  .getFunction("safeTransferFrom(address,address,uint256,bytes)")
@@ -609,6 +647,13 @@ export class ERC721ContractView extends ContractView<ERC721> {
609
647
  .toArray();
610
648
  return result.length == 1 ? result[0] : result;
611
649
  }
650
+ console.log(
651
+ "missing eth call key:",
652
+ "setApprovalForAll",
653
+ operator,
654
+ _approved,
655
+ key
656
+ );
612
657
  }
613
658
  return await this.contract
614
659
  .getFunction("setApprovalForAll(address,bool)")
@@ -649,6 +694,14 @@ export class ERC721ContractView extends ContractView<ERC721> {
649
694
  .toArray();
650
695
  return result.length == 1 ? result[0] : result;
651
696
  }
697
+ console.log(
698
+ "missing eth call key:",
699
+ "transferFrom",
700
+ from,
701
+ to,
702
+ tokenId,
703
+ key
704
+ );
652
705
  }
653
706
  return await this.contract
654
707
  .getFunction("transferFrom(address,address,uint256)")
@@ -134,6 +134,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
134
134
  const result = iface.decodeFunctionResult("name", ret).toArray();
135
135
  return result.length == 1 ? result[0] : result;
136
136
  }
137
+ console.log("missing eth call key:", "name", key);
137
138
  }
138
139
  return await this.contract.getFunction("name()")(overrides || {});
139
140
  } catch (e) {
@@ -166,6 +167,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
166
167
  .toArray();
167
168
  return result.length == 1 ? result[0] : result;
168
169
  }
170
+ console.log("missing eth call key:", "totalSupply", key);
169
171
  }
170
172
  return await this.contract.getFunction("totalSupply()")(overrides || {});
171
173
  } catch (e) {
@@ -196,6 +198,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
196
198
  const result = iface.decodeFunctionResult("decimals", ret).toArray();
197
199
  return result.length == 1 ? result[0] : result;
198
200
  }
201
+ console.log("missing eth call key:", "decimals", key);
199
202
  }
200
203
  return await this.contract.getFunction("decimals()")(overrides || {});
201
204
  } catch (e) {
@@ -227,6 +230,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
227
230
  const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
228
231
  return result.length == 1 ? result[0] : result;
229
232
  }
233
+ console.log("missing eth call key:", "balanceOf", arg0, key);
230
234
  }
231
235
  return await this.contract.getFunction("balanceOf(address)")(
232
236
  arg0,
@@ -260,6 +264,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
260
264
  const result = iface.decodeFunctionResult("symbol", ret).toArray();
261
265
  return result.length == 1 ? result[0] : result;
262
266
  }
267
+ console.log("missing eth call key:", "symbol", key);
263
268
  }
264
269
  return await this.contract.getFunction("symbol()")(overrides || {});
265
270
  } catch (e) {
@@ -292,6 +297,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
292
297
  const result = iface.decodeFunctionResult("allowance", ret).toArray();
293
298
  return result.length == 1 ? result[0] : result;
294
299
  }
300
+ console.log("missing eth call key:", "allowance", arg0, arg1, key);
295
301
  }
296
302
  return await this.contract.getFunction("allowance(address,address)")(
297
303
  arg0,
@@ -331,6 +337,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
331
337
  const result = iface.decodeFunctionResult("approve", ret).toArray();
332
338
  return result.length == 1 ? result[0] : result;
333
339
  }
340
+ console.log("missing eth call key:", "approve", guy, wad, key);
334
341
  }
335
342
  return await this.contract
336
343
  .getFunction("approve(address,uint256)")
@@ -371,6 +378,14 @@ export class WETH9ContractView extends ContractView<WETH9> {
371
378
  .toArray();
372
379
  return result.length == 1 ? result[0] : result;
373
380
  }
381
+ console.log(
382
+ "missing eth call key:",
383
+ "transferFrom",
384
+ src,
385
+ dst,
386
+ wad,
387
+ key
388
+ );
374
389
  }
375
390
  return await this.contract
376
391
  .getFunction("transferFrom(address,address,uint256)")
@@ -405,6 +420,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
405
420
  .toArray();
406
421
  return result.length == 1 ? result[0] : result;
407
422
  }
423
+ console.log("missing eth call key:", "withdraw", wad, key);
408
424
  }
409
425
  return await this.contract
410
426
  .getFunction("withdraw(uint256)")
@@ -440,6 +456,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
440
456
  .toArray();
441
457
  return result.length == 1 ? result[0] : result;
442
458
  }
459
+ console.log("missing eth call key:", "transfer", dst, wad, key);
443
460
  }
444
461
  return await this.contract
445
462
  .getFunction("transfer(address,uint256)")
@@ -471,6 +488,7 @@ export class WETH9ContractView extends ContractView<WETH9> {
471
488
  const result = iface.decodeFunctionResult("deposit", ret).toArray();
472
489
  return result.length == 1 ? result[0] : result;
473
490
  }
491
+ console.log("missing eth call key:", "deposit", key);
474
492
  }
475
493
  return await this.contract
476
494
  .getFunction("deposit()")
@@ -58,6 +58,9 @@ export function generateViewFunction(view: boolean, fn: FunctionDeclaration, inc
58
58
  const result = iface.decodeFunctionResult("${fn.name}", ret).toArray()
59
59
  return result.length == 1? result[0]: result
60
60
  }
61
+ console.log("missing eth call key:", "${fn.name}", ${
62
+ fn.inputs.length > 0 ? fn.inputs.map((input, index) => input.name || `arg${index}`).join(',') + ',' : ''
63
+ }key)
61
64
  }
62
65
  return await ${func}${call}(${
63
66
  fn.inputs.length > 0 ? fn.inputs.map((input, index) => input.name || `arg${index}`).join(',') + ',' : ''