@sentio/sdk 2.43.1-rc.3 → 2.43.2-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +1 -321
  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 +1 -132
  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 +1 -259
  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 +1 -125
  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 +1 -206
  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 +1 -145
  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 +0 -14
  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 +0 -324
  24. package/src/eth/builtin/internal/erc1155-processor.ts +0 -132
  25. package/src/eth/builtin/internal/erc20-processor.ts +0 -259
  26. package/src/eth/builtin/internal/erc20bytes-processor.ts +0 -125
  27. package/src/eth/builtin/internal/erc721-processor.ts +0 -206
  28. package/src/eth/builtin/internal/weth9-processor.ts +0 -145
  29. package/src/eth/codegen/function-calls.ts +0 -16
@@ -21,7 +21,6 @@ import {
21
21
  EthContext,
22
22
  EthFetchConfig,
23
23
  PreprocessResult,
24
- makeEthCallKey,
25
24
  } from "@sentio/sdk/eth";
26
25
  import { EthCallParam, EthCallContext, PreparedData } from "@sentio/protos";
27
26
 
@@ -231,20 +230,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
231
230
  ethCallContext?: EthCallContext
232
231
  ): Promise<string> {
233
232
  try {
234
- if (preparedData?.ethCallResults && ethCallContext) {
235
- const calldata = iface.encodeFunctionData("accessController", []);
236
- const ethCallKey = makeEthCallKey({
237
- context: ethCallContext,
238
- calldata,
239
- });
240
- const ret = preparedData.ethCallResults[ethCallKey];
241
- if (ret) {
242
- const result = iface
243
- .decodeFunctionResult("accessController", ret)
244
- .toArray();
245
- return result.length == 1 ? result[0] : result;
246
- }
247
- }
248
233
  return await this.contract.getFunction("accessController()")(
249
234
  overrides || {}
250
235
  );
@@ -260,20 +245,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
260
245
  ethCallContext?: EthCallContext
261
246
  ): Promise<string> {
262
247
  try {
263
- if (preparedData?.ethCallResults && ethCallContext) {
264
- const calldata = iface.encodeFunctionData("aggregator", []);
265
- const ethCallKey = makeEthCallKey({
266
- context: ethCallContext,
267
- calldata,
268
- });
269
- const ret = preparedData.ethCallResults[ethCallKey];
270
- if (ret) {
271
- const result = iface
272
- .decodeFunctionResult("aggregator", ret)
273
- .toArray();
274
- return result.length == 1 ? result[0] : result;
275
- }
276
- }
277
248
  return await this.contract.getFunction("aggregator()")(overrides || {});
278
249
  } catch (e) {
279
250
  const stack = new Error().stack;
@@ -287,18 +258,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
287
258
  ethCallContext?: EthCallContext
288
259
  ): Promise<bigint> {
289
260
  try {
290
- if (preparedData?.ethCallResults && ethCallContext) {
291
- const calldata = iface.encodeFunctionData("decimals", []);
292
- const ethCallKey = makeEthCallKey({
293
- context: ethCallContext,
294
- calldata,
295
- });
296
- const ret = preparedData.ethCallResults[ethCallKey];
297
- if (ret) {
298
- const result = iface.decodeFunctionResult("decimals", ret).toArray();
299
- return result.length == 1 ? result[0] : result;
300
- }
301
- }
302
261
  return await this.contract.getFunction("decimals()")(overrides || {});
303
262
  } catch (e) {
304
263
  const stack = new Error().stack;
@@ -312,20 +271,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
312
271
  ethCallContext?: EthCallContext
313
272
  ): Promise<string> {
314
273
  try {
315
- if (preparedData?.ethCallResults && ethCallContext) {
316
- const calldata = iface.encodeFunctionData("description", []);
317
- const ethCallKey = makeEthCallKey({
318
- context: ethCallContext,
319
- calldata,
320
- });
321
- const ret = preparedData.ethCallResults[ethCallKey];
322
- if (ret) {
323
- const result = iface
324
- .decodeFunctionResult("description", ret)
325
- .toArray();
326
- return result.length == 1 ? result[0] : result;
327
- }
328
- }
329
274
  return await this.contract.getFunction("description()")(overrides || {});
330
275
  } catch (e) {
331
276
  const stack = new Error().stack;
@@ -340,18 +285,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
340
285
  ethCallContext?: EthCallContext
341
286
  ): Promise<bigint> {
342
287
  try {
343
- if (preparedData?.ethCallResults && ethCallContext) {
344
- const calldata = iface.encodeFunctionData("getAnswer", [_roundId]);
345
- const ethCallKey = makeEthCallKey({
346
- context: ethCallContext,
347
- calldata,
348
- });
349
- const ret = preparedData.ethCallResults[ethCallKey];
350
- if (ret) {
351
- const result = iface.decodeFunctionResult("getAnswer", ret).toArray();
352
- return result.length == 1 ? result[0] : result;
353
- }
354
- }
355
288
  return await this.contract.getFunction("getAnswer(uint256)")(
356
289
  _roundId,
357
290
  overrides || {}
@@ -377,20 +310,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
377
310
  }
378
311
  > {
379
312
  try {
380
- if (preparedData?.ethCallResults && ethCallContext) {
381
- const calldata = iface.encodeFunctionData("getRoundData", [_roundId]);
382
- const ethCallKey = makeEthCallKey({
383
- context: ethCallContext,
384
- calldata,
385
- });
386
- const ret = preparedData.ethCallResults[ethCallKey];
387
- if (ret) {
388
- const result = iface
389
- .decodeFunctionResult("getRoundData", ret)
390
- .toArray();
391
- return result.length == 1 ? result[0] : result;
392
- }
393
- }
394
313
  return await this.contract.getFunction("getRoundData(uint80)")(
395
314
  _roundId,
396
315
  overrides || {}
@@ -408,20 +327,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
408
327
  ethCallContext?: EthCallContext
409
328
  ): Promise<bigint> {
410
329
  try {
411
- if (preparedData?.ethCallResults && ethCallContext) {
412
- const calldata = iface.encodeFunctionData("getTimestamp", [_roundId]);
413
- const ethCallKey = makeEthCallKey({
414
- context: ethCallContext,
415
- calldata,
416
- });
417
- const ret = preparedData.ethCallResults[ethCallKey];
418
- if (ret) {
419
- const result = iface
420
- .decodeFunctionResult("getTimestamp", ret)
421
- .toArray();
422
- return result.length == 1 ? result[0] : result;
423
- }
424
- }
425
330
  return await this.contract.getFunction("getTimestamp(uint256)")(
426
331
  _roundId,
427
332
  overrides || {}
@@ -438,20 +343,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
438
343
  ethCallContext?: EthCallContext
439
344
  ): Promise<bigint> {
440
345
  try {
441
- if (preparedData?.ethCallResults && ethCallContext) {
442
- const calldata = iface.encodeFunctionData("latestAnswer", []);
443
- const ethCallKey = makeEthCallKey({
444
- context: ethCallContext,
445
- calldata,
446
- });
447
- const ret = preparedData.ethCallResults[ethCallKey];
448
- if (ret) {
449
- const result = iface
450
- .decodeFunctionResult("latestAnswer", ret)
451
- .toArray();
452
- return result.length == 1 ? result[0] : result;
453
- }
454
- }
455
346
  return await this.contract.getFunction("latestAnswer()")(overrides || {});
456
347
  } catch (e) {
457
348
  const stack = new Error().stack;
@@ -465,20 +356,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
465
356
  ethCallContext?: EthCallContext
466
357
  ): Promise<bigint> {
467
358
  try {
468
- if (preparedData?.ethCallResults && ethCallContext) {
469
- const calldata = iface.encodeFunctionData("latestRound", []);
470
- const ethCallKey = makeEthCallKey({
471
- context: ethCallContext,
472
- calldata,
473
- });
474
- const ret = preparedData.ethCallResults[ethCallKey];
475
- if (ret) {
476
- const result = iface
477
- .decodeFunctionResult("latestRound", ret)
478
- .toArray();
479
- return result.length == 1 ? result[0] : result;
480
- }
481
- }
482
359
  return await this.contract.getFunction("latestRound()")(overrides || {});
483
360
  } catch (e) {
484
361
  const stack = new Error().stack;
@@ -500,20 +377,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
500
377
  }
501
378
  > {
502
379
  try {
503
- if (preparedData?.ethCallResults && ethCallContext) {
504
- const calldata = iface.encodeFunctionData("latestRoundData", []);
505
- const ethCallKey = makeEthCallKey({
506
- context: ethCallContext,
507
- calldata,
508
- });
509
- const ret = preparedData.ethCallResults[ethCallKey];
510
- if (ret) {
511
- const result = iface
512
- .decodeFunctionResult("latestRoundData", ret)
513
- .toArray();
514
- return result.length == 1 ? result[0] : result;
515
- }
516
- }
517
380
  return await this.contract.getFunction("latestRoundData()")(
518
381
  overrides || {}
519
382
  );
@@ -529,20 +392,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
529
392
  ethCallContext?: EthCallContext
530
393
  ): Promise<bigint> {
531
394
  try {
532
- if (preparedData?.ethCallResults && ethCallContext) {
533
- const calldata = iface.encodeFunctionData("latestTimestamp", []);
534
- const ethCallKey = makeEthCallKey({
535
- context: ethCallContext,
536
- calldata,
537
- });
538
- const ret = preparedData.ethCallResults[ethCallKey];
539
- if (ret) {
540
- const result = iface
541
- .decodeFunctionResult("latestTimestamp", ret)
542
- .toArray();
543
- return result.length == 1 ? result[0] : result;
544
- }
545
- }
546
395
  return await this.contract.getFunction("latestTimestamp()")(
547
396
  overrides || {}
548
397
  );
@@ -558,18 +407,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
558
407
  ethCallContext?: EthCallContext
559
408
  ): Promise<string> {
560
409
  try {
561
- if (preparedData?.ethCallResults && ethCallContext) {
562
- const calldata = iface.encodeFunctionData("owner", []);
563
- const ethCallKey = makeEthCallKey({
564
- context: ethCallContext,
565
- calldata,
566
- });
567
- const ret = preparedData.ethCallResults[ethCallKey];
568
- if (ret) {
569
- const result = iface.decodeFunctionResult("owner", ret).toArray();
570
- return result.length == 1 ? result[0] : result;
571
- }
572
- }
573
410
  return await this.contract.getFunction("owner()")(overrides || {});
574
411
  } catch (e) {
575
412
  const stack = new Error().stack;
@@ -584,20 +421,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
584
421
  ethCallContext?: EthCallContext
585
422
  ): Promise<string> {
586
423
  try {
587
- if (preparedData?.ethCallResults && ethCallContext) {
588
- const calldata = iface.encodeFunctionData("phaseAggregators", [arg0]);
589
- const ethCallKey = makeEthCallKey({
590
- context: ethCallContext,
591
- calldata,
592
- });
593
- const ret = preparedData.ethCallResults[ethCallKey];
594
- if (ret) {
595
- const result = iface
596
- .decodeFunctionResult("phaseAggregators", ret)
597
- .toArray();
598
- return result.length == 1 ? result[0] : result;
599
- }
600
- }
601
424
  return await this.contract.getFunction("phaseAggregators(uint16)")(
602
425
  arg0,
603
426
  overrides || {}
@@ -614,18 +437,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
614
437
  ethCallContext?: EthCallContext
615
438
  ): Promise<bigint> {
616
439
  try {
617
- if (preparedData?.ethCallResults && ethCallContext) {
618
- const calldata = iface.encodeFunctionData("phaseId", []);
619
- const ethCallKey = makeEthCallKey({
620
- context: ethCallContext,
621
- calldata,
622
- });
623
- const ret = preparedData.ethCallResults[ethCallKey];
624
- if (ret) {
625
- const result = iface.decodeFunctionResult("phaseId", ret).toArray();
626
- return result.length == 1 ? result[0] : result;
627
- }
628
- }
629
440
  return await this.contract.getFunction("phaseId()")(overrides || {});
630
441
  } catch (e) {
631
442
  const stack = new Error().stack;
@@ -639,20 +450,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
639
450
  ethCallContext?: EthCallContext
640
451
  ): Promise<string> {
641
452
  try {
642
- if (preparedData?.ethCallResults && ethCallContext) {
643
- const calldata = iface.encodeFunctionData("proposedAggregator", []);
644
- const ethCallKey = makeEthCallKey({
645
- context: ethCallContext,
646
- calldata,
647
- });
648
- const ret = preparedData.ethCallResults[ethCallKey];
649
- if (ret) {
650
- const result = iface
651
- .decodeFunctionResult("proposedAggregator", ret)
652
- .toArray();
653
- return result.length == 1 ? result[0] : result;
654
- }
655
- }
656
453
  return await this.contract.getFunction("proposedAggregator()")(
657
454
  overrides || {}
658
455
  );
@@ -677,22 +474,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
677
474
  }
678
475
  > {
679
476
  try {
680
- if (preparedData?.ethCallResults && ethCallContext) {
681
- const calldata = iface.encodeFunctionData("proposedGetRoundData", [
682
- _roundId,
683
- ]);
684
- const ethCallKey = makeEthCallKey({
685
- context: ethCallContext,
686
- calldata,
687
- });
688
- const ret = preparedData.ethCallResults[ethCallKey];
689
- if (ret) {
690
- const result = iface
691
- .decodeFunctionResult("proposedGetRoundData", ret)
692
- .toArray();
693
- return result.length == 1 ? result[0] : result;
694
- }
695
- }
696
477
  return await this.contract.getFunction("proposedGetRoundData(uint80)")(
697
478
  _roundId,
698
479
  overrides || {}
@@ -717,23 +498,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
717
498
  }
718
499
  > {
719
500
  try {
720
- if (preparedData?.ethCallResults && ethCallContext) {
721
- const calldata = iface.encodeFunctionData(
722
- "proposedLatestRoundData",
723
- []
724
- );
725
- const ethCallKey = makeEthCallKey({
726
- context: ethCallContext,
727
- calldata,
728
- });
729
- const ret = preparedData.ethCallResults[ethCallKey];
730
- if (ret) {
731
- const result = iface
732
- .decodeFunctionResult("proposedLatestRoundData", ret)
733
- .toArray();
734
- return result.length == 1 ? result[0] : result;
735
- }
736
- }
737
501
  return await this.contract.getFunction("proposedLatestRoundData()")(
738
502
  overrides || {}
739
503
  );
@@ -749,18 +513,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
749
513
  ethCallContext?: EthCallContext
750
514
  ): Promise<bigint> {
751
515
  try {
752
- if (preparedData?.ethCallResults && ethCallContext) {
753
- const calldata = iface.encodeFunctionData("version", []);
754
- const ethCallKey = makeEthCallKey({
755
- context: ethCallContext,
756
- calldata,
757
- });
758
- const ret = preparedData.ethCallResults[ethCallKey];
759
- if (ret) {
760
- const result = iface.decodeFunctionResult("version", ret).toArray();
761
- return result.length == 1 ? result[0] : result;
762
- }
763
- }
764
516
  return await this.contract.getFunction("version()")(overrides || {});
765
517
  } catch (e) {
766
518
  const stack = new Error().stack;
@@ -777,20 +529,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
777
529
  ethCallContext?: EthCallContext
778
530
  ): Promise<void> {
779
531
  try {
780
- if (preparedData?.ethCallResults && ethCallContext) {
781
- const calldata = iface.encodeFunctionData("acceptOwnership", []);
782
- const ethCallKey = makeEthCallKey({
783
- context: ethCallContext,
784
- calldata,
785
- });
786
- const ret = preparedData.ethCallResults[ethCallKey];
787
- if (ret) {
788
- const result = iface
789
- .decodeFunctionResult("acceptOwnership", ret)
790
- .toArray();
791
- return result.length == 1 ? result[0] : result;
792
- }
793
- }
794
532
  return await this.contract
795
533
  .getFunction("acceptOwnership()")
796
534
  .staticCall(overrides || {});
@@ -806,22 +544,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
806
544
  ethCallContext?: EthCallContext
807
545
  ): Promise<void> {
808
546
  try {
809
- if (preparedData?.ethCallResults && ethCallContext) {
810
- const calldata = iface.encodeFunctionData("confirmAggregator", [
811
- _aggregator,
812
- ]);
813
- const ethCallKey = makeEthCallKey({
814
- context: ethCallContext,
815
- calldata,
816
- });
817
- const ret = preparedData.ethCallResults[ethCallKey];
818
- if (ret) {
819
- const result = iface
820
- .decodeFunctionResult("confirmAggregator", ret)
821
- .toArray();
822
- return result.length == 1 ? result[0] : result;
823
- }
824
- }
825
547
  return await this.contract
826
548
  .getFunction("confirmAggregator(address)")
827
549
  .staticCall(_aggregator, overrides || {});
@@ -837,22 +559,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
837
559
  ethCallContext?: EthCallContext
838
560
  ): Promise<void> {
839
561
  try {
840
- if (preparedData?.ethCallResults && ethCallContext) {
841
- const calldata = iface.encodeFunctionData("proposeAggregator", [
842
- _aggregator,
843
- ]);
844
- const ethCallKey = makeEthCallKey({
845
- context: ethCallContext,
846
- calldata,
847
- });
848
- const ret = preparedData.ethCallResults[ethCallKey];
849
- if (ret) {
850
- const result = iface
851
- .decodeFunctionResult("proposeAggregator", ret)
852
- .toArray();
853
- return result.length == 1 ? result[0] : result;
854
- }
855
- }
856
562
  return await this.contract
857
563
  .getFunction("proposeAggregator(address)")
858
564
  .staticCall(_aggregator, overrides || {});
@@ -868,22 +574,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
868
574
  ethCallContext?: EthCallContext
869
575
  ): Promise<void> {
870
576
  try {
871
- if (preparedData?.ethCallResults && ethCallContext) {
872
- const calldata = iface.encodeFunctionData("setController", [
873
- _accessController,
874
- ]);
875
- const ethCallKey = makeEthCallKey({
876
- context: ethCallContext,
877
- calldata,
878
- });
879
- const ret = preparedData.ethCallResults[ethCallKey];
880
- if (ret) {
881
- const result = iface
882
- .decodeFunctionResult("setController", ret)
883
- .toArray();
884
- return result.length == 1 ? result[0] : result;
885
- }
886
- }
887
577
  return await this.contract
888
578
  .getFunction("setController(address)")
889
579
  .staticCall(_accessController, overrides || {});
@@ -899,20 +589,6 @@ export class EACAggregatorProxyContractView extends ContractView<EACAggregatorPr
899
589
  ethCallContext?: EthCallContext
900
590
  ): Promise<void> {
901
591
  try {
902
- if (preparedData?.ethCallResults && ethCallContext) {
903
- const calldata = iface.encodeFunctionData("transferOwnership", [_to]);
904
- const ethCallKey = makeEthCallKey({
905
- context: ethCallContext,
906
- calldata,
907
- });
908
- const ret = preparedData.ethCallResults[ethCallKey];
909
- if (ret) {
910
- const result = iface
911
- .decodeFunctionResult("transferOwnership", ret)
912
- .toArray();
913
- return result.length == 1 ? result[0] : result;
914
- }
915
- }
916
592
  return await this.contract
917
593
  .getFunction("transferOwnership(address)")
918
594
  .staticCall(_to, overrides || {});
@@ -21,7 +21,6 @@ import {
21
21
  EthContext,
22
22
  EthFetchConfig,
23
23
  PreprocessResult,
24
- makeEthCallKey,
25
24
  } from "@sentio/sdk/eth";
26
25
  import { EthCallParam, EthCallContext, PreparedData } from "@sentio/protos";
27
26
 
@@ -146,18 +145,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
146
145
  ethCallContext?: EthCallContext
147
146
  ): Promise<bigint> {
148
147
  try {
149
- if (preparedData?.ethCallResults && ethCallContext) {
150
- const calldata = iface.encodeFunctionData("balanceOf", [account, id]);
151
- const ethCallKey = makeEthCallKey({
152
- context: ethCallContext,
153
- calldata,
154
- });
155
- const ret = preparedData.ethCallResults[ethCallKey];
156
- if (ret) {
157
- const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
158
- return result.length == 1 ? result[0] : result;
159
- }
160
- }
161
148
  return await this.contract.getFunction("balanceOf(address,uint256)")(
162
149
  account,
163
150
  id,
@@ -177,23 +164,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
177
164
  ethCallContext?: EthCallContext
178
165
  ): Promise<bigint[]> {
179
166
  try {
180
- if (preparedData?.ethCallResults && ethCallContext) {
181
- const calldata = iface.encodeFunctionData("balanceOfBatch", [
182
- accounts,
183
- ids,
184
- ]);
185
- const ethCallKey = makeEthCallKey({
186
- context: ethCallContext,
187
- calldata,
188
- });
189
- const ret = preparedData.ethCallResults[ethCallKey];
190
- if (ret) {
191
- const result = iface
192
- .decodeFunctionResult("balanceOfBatch", ret)
193
- .toArray();
194
- return result.length == 1 ? result[0] : result;
195
- }
196
- }
197
167
  return await this.contract.getFunction(
198
168
  "balanceOfBatch(address[],uint256[])"
199
169
  )(accounts, ids, overrides || {});
@@ -211,23 +181,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
211
181
  ethCallContext?: EthCallContext
212
182
  ): Promise<boolean> {
213
183
  try {
214
- if (preparedData?.ethCallResults && ethCallContext) {
215
- const calldata = iface.encodeFunctionData("isApprovedForAll", [
216
- account,
217
- operator,
218
- ]);
219
- const ethCallKey = makeEthCallKey({
220
- context: ethCallContext,
221
- calldata,
222
- });
223
- const ret = preparedData.ethCallResults[ethCallKey];
224
- if (ret) {
225
- const result = iface
226
- .decodeFunctionResult("isApprovedForAll", ret)
227
- .toArray();
228
- return result.length == 1 ? result[0] : result;
229
- }
230
- }
231
184
  return await this.contract.getFunction(
232
185
  "isApprovedForAll(address,address)"
233
186
  )(account, operator, overrides || {});
@@ -244,22 +197,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
244
197
  ethCallContext?: EthCallContext
245
198
  ): Promise<boolean> {
246
199
  try {
247
- if (preparedData?.ethCallResults && ethCallContext) {
248
- const calldata = iface.encodeFunctionData("supportsInterface", [
249
- interfaceId,
250
- ]);
251
- const ethCallKey = makeEthCallKey({
252
- context: ethCallContext,
253
- calldata,
254
- });
255
- const ret = preparedData.ethCallResults[ethCallKey];
256
- if (ret) {
257
- const result = iface
258
- .decodeFunctionResult("supportsInterface", ret)
259
- .toArray();
260
- return result.length == 1 ? result[0] : result;
261
- }
262
- }
263
200
  return await this.contract.getFunction("supportsInterface(bytes4)")(
264
201
  interfaceId,
265
202
  overrides || {}
@@ -277,18 +214,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
277
214
  ethCallContext?: EthCallContext
278
215
  ): Promise<string> {
279
216
  try {
280
- if (preparedData?.ethCallResults && ethCallContext) {
281
- const calldata = iface.encodeFunctionData("uri", [id]);
282
- const ethCallKey = makeEthCallKey({
283
- context: ethCallContext,
284
- calldata,
285
- });
286
- const ret = preparedData.ethCallResults[ethCallKey];
287
- if (ret) {
288
- const result = iface.decodeFunctionResult("uri", ret).toArray();
289
- return result.length == 1 ? result[0] : result;
290
- }
291
- }
292
217
  return await this.contract.getFunction("uri(uint256)")(
293
218
  id,
294
219
  overrides || {}
@@ -313,26 +238,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
313
238
  ethCallContext?: EthCallContext
314
239
  ): Promise<void> {
315
240
  try {
316
- if (preparedData?.ethCallResults && ethCallContext) {
317
- const calldata = iface.encodeFunctionData("safeBatchTransferFrom", [
318
- from,
319
- to,
320
- ids,
321
- amounts,
322
- data,
323
- ]);
324
- const ethCallKey = makeEthCallKey({
325
- context: ethCallContext,
326
- calldata,
327
- });
328
- const ret = preparedData.ethCallResults[ethCallKey];
329
- if (ret) {
330
- const result = iface
331
- .decodeFunctionResult("safeBatchTransferFrom", ret)
332
- .toArray();
333
- return result.length == 1 ? result[0] : result;
334
- }
335
- }
336
241
  return await this.contract
337
242
  .getFunction(
338
243
  "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"
@@ -354,26 +259,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
354
259
  ethCallContext?: EthCallContext
355
260
  ): Promise<void> {
356
261
  try {
357
- if (preparedData?.ethCallResults && ethCallContext) {
358
- const calldata = iface.encodeFunctionData("safeTransferFrom", [
359
- from,
360
- to,
361
- id,
362
- amount,
363
- data,
364
- ]);
365
- const ethCallKey = makeEthCallKey({
366
- context: ethCallContext,
367
- calldata,
368
- });
369
- const ret = preparedData.ethCallResults[ethCallKey];
370
- if (ret) {
371
- const result = iface
372
- .decodeFunctionResult("safeTransferFrom", ret)
373
- .toArray();
374
- return result.length == 1 ? result[0] : result;
375
- }
376
- }
377
262
  return await this.contract
378
263
  .getFunction(
379
264
  "safeTransferFrom(address,address,uint256,uint256,bytes)"
@@ -392,23 +277,6 @@ export class ERC1155ContractView extends ContractView<ERC1155> {
392
277
  ethCallContext?: EthCallContext
393
278
  ): Promise<void> {
394
279
  try {
395
- if (preparedData?.ethCallResults && ethCallContext) {
396
- const calldata = iface.encodeFunctionData("setApprovalForAll", [
397
- operator,
398
- approved,
399
- ]);
400
- const ethCallKey = makeEthCallKey({
401
- context: ethCallContext,
402
- calldata,
403
- });
404
- const ret = preparedData.ethCallResults[ethCallKey];
405
- if (ret) {
406
- const result = iface
407
- .decodeFunctionResult("setApprovalForAll", ret)
408
- .toArray();
409
- return result.length == 1 ? result[0] : result;
410
- }
411
- }
412
280
  return await this.contract
413
281
  .getFunction("setApprovalForAll(address,bool)")
414
282
  .staticCall(operator, approved, overrides || {});