@sentio/sdk 2.43.1 → 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
 
@@ -202,21 +201,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
202
201
  ethCallContext?: EthCallContext
203
202
  ): Promise<bigint> {
204
203
  try {
205
- if (preparedData?.ethCallResults && ethCallContext) {
206
- const calldata = iface.encodeFunctionData("allowance", [
207
- owner,
208
- spender,
209
- ]);
210
- const ethCallKey = makeEthCallKey({
211
- context: ethCallContext,
212
- calldata,
213
- });
214
- const ret = preparedData.ethCallResults[ethCallKey];
215
- if (ret) {
216
- const result = iface.decodeFunctionResult("allowance", ret).toArray();
217
- return result.length == 1 ? result[0] : result;
218
- }
219
- }
220
204
  return await this.contract.getFunction("allowance(address,address)")(
221
205
  owner,
222
206
  spender,
@@ -235,18 +219,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
235
219
  ethCallContext?: EthCallContext
236
220
  ): Promise<bigint> {
237
221
  try {
238
- if (preparedData?.ethCallResults && ethCallContext) {
239
- const calldata = iface.encodeFunctionData("balanceOf", [account]);
240
- const ethCallKey = makeEthCallKey({
241
- context: ethCallContext,
242
- calldata,
243
- });
244
- const ret = preparedData.ethCallResults[ethCallKey];
245
- if (ret) {
246
- const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
247
- return result.length == 1 ? result[0] : result;
248
- }
249
- }
250
222
  return await this.contract.getFunction("balanceOf(address)")(
251
223
  account,
252
224
  overrides || {}
@@ -263,18 +235,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
263
235
  ethCallContext?: EthCallContext
264
236
  ): Promise<bigint> {
265
237
  try {
266
- if (preparedData?.ethCallResults && ethCallContext) {
267
- const calldata = iface.encodeFunctionData("decimals", []);
268
- const ethCallKey = makeEthCallKey({
269
- context: ethCallContext,
270
- calldata,
271
- });
272
- const ret = preparedData.ethCallResults[ethCallKey];
273
- if (ret) {
274
- const result = iface.decodeFunctionResult("decimals", ret).toArray();
275
- return result.length == 1 ? result[0] : result;
276
- }
277
- }
278
238
  return await this.contract.getFunction("decimals()")(overrides || {});
279
239
  } catch (e) {
280
240
  const stack = new Error().stack;
@@ -288,18 +248,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
288
248
  ethCallContext?: EthCallContext
289
249
  ): Promise<string> {
290
250
  try {
291
- if (preparedData?.ethCallResults && ethCallContext) {
292
- const calldata = iface.encodeFunctionData("locker", []);
293
- const ethCallKey = makeEthCallKey({
294
- context: ethCallContext,
295
- calldata,
296
- });
297
- const ret = preparedData.ethCallResults[ethCallKey];
298
- if (ret) {
299
- const result = iface.decodeFunctionResult("locker", ret).toArray();
300
- return result.length == 1 ? result[0] : result;
301
- }
302
- }
303
251
  return await this.contract.getFunction("locker()")(overrides || {});
304
252
  } catch (e) {
305
253
  const stack = new Error().stack;
@@ -313,18 +261,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
313
261
  ethCallContext?: EthCallContext
314
262
  ): Promise<string> {
315
263
  try {
316
- if (preparedData?.ethCallResults && ethCallContext) {
317
- const calldata = iface.encodeFunctionData("name", []);
318
- const ethCallKey = makeEthCallKey({
319
- context: ethCallContext,
320
- calldata,
321
- });
322
- const ret = preparedData.ethCallResults[ethCallKey];
323
- if (ret) {
324
- const result = iface.decodeFunctionResult("name", ret).toArray();
325
- return result.length == 1 ? result[0] : result;
326
- }
327
- }
328
264
  return await this.contract.getFunction("name()")(overrides || {});
329
265
  } catch (e) {
330
266
  const stack = new Error().stack;
@@ -338,18 +274,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
338
274
  ethCallContext?: EthCallContext
339
275
  ): Promise<string> {
340
276
  try {
341
- if (preparedData?.ethCallResults && ethCallContext) {
342
- const calldata = iface.encodeFunctionData("owner", []);
343
- const ethCallKey = makeEthCallKey({
344
- context: ethCallContext,
345
- calldata,
346
- });
347
- const ret = preparedData.ethCallResults[ethCallKey];
348
- if (ret) {
349
- const result = iface.decodeFunctionResult("owner", ret).toArray();
350
- return result.length == 1 ? result[0] : result;
351
- }
352
- }
353
277
  return await this.contract.getFunction("owner()")(overrides || {});
354
278
  } catch (e) {
355
279
  const stack = new Error().stack;
@@ -363,18 +287,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
363
287
  ethCallContext?: EthCallContext
364
288
  ): Promise<string> {
365
289
  try {
366
- if (preparedData?.ethCallResults && ethCallContext) {
367
- const calldata = iface.encodeFunctionData("symbol", []);
368
- const ethCallKey = makeEthCallKey({
369
- context: ethCallContext,
370
- calldata,
371
- });
372
- const ret = preparedData.ethCallResults[ethCallKey];
373
- if (ret) {
374
- const result = iface.decodeFunctionResult("symbol", ret).toArray();
375
- return result.length == 1 ? result[0] : result;
376
- }
377
- }
378
290
  return await this.contract.getFunction("symbol()")(overrides || {});
379
291
  } catch (e) {
380
292
  const stack = new Error().stack;
@@ -388,20 +300,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
388
300
  ethCallContext?: EthCallContext
389
301
  ): Promise<bigint> {
390
302
  try {
391
- if (preparedData?.ethCallResults && ethCallContext) {
392
- const calldata = iface.encodeFunctionData("totalSupply", []);
393
- const ethCallKey = makeEthCallKey({
394
- context: ethCallContext,
395
- calldata,
396
- });
397
- const ret = preparedData.ethCallResults[ethCallKey];
398
- if (ret) {
399
- const result = iface
400
- .decodeFunctionResult("totalSupply", ret)
401
- .toArray();
402
- return result.length == 1 ? result[0] : result;
403
- }
404
- }
405
303
  return await this.contract.getFunction("totalSupply()")(overrides || {});
406
304
  } catch (e) {
407
305
  const stack = new Error().stack;
@@ -420,21 +318,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
420
318
  ethCallContext?: EthCallContext
421
319
  ): Promise<boolean> {
422
320
  try {
423
- if (preparedData?.ethCallResults && ethCallContext) {
424
- const calldata = iface.encodeFunctionData("approve", [
425
- spender,
426
- amount,
427
- ]);
428
- const ethCallKey = makeEthCallKey({
429
- context: ethCallContext,
430
- calldata,
431
- });
432
- const ret = preparedData.ethCallResults[ethCallKey];
433
- if (ret) {
434
- const result = iface.decodeFunctionResult("approve", ret).toArray();
435
- return result.length == 1 ? result[0] : result;
436
- }
437
- }
438
321
  return await this.contract
439
322
  .getFunction("approve(address,uint256)")
440
323
  .staticCall(spender, amount, overrides || {});
@@ -450,18 +333,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
450
333
  ethCallContext?: EthCallContext
451
334
  ): Promise<void> {
452
335
  try {
453
- if (preparedData?.ethCallResults && ethCallContext) {
454
- const calldata = iface.encodeFunctionData("burn", [amount]);
455
- const ethCallKey = makeEthCallKey({
456
- context: ethCallContext,
457
- calldata,
458
- });
459
- const ret = preparedData.ethCallResults[ethCallKey];
460
- if (ret) {
461
- const result = iface.decodeFunctionResult("burn", ret).toArray();
462
- return result.length == 1 ? result[0] : result;
463
- }
464
- }
465
336
  return await this.contract
466
337
  .getFunction("burn(uint256)")
467
338
  .staticCall(amount, overrides || {});
@@ -478,23 +349,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
478
349
  ethCallContext?: EthCallContext
479
350
  ): Promise<void> {
480
351
  try {
481
- if (preparedData?.ethCallResults && ethCallContext) {
482
- const calldata = iface.encodeFunctionData("burnFrom", [
483
- account,
484
- amount,
485
- ]);
486
- const ethCallKey = makeEthCallKey({
487
- context: ethCallContext,
488
- calldata,
489
- });
490
- const ret = preparedData.ethCallResults[ethCallKey];
491
- if (ret) {
492
- const result = iface
493
- .decodeFunctionResult("burnFrom", ret)
494
- .toArray();
495
- return result.length == 1 ? result[0] : result;
496
- }
497
- }
498
352
  return await this.contract
499
353
  .getFunction("burnFrom(address,uint256)")
500
354
  .staticCall(account, amount, overrides || {});
@@ -511,23 +365,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
511
365
  ethCallContext?: EthCallContext
512
366
  ): Promise<boolean> {
513
367
  try {
514
- if (preparedData?.ethCallResults && ethCallContext) {
515
- const calldata = iface.encodeFunctionData("decreaseAllowance", [
516
- spender,
517
- subtractedValue,
518
- ]);
519
- const ethCallKey = makeEthCallKey({
520
- context: ethCallContext,
521
- calldata,
522
- });
523
- const ret = preparedData.ethCallResults[ethCallKey];
524
- if (ret) {
525
- const result = iface
526
- .decodeFunctionResult("decreaseAllowance", ret)
527
- .toArray();
528
- return result.length == 1 ? result[0] : result;
529
- }
530
- }
531
368
  return await this.contract
532
369
  .getFunction("decreaseAllowance(address,uint256)")
533
370
  .staticCall(spender, subtractedValue, overrides || {});
@@ -544,23 +381,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
544
381
  ethCallContext?: EthCallContext
545
382
  ): Promise<boolean> {
546
383
  try {
547
- if (preparedData?.ethCallResults && ethCallContext) {
548
- const calldata = iface.encodeFunctionData("increaseAllowance", [
549
- spender,
550
- addedValue,
551
- ]);
552
- const ethCallKey = makeEthCallKey({
553
- context: ethCallContext,
554
- calldata,
555
- });
556
- const ret = preparedData.ethCallResults[ethCallKey];
557
- if (ret) {
558
- const result = iface
559
- .decodeFunctionResult("increaseAllowance", ret)
560
- .toArray();
561
- return result.length == 1 ? result[0] : result;
562
- }
563
- }
564
384
  return await this.contract
565
385
  .getFunction("increaseAllowance(address,uint256)")
566
386
  .staticCall(spender, addedValue, overrides || {});
@@ -575,20 +395,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
575
395
  ethCallContext?: EthCallContext
576
396
  ): Promise<void> {
577
397
  try {
578
- if (preparedData?.ethCallResults && ethCallContext) {
579
- const calldata = iface.encodeFunctionData("renounceOwnership", []);
580
- const ethCallKey = makeEthCallKey({
581
- context: ethCallContext,
582
- calldata,
583
- });
584
- const ret = preparedData.ethCallResults[ethCallKey];
585
- if (ret) {
586
- const result = iface
587
- .decodeFunctionResult("renounceOwnership", ret)
588
- .toArray();
589
- return result.length == 1 ? result[0] : result;
590
- }
591
- }
592
398
  return await this.contract
593
399
  .getFunction("renounceOwnership()")
594
400
  .staticCall(overrides || {});
@@ -604,20 +410,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
604
410
  ethCallContext?: EthCallContext
605
411
  ): Promise<void> {
606
412
  try {
607
- if (preparedData?.ethCallResults && ethCallContext) {
608
- const calldata = iface.encodeFunctionData("setLocker", [_locker]);
609
- const ethCallKey = makeEthCallKey({
610
- context: ethCallContext,
611
- calldata,
612
- });
613
- const ret = preparedData.ethCallResults[ethCallKey];
614
- if (ret) {
615
- const result = iface
616
- .decodeFunctionResult("setLocker", ret)
617
- .toArray();
618
- return result.length == 1 ? result[0] : result;
619
- }
620
- }
621
413
  return await this.contract
622
414
  .getFunction("setLocker(address)")
623
415
  .staticCall(_locker, overrides || {});
@@ -634,23 +426,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
634
426
  ethCallContext?: EthCallContext
635
427
  ): Promise<boolean> {
636
428
  try {
637
- if (preparedData?.ethCallResults && ethCallContext) {
638
- const calldata = iface.encodeFunctionData("transfer", [
639
- recipient,
640
- amount,
641
- ]);
642
- const ethCallKey = makeEthCallKey({
643
- context: ethCallContext,
644
- calldata,
645
- });
646
- const ret = preparedData.ethCallResults[ethCallKey];
647
- if (ret) {
648
- const result = iface
649
- .decodeFunctionResult("transfer", ret)
650
- .toArray();
651
- return result.length == 1 ? result[0] : result;
652
- }
653
- }
654
429
  return await this.contract
655
430
  .getFunction("transfer(address,uint256)")
656
431
  .staticCall(recipient, amount, overrides || {});
@@ -668,24 +443,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
668
443
  ethCallContext?: EthCallContext
669
444
  ): Promise<boolean> {
670
445
  try {
671
- if (preparedData?.ethCallResults && ethCallContext) {
672
- const calldata = iface.encodeFunctionData("transferFrom", [
673
- sender,
674
- recipient,
675
- amount,
676
- ]);
677
- const ethCallKey = makeEthCallKey({
678
- context: ethCallContext,
679
- calldata,
680
- });
681
- const ret = preparedData.ethCallResults[ethCallKey];
682
- if (ret) {
683
- const result = iface
684
- .decodeFunctionResult("transferFrom", ret)
685
- .toArray();
686
- return result.length == 1 ? result[0] : result;
687
- }
688
- }
689
446
  return await this.contract
690
447
  .getFunction("transferFrom(address,address,uint256)")
691
448
  .staticCall(sender, recipient, amount, overrides || {});
@@ -701,22 +458,6 @@ export class ERC20ContractView extends ContractView<ERC20> {
701
458
  ethCallContext?: EthCallContext
702
459
  ): Promise<void> {
703
460
  try {
704
- if (preparedData?.ethCallResults && ethCallContext) {
705
- const calldata = iface.encodeFunctionData("transferOwnership", [
706
- newOwner,
707
- ]);
708
- const ethCallKey = makeEthCallKey({
709
- context: ethCallContext,
710
- calldata,
711
- });
712
- const ret = preparedData.ethCallResults[ethCallKey];
713
- if (ret) {
714
- const result = iface
715
- .decodeFunctionResult("transferOwnership", ret)
716
- .toArray();
717
- return result.length == 1 ? result[0] : result;
718
- }
719
- }
720
461
  return await this.contract
721
462
  .getFunction("transferOwnership(address)")
722
463
  .staticCall(newOwner, 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
 
@@ -123,18 +122,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
123
122
  ethCallContext?: EthCallContext
124
123
  ): Promise<string> {
125
124
  try {
126
- if (preparedData?.ethCallResults && ethCallContext) {
127
- const calldata = iface.encodeFunctionData("name", []);
128
- const ethCallKey = makeEthCallKey({
129
- context: ethCallContext,
130
- calldata,
131
- });
132
- const ret = preparedData.ethCallResults[ethCallKey];
133
- if (ret) {
134
- const result = iface.decodeFunctionResult("name", ret).toArray();
135
- return result.length == 1 ? result[0] : result;
136
- }
137
- }
138
125
  return await this.contract.getFunction("name()")(overrides || {});
139
126
  } catch (e) {
140
127
  const stack = new Error().stack;
@@ -148,20 +135,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
148
135
  ethCallContext?: EthCallContext
149
136
  ): Promise<bigint> {
150
137
  try {
151
- if (preparedData?.ethCallResults && ethCallContext) {
152
- const calldata = iface.encodeFunctionData("totalSupply", []);
153
- const ethCallKey = makeEthCallKey({
154
- context: ethCallContext,
155
- calldata,
156
- });
157
- const ret = preparedData.ethCallResults[ethCallKey];
158
- if (ret) {
159
- const result = iface
160
- .decodeFunctionResult("totalSupply", ret)
161
- .toArray();
162
- return result.length == 1 ? result[0] : result;
163
- }
164
- }
165
138
  return await this.contract.getFunction("totalSupply()")(overrides || {});
166
139
  } catch (e) {
167
140
  const stack = new Error().stack;
@@ -175,18 +148,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
175
148
  ethCallContext?: EthCallContext
176
149
  ): Promise<bigint> {
177
150
  try {
178
- if (preparedData?.ethCallResults && ethCallContext) {
179
- const calldata = iface.encodeFunctionData("decimals", []);
180
- const ethCallKey = makeEthCallKey({
181
- context: ethCallContext,
182
- calldata,
183
- });
184
- const ret = preparedData.ethCallResults[ethCallKey];
185
- if (ret) {
186
- const result = iface.decodeFunctionResult("decimals", ret).toArray();
187
- return result.length == 1 ? result[0] : result;
188
- }
189
- }
190
151
  return await this.contract.getFunction("decimals()")(overrides || {});
191
152
  } catch (e) {
192
153
  const stack = new Error().stack;
@@ -201,18 +162,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
201
162
  ethCallContext?: EthCallContext
202
163
  ): Promise<bigint> {
203
164
  try {
204
- if (preparedData?.ethCallResults && ethCallContext) {
205
- const calldata = iface.encodeFunctionData("balanceOf", [who]);
206
- const ethCallKey = makeEthCallKey({
207
- context: ethCallContext,
208
- calldata,
209
- });
210
- const ret = preparedData.ethCallResults[ethCallKey];
211
- if (ret) {
212
- const result = iface.decodeFunctionResult("balanceOf", ret).toArray();
213
- return result.length == 1 ? result[0] : result;
214
- }
215
- }
216
165
  return await this.contract.getFunction("balanceOf(address)")(
217
166
  who,
218
167
  overrides || {}
@@ -229,18 +178,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
229
178
  ethCallContext?: EthCallContext
230
179
  ): Promise<string> {
231
180
  try {
232
- if (preparedData?.ethCallResults && ethCallContext) {
233
- const calldata = iface.encodeFunctionData("symbol", []);
234
- const ethCallKey = makeEthCallKey({
235
- context: ethCallContext,
236
- calldata,
237
- });
238
- const ret = preparedData.ethCallResults[ethCallKey];
239
- if (ret) {
240
- const result = iface.decodeFunctionResult("symbol", ret).toArray();
241
- return result.length == 1 ? result[0] : result;
242
- }
243
- }
244
181
  return await this.contract.getFunction("symbol()")(overrides || {});
245
182
  } catch (e) {
246
183
  const stack = new Error().stack;
@@ -256,21 +193,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
256
193
  ethCallContext?: EthCallContext
257
194
  ): Promise<bigint> {
258
195
  try {
259
- if (preparedData?.ethCallResults && ethCallContext) {
260
- const calldata = iface.encodeFunctionData("allowance", [
261
- owner,
262
- spender,
263
- ]);
264
- const ethCallKey = makeEthCallKey({
265
- context: ethCallContext,
266
- calldata,
267
- });
268
- const ret = preparedData.ethCallResults[ethCallKey];
269
- if (ret) {
270
- const result = iface.decodeFunctionResult("allowance", ret).toArray();
271
- return result.length == 1 ? result[0] : result;
272
- }
273
- }
274
196
  return await this.contract.getFunction("allowance(address,address)")(
275
197
  owner,
276
198
  spender,
@@ -293,21 +215,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
293
215
  ethCallContext?: EthCallContext
294
216
  ): Promise<boolean> {
295
217
  try {
296
- if (preparedData?.ethCallResults && ethCallContext) {
297
- const calldata = iface.encodeFunctionData("approve", [
298
- spender,
299
- value,
300
- ]);
301
- const ethCallKey = makeEthCallKey({
302
- context: ethCallContext,
303
- calldata,
304
- });
305
- const ret = preparedData.ethCallResults[ethCallKey];
306
- if (ret) {
307
- const result = iface.decodeFunctionResult("approve", ret).toArray();
308
- return result.length == 1 ? result[0] : result;
309
- }
310
- }
311
218
  return await this.contract
312
219
  .getFunction("approve(address,uint256)")
313
220
  .staticCall(spender, value, overrides || {});
@@ -325,24 +232,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
325
232
  ethCallContext?: EthCallContext
326
233
  ): Promise<boolean> {
327
234
  try {
328
- if (preparedData?.ethCallResults && ethCallContext) {
329
- const calldata = iface.encodeFunctionData("transferFrom", [
330
- from,
331
- to,
332
- value,
333
- ]);
334
- const ethCallKey = makeEthCallKey({
335
- context: ethCallContext,
336
- calldata,
337
- });
338
- const ret = preparedData.ethCallResults[ethCallKey];
339
- if (ret) {
340
- const result = iface
341
- .decodeFunctionResult("transferFrom", ret)
342
- .toArray();
343
- return result.length == 1 ? result[0] : result;
344
- }
345
- }
346
235
  return await this.contract
347
236
  .getFunction("transferFrom(address,address,uint256)")
348
237
  .staticCall(from, to, value, overrides || {});
@@ -359,20 +248,6 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
359
248
  ethCallContext?: EthCallContext
360
249
  ): Promise<boolean> {
361
250
  try {
362
- if (preparedData?.ethCallResults && ethCallContext) {
363
- const calldata = iface.encodeFunctionData("transfer", [to, value]);
364
- const ethCallKey = makeEthCallKey({
365
- context: ethCallContext,
366
- calldata,
367
- });
368
- const ret = preparedData.ethCallResults[ethCallKey];
369
- if (ret) {
370
- const result = iface
371
- .decodeFunctionResult("transfer", ret)
372
- .toArray();
373
- return result.length == 1 ? result[0] : result;
374
- }
375
- }
376
251
  return await this.contract
377
252
  .getFunction("transfer(address,uint256)")
378
253
  .staticCall(to, value, overrides || {});