@sentio/sdk 2.45.3-rc.1 → 2.45.3

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 (49) hide show
  1. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts +23 -23
  2. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
  3. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +93 -659
  4. package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
  5. package/lib/eth/builtin/internal/erc1155-processor.d.ts +8 -8
  6. package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
  7. package/lib/eth/builtin/internal/erc1155-processor.js +33 -264
  8. package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
  9. package/lib/eth/builtin/internal/erc20-processor.d.ts +18 -18
  10. package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
  11. package/lib/eth/builtin/internal/erc20-processor.js +75 -538
  12. package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
  13. package/lib/eth/builtin/internal/erc20bytes-processor.d.ts +9 -9
  14. package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
  15. package/lib/eth/builtin/internal/erc20bytes-processor.js +37 -268
  16. package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
  17. package/lib/eth/builtin/internal/erc721-processor.d.ts +14 -14
  18. package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
  19. package/lib/eth/builtin/internal/erc721-processor.js +57 -430
  20. package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
  21. package/lib/eth/builtin/internal/weth9-processor.d.ts +11 -11
  22. package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
  23. package/lib/eth/builtin/internal/weth9-processor.js +45 -321
  24. package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
  25. package/lib/eth/codegen/file.d.ts.map +1 -1
  26. package/lib/eth/codegen/file.js +3 -6
  27. package/lib/eth/codegen/file.js.map +1 -1
  28. package/lib/eth/codegen/function-calls.d.ts.map +1 -1
  29. package/lib/eth/codegen/function-calls.js +5 -27
  30. package/lib/eth/codegen/function-calls.js.map +1 -1
  31. package/lib/eth/context.d.ts +4 -2
  32. package/lib/eth/context.d.ts.map +1 -1
  33. package/lib/eth/context.js +15 -0
  34. package/lib/eth/context.js.map +1 -1
  35. package/lib/eth/eth.d.ts +2 -0
  36. package/lib/eth/eth.d.ts.map +1 -1
  37. package/lib/eth/eth.js +15 -1
  38. package/lib/eth/eth.js.map +1 -1
  39. package/package.json +3 -3
  40. package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +189 -662
  41. package/src/eth/builtin/internal/erc1155-processor.ts +69 -261
  42. package/src/eth/builtin/internal/erc20-processor.ts +136 -535
  43. package/src/eth/builtin/internal/erc20bytes-processor.ts +68 -265
  44. package/src/eth/builtin/internal/erc721-processor.ts +118 -433
  45. package/src/eth/builtin/internal/weth9-processor.ts +81 -318
  46. package/src/eth/codegen/file.ts +2 -6
  47. package/src/eth/codegen/function-calls.ts +7 -29
  48. package/src/eth/context.ts +19 -2
  49. package/src/eth/eth.ts +21 -1
@@ -1,7 +1,7 @@
1
1
  /* Autogenerated file. Do not edit manually. */
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
- import { BigNumberish, Overrides, Interface } from "ethers";
4
+ import { BigNumberish, Overrides } from "ethers";
5
5
  import {
6
6
  addContractByABI,
7
7
  getContractByABI,
@@ -21,6 +21,7 @@ import {
21
21
  EthContext,
22
22
  EthFetchConfig,
23
23
  PreprocessResult,
24
+ encodeCallData,
24
25
  } from "@sentio/sdk/eth";
25
26
  import { EthCallParam, EthCallContext, PreparedData } from "@sentio/protos";
26
27
 
@@ -98,18 +99,6 @@ export type AllowanceCallTrace = TypedCallTrace<
98
99
 
99
100
  const templateContract = ERC20Bytes__factory.connect("0x0", DummyProvider);
100
101
 
101
- const iface = new Interface([
102
- "function name() view returns (bytes32)",
103
- "function approve(address spender, uint256 value) returns (bool)",
104
- "function totalSupply() view returns (uint256)",
105
- "function transferFrom(address from, address to, uint256 value) returns (bool)",
106
- "function decimals() view returns (uint8)",
107
- "function balanceOf(address who) view returns (uint256)",
108
- "function symbol() view returns (bytes32)",
109
- "function transfer(address to, uint256 value) returns (bool)",
110
- "function allowance(address owner, address spender) view returns (uint256)",
111
- ]);
112
-
113
102
  export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
114
103
  constructor(contract: ERC20Bytes) {
115
104
  super(contract);
@@ -259,148 +248,79 @@ export class ERC20BytesContractView extends ContractView<ERC20Bytes> {
259
248
  };
260
249
 
261
250
  encodeCall = {
262
- name(ethCallContext: EthCallContext): EthCallParam {
263
- try {
264
- const iface = new Interface(["function name()"]);
265
- const calldata = iface.encodeFunctionData("name", []);
266
- return {
267
- context: ethCallContext,
268
- calldata,
269
- };
270
- } catch (e) {
271
- const stack = new Error().stack;
272
- throw transformEtherError(e, undefined, stack);
273
- }
251
+ name(callContext: EthCallContext): EthCallParam {
252
+ return encodeCallData(callContext, "name", "function name()", []);
274
253
  },
275
254
  approve(
276
255
  spender: string,
277
256
  value: BigNumberish,
278
- ethCallContext: EthCallContext,
257
+ callContext: EthCallContext,
279
258
  ): EthCallParam {
280
- try {
281
- const iface = new Interface(["function approve(address,uint256)"]);
282
- const calldata = iface.encodeFunctionData("approve", [spender, value]);
283
- return {
284
- context: ethCallContext,
285
- calldata,
286
- };
287
- } catch (e) {
288
- const stack = new Error().stack;
289
- throw transformEtherError(e, undefined, stack);
290
- }
259
+ return encodeCallData(
260
+ callContext,
261
+ "approve",
262
+ "function approve(address,uint256)",
263
+ [spender, value],
264
+ );
291
265
  },
292
- totalSupply(ethCallContext: EthCallContext): EthCallParam {
293
- try {
294
- const iface = new Interface(["function totalSupply()"]);
295
- const calldata = iface.encodeFunctionData("totalSupply", []);
296
- return {
297
- context: ethCallContext,
298
- calldata,
299
- };
300
- } catch (e) {
301
- const stack = new Error().stack;
302
- throw transformEtherError(e, undefined, stack);
303
- }
266
+ totalSupply(callContext: EthCallContext): EthCallParam {
267
+ return encodeCallData(
268
+ callContext,
269
+ "totalSupply",
270
+ "function totalSupply()",
271
+ [],
272
+ );
304
273
  },
305
274
  transferFrom(
306
275
  from: string,
307
276
  to: string,
308
277
  value: BigNumberish,
309
- ethCallContext: EthCallContext,
278
+ callContext: EthCallContext,
310
279
  ): EthCallParam {
311
- try {
312
- const iface = new Interface([
313
- "function transferFrom(address,address,uint256)",
314
- ]);
315
- const calldata = iface.encodeFunctionData("transferFrom", [
316
- from,
317
- to,
318
- value,
319
- ]);
320
- return {
321
- context: ethCallContext,
322
- calldata,
323
- };
324
- } catch (e) {
325
- const stack = new Error().stack;
326
- throw transformEtherError(e, undefined, stack);
327
- }
280
+ return encodeCallData(
281
+ callContext,
282
+ "transferFrom",
283
+ "function transferFrom(address,address,uint256)",
284
+ [from, to, value],
285
+ );
328
286
  },
329
- decimals(ethCallContext: EthCallContext): EthCallParam {
330
- try {
331
- const iface = new Interface(["function decimals()"]);
332
- const calldata = iface.encodeFunctionData("decimals", []);
333
- return {
334
- context: ethCallContext,
335
- calldata,
336
- };
337
- } catch (e) {
338
- const stack = new Error().stack;
339
- throw transformEtherError(e, undefined, stack);
340
- }
287
+ decimals(callContext: EthCallContext): EthCallParam {
288
+ return encodeCallData(callContext, "decimals", "function decimals()", []);
341
289
  },
342
- balanceOf(who: string, ethCallContext: EthCallContext): EthCallParam {
343
- try {
344
- const iface = new Interface(["function balanceOf(address)"]);
345
- const calldata = iface.encodeFunctionData("balanceOf", [who]);
346
- return {
347
- context: ethCallContext,
348
- calldata,
349
- };
350
- } catch (e) {
351
- const stack = new Error().stack;
352
- throw transformEtherError(e, undefined, stack);
353
- }
290
+ balanceOf(who: string, callContext: EthCallContext): EthCallParam {
291
+ return encodeCallData(
292
+ callContext,
293
+ "balanceOf",
294
+ "function balanceOf(address)",
295
+ [who],
296
+ );
354
297
  },
355
- symbol(ethCallContext: EthCallContext): EthCallParam {
356
- try {
357
- const iface = new Interface(["function symbol()"]);
358
- const calldata = iface.encodeFunctionData("symbol", []);
359
- return {
360
- context: ethCallContext,
361
- calldata,
362
- };
363
- } catch (e) {
364
- const stack = new Error().stack;
365
- throw transformEtherError(e, undefined, stack);
366
- }
298
+ symbol(callContext: EthCallContext): EthCallParam {
299
+ return encodeCallData(callContext, "symbol", "function symbol()", []);
367
300
  },
368
301
  transfer(
369
302
  to: string,
370
303
  value: BigNumberish,
371
- ethCallContext: EthCallContext,
304
+ callContext: EthCallContext,
372
305
  ): EthCallParam {
373
- try {
374
- const iface = new Interface(["function transfer(address,uint256)"]);
375
- const calldata = iface.encodeFunctionData("transfer", [to, value]);
376
- return {
377
- context: ethCallContext,
378
- calldata,
379
- };
380
- } catch (e) {
381
- const stack = new Error().stack;
382
- throw transformEtherError(e, undefined, stack);
383
- }
306
+ return encodeCallData(
307
+ callContext,
308
+ "transfer",
309
+ "function transfer(address,uint256)",
310
+ [to, value],
311
+ );
384
312
  },
385
313
  allowance(
386
314
  owner: string,
387
315
  spender: string,
388
- ethCallContext: EthCallContext,
316
+ callContext: EthCallContext,
389
317
  ): EthCallParam {
390
- try {
391
- const iface = new Interface(["function allowance(address,address)"]);
392
- const calldata = iface.encodeFunctionData("allowance", [
393
- owner,
394
- spender,
395
- ]);
396
- return {
397
- context: ethCallContext,
398
- calldata,
399
- };
400
- } catch (e) {
401
- const stack = new Error().stack;
402
- throw transformEtherError(e, undefined, stack);
403
- }
318
+ return encodeCallData(
319
+ callContext,
320
+ "allowance",
321
+ "function allowance(address,address)",
322
+ [owner, spender],
323
+ );
404
324
  },
405
325
  };
406
326
  }
@@ -410,59 +330,39 @@ export class ERC20BytesBoundContractView extends BoundContractView<
410
330
  ERC20BytesContractView
411
331
  > {
412
332
  async name(overrides?: Overrides): Promise<string> {
413
- const ethCallContext = {
414
- chainId: this.context.chainId,
415
- blockTag: "0x" + this.context.blockNumber.toString(16),
416
- address: this.context.address,
417
- };
418
333
  return await this.view.name(
419
334
  {
420
335
  blockTag: this.context.blockNumber,
421
336
  ...overrides,
422
337
  },
423
338
  this.context.preparedData,
424
- ethCallContext,
339
+ this.context.getEthCallContext(),
425
340
  );
426
341
  }
427
342
 
428
343
  async totalSupply(overrides?: Overrides): Promise<bigint> {
429
- const ethCallContext = {
430
- chainId: this.context.chainId,
431
- blockTag: "0x" + this.context.blockNumber.toString(16),
432
- address: this.context.address,
433
- };
434
344
  return await this.view.totalSupply(
435
345
  {
436
346
  blockTag: this.context.blockNumber,
437
347
  ...overrides,
438
348
  },
439
349
  this.context.preparedData,
440
- ethCallContext,
350
+ this.context.getEthCallContext(),
441
351
  );
442
352
  }
443
353
 
444
354
  async decimals(overrides?: Overrides): Promise<bigint> {
445
- const ethCallContext = {
446
- chainId: this.context.chainId,
447
- blockTag: "0x" + this.context.blockNumber.toString(16),
448
- address: this.context.address,
449
- };
450
355
  return await this.view.decimals(
451
356
  {
452
357
  blockTag: this.context.blockNumber,
453
358
  ...overrides,
454
359
  },
455
360
  this.context.preparedData,
456
- ethCallContext,
361
+ this.context.getEthCallContext(),
457
362
  );
458
363
  }
459
364
 
460
365
  async balanceOf(who: string, overrides?: Overrides): Promise<bigint> {
461
- const ethCallContext = {
462
- chainId: this.context.chainId,
463
- blockTag: "0x" + this.context.blockNumber.toString(16),
464
- address: this.context.address,
465
- };
466
366
  return await this.view.balanceOf(
467
367
  who,
468
368
  {
@@ -470,23 +370,18 @@ export class ERC20BytesBoundContractView extends BoundContractView<
470
370
  ...overrides,
471
371
  },
472
372
  this.context.preparedData,
473
- ethCallContext,
373
+ this.context.getEthCallContext(),
474
374
  );
475
375
  }
476
376
 
477
377
  async symbol(overrides?: Overrides): Promise<string> {
478
- const ethCallContext = {
479
- chainId: this.context.chainId,
480
- blockTag: "0x" + this.context.blockNumber.toString(16),
481
- address: this.context.address,
482
- };
483
378
  return await this.view.symbol(
484
379
  {
485
380
  blockTag: this.context.blockNumber,
486
381
  ...overrides,
487
382
  },
488
383
  this.context.preparedData,
489
- ethCallContext,
384
+ this.context.getEthCallContext(),
490
385
  );
491
386
  }
492
387
 
@@ -495,11 +390,6 @@ export class ERC20BytesBoundContractView extends BoundContractView<
495
390
  spender: string,
496
391
  overrides?: Overrides,
497
392
  ): Promise<bigint> {
498
- const ethCallContext = {
499
- chainId: this.context.chainId,
500
- blockTag: "0x" + this.context.blockNumber.toString(16),
501
- address: this.context.address,
502
- };
503
393
  return await this.view.allowance(
504
394
  owner,
505
395
  spender,
@@ -508,7 +398,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
508
398
  ...overrides,
509
399
  },
510
400
  this.context.preparedData,
511
- ethCallContext,
401
+ this.context.getEthCallContext(),
512
402
  );
513
403
  }
514
404
 
@@ -521,11 +411,6 @@ export class ERC20BytesBoundContractView extends BoundContractView<
521
411
  value: BigNumberish,
522
412
  overrides?: Overrides,
523
413
  ): Promise<boolean> {
524
- const ethCallContext = {
525
- chainId: this.context.chainId,
526
- blockTag: "0x" + this.context.blockNumber.toString(16),
527
- address: this.context.address,
528
- };
529
414
  return await this.view.callStatic.approve(
530
415
  spender,
531
416
  value,
@@ -534,7 +419,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
534
419
  ...overrides,
535
420
  },
536
421
  this.context.preparedData,
537
- ethCallContext,
422
+ this.context.getEthCallContext(),
538
423
  );
539
424
  },
540
425
  async transferFrom(
@@ -543,11 +428,6 @@ export class ERC20BytesBoundContractView extends BoundContractView<
543
428
  value: BigNumberish,
544
429
  overrides?: Overrides,
545
430
  ): Promise<boolean> {
546
- const ethCallContext = {
547
- chainId: this.context.chainId,
548
- blockTag: "0x" + this.context.blockNumber.toString(16),
549
- address: this.context.address,
550
- };
551
431
  return await this.view.callStatic.transferFrom(
552
432
  from,
553
433
  to,
@@ -557,7 +437,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
557
437
  ...overrides,
558
438
  },
559
439
  this.context.preparedData,
560
- ethCallContext,
440
+ this.context.getEthCallContext(),
561
441
  );
562
442
  },
563
443
  async transfer(
@@ -565,11 +445,6 @@ export class ERC20BytesBoundContractView extends BoundContractView<
565
445
  value: BigNumberish,
566
446
  overrides?: Overrides,
567
447
  ): Promise<boolean> {
568
- const ethCallContext = {
569
- chainId: this.context.chainId,
570
- blockTag: "0x" + this.context.blockNumber.toString(16),
571
- address: this.context.address,
572
- };
573
448
  return await this.view.callStatic.transfer(
574
449
  to,
575
450
  value,
@@ -578,7 +453,7 @@ export class ERC20BytesBoundContractView extends BoundContractView<
578
453
  ...overrides,
579
454
  },
580
455
  this.context.preparedData,
581
- ethCallContext,
456
+ this.context.getEthCallContext(),
582
457
  );
583
458
  },
584
459
  };
@@ -588,18 +463,10 @@ export class ERC20BytesBoundContractView extends BoundContractView<
588
463
  context: this.context,
589
464
 
590
465
  name(overrides?: Overrides): EthCallParam {
591
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
592
- if (overrides?.blockTag) {
593
- blockTagWithOverride =
594
- typeof overrides.blockTag == "string"
595
- ? overrides.blockTag
596
- : "0x" + overrides.blockTag.toString(16);
597
- }
598
-
599
466
  return this.view.encodeCall.name({
600
467
  chainId: this.context.chainId.toString(),
601
468
  address: this.context.address,
602
- blockTag: blockTagWithOverride,
469
+ blockTag: this.context.getBlockTag(overrides),
603
470
  });
604
471
  },
605
472
  approve(
@@ -607,33 +474,17 @@ export class ERC20BytesBoundContractView extends BoundContractView<
607
474
  value: BigNumberish,
608
475
  overrides?: Overrides,
609
476
  ): EthCallParam {
610
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
611
- if (overrides?.blockTag) {
612
- blockTagWithOverride =
613
- typeof overrides.blockTag == "string"
614
- ? overrides.blockTag
615
- : "0x" + overrides.blockTag.toString(16);
616
- }
617
-
618
477
  return this.view.encodeCall.approve(spender, value, {
619
478
  chainId: this.context.chainId.toString(),
620
479
  address: this.context.address,
621
- blockTag: blockTagWithOverride,
480
+ blockTag: this.context.getBlockTag(overrides),
622
481
  });
623
482
  },
624
483
  totalSupply(overrides?: Overrides): EthCallParam {
625
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
626
- if (overrides?.blockTag) {
627
- blockTagWithOverride =
628
- typeof overrides.blockTag == "string"
629
- ? overrides.blockTag
630
- : "0x" + overrides.blockTag.toString(16);
631
- }
632
-
633
484
  return this.view.encodeCall.totalSupply({
634
485
  chainId: this.context.chainId.toString(),
635
486
  address: this.context.address,
636
- blockTag: blockTagWithOverride,
487
+ blockTag: this.context.getBlockTag(overrides),
637
488
  });
638
489
  },
639
490
  transferFrom(
@@ -642,63 +493,31 @@ export class ERC20BytesBoundContractView extends BoundContractView<
642
493
  value: BigNumberish,
643
494
  overrides?: Overrides,
644
495
  ): EthCallParam {
645
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
646
- if (overrides?.blockTag) {
647
- blockTagWithOverride =
648
- typeof overrides.blockTag == "string"
649
- ? overrides.blockTag
650
- : "0x" + overrides.blockTag.toString(16);
651
- }
652
-
653
496
  return this.view.encodeCall.transferFrom(from, to, value, {
654
497
  chainId: this.context.chainId.toString(),
655
498
  address: this.context.address,
656
- blockTag: blockTagWithOverride,
499
+ blockTag: this.context.getBlockTag(overrides),
657
500
  });
658
501
  },
659
502
  decimals(overrides?: Overrides): EthCallParam {
660
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
661
- if (overrides?.blockTag) {
662
- blockTagWithOverride =
663
- typeof overrides.blockTag == "string"
664
- ? overrides.blockTag
665
- : "0x" + overrides.blockTag.toString(16);
666
- }
667
-
668
503
  return this.view.encodeCall.decimals({
669
504
  chainId: this.context.chainId.toString(),
670
505
  address: this.context.address,
671
- blockTag: blockTagWithOverride,
506
+ blockTag: this.context.getBlockTag(overrides),
672
507
  });
673
508
  },
674
509
  balanceOf(who: string, overrides?: Overrides): EthCallParam {
675
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
676
- if (overrides?.blockTag) {
677
- blockTagWithOverride =
678
- typeof overrides.blockTag == "string"
679
- ? overrides.blockTag
680
- : "0x" + overrides.blockTag.toString(16);
681
- }
682
-
683
510
  return this.view.encodeCall.balanceOf(who, {
684
511
  chainId: this.context.chainId.toString(),
685
512
  address: this.context.address,
686
- blockTag: blockTagWithOverride,
513
+ blockTag: this.context.getBlockTag(overrides),
687
514
  });
688
515
  },
689
516
  symbol(overrides?: Overrides): EthCallParam {
690
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
691
- if (overrides?.blockTag) {
692
- blockTagWithOverride =
693
- typeof overrides.blockTag == "string"
694
- ? overrides.blockTag
695
- : "0x" + overrides.blockTag.toString(16);
696
- }
697
-
698
517
  return this.view.encodeCall.symbol({
699
518
  chainId: this.context.chainId.toString(),
700
519
  address: this.context.address,
701
- blockTag: blockTagWithOverride,
520
+ blockTag: this.context.getBlockTag(overrides),
702
521
  });
703
522
  },
704
523
  transfer(
@@ -706,18 +525,10 @@ export class ERC20BytesBoundContractView extends BoundContractView<
706
525
  value: BigNumberish,
707
526
  overrides?: Overrides,
708
527
  ): EthCallParam {
709
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
710
- if (overrides?.blockTag) {
711
- blockTagWithOverride =
712
- typeof overrides.blockTag == "string"
713
- ? overrides.blockTag
714
- : "0x" + overrides.blockTag.toString(16);
715
- }
716
-
717
528
  return this.view.encodeCall.transfer(to, value, {
718
529
  chainId: this.context.chainId.toString(),
719
530
  address: this.context.address,
720
- blockTag: blockTagWithOverride,
531
+ blockTag: this.context.getBlockTag(overrides),
721
532
  });
722
533
  },
723
534
  allowance(
@@ -725,18 +536,10 @@ export class ERC20BytesBoundContractView extends BoundContractView<
725
536
  spender: string,
726
537
  overrides?: Overrides,
727
538
  ): EthCallParam {
728
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
729
- if (overrides?.blockTag) {
730
- blockTagWithOverride =
731
- typeof overrides.blockTag == "string"
732
- ? overrides.blockTag
733
- : "0x" + overrides.blockTag.toString(16);
734
- }
735
-
736
539
  return this.view.encodeCall.allowance(owner, spender, {
737
540
  chainId: this.context.chainId.toString(),
738
541
  address: this.context.address,
739
- blockTag: blockTagWithOverride,
542
+ blockTag: this.context.getBlockTag(overrides),
740
543
  });
741
544
  },
742
545
  };