@sentio/sdk 2.45.3-rc.1 → 2.45.3-rc.2
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/builtin/internal/eacaggregatorproxy-processor.d.ts +23 -23
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js +93 -659
- package/lib/eth/builtin/internal/eacaggregatorproxy-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.d.ts +8 -8
- package/lib/eth/builtin/internal/erc1155-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc1155-processor.js +33 -264
- package/lib/eth/builtin/internal/erc1155-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.d.ts +18 -18
- package/lib/eth/builtin/internal/erc20-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20-processor.js +75 -538
- package/lib/eth/builtin/internal/erc20-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts +9 -9
- package/lib/eth/builtin/internal/erc20bytes-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc20bytes-processor.js +37 -268
- package/lib/eth/builtin/internal/erc20bytes-processor.js.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.d.ts +14 -14
- package/lib/eth/builtin/internal/erc721-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/erc721-processor.js +57 -430
- package/lib/eth/builtin/internal/erc721-processor.js.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.d.ts +11 -11
- package/lib/eth/builtin/internal/weth9-processor.d.ts.map +1 -1
- package/lib/eth/builtin/internal/weth9-processor.js +45 -321
- package/lib/eth/builtin/internal/weth9-processor.js.map +1 -1
- package/lib/eth/codegen/file.d.ts.map +1 -1
- package/lib/eth/codegen/file.js +3 -6
- package/lib/eth/codegen/file.js.map +1 -1
- package/lib/eth/codegen/function-calls.d.ts.map +1 -1
- package/lib/eth/codegen/function-calls.js +5 -27
- package/lib/eth/codegen/function-calls.js.map +1 -1
- package/lib/eth/context.d.ts +4 -2
- package/lib/eth/context.d.ts.map +1 -1
- package/lib/eth/context.js +15 -0
- package/lib/eth/context.js.map +1 -1
- package/lib/eth/eth.d.ts +2 -0
- package/lib/eth/eth.d.ts.map +1 -1
- package/lib/eth/eth.js +15 -1
- package/lib/eth/eth.js.map +1 -1
- package/package.json +3 -3
- package/src/eth/builtin/internal/eacaggregatorproxy-processor.ts +189 -662
- package/src/eth/builtin/internal/erc1155-processor.ts +69 -261
- package/src/eth/builtin/internal/erc20-processor.ts +136 -535
- package/src/eth/builtin/internal/erc20bytes-processor.ts +68 -265
- package/src/eth/builtin/internal/erc721-processor.ts +118 -433
- package/src/eth/builtin/internal/weth9-processor.ts +81 -318
- package/src/eth/codegen/file.ts +2 -6
- package/src/eth/codegen/function-calls.ts +7 -29
- package/src/eth/context.ts +19 -2
- 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
|
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
|
|
@@ -166,27 +167,6 @@ export type TransferOwnershipCallTrace = TypedCallTrace<
|
|
166
167
|
|
167
168
|
const templateContract = ERC20__factory.connect("0x0", DummyProvider);
|
168
169
|
|
169
|
-
const iface = new Interface([
|
170
|
-
"function allowance(address owner, address spender) view returns (uint256)",
|
171
|
-
"function approve(address spender, uint256 amount) returns (bool)",
|
172
|
-
"function balanceOf(address account) view returns (uint256)",
|
173
|
-
"function burn(uint256 amount) returns ()",
|
174
|
-
"function burnFrom(address account, uint256 amount) returns ()",
|
175
|
-
"function decimals() view returns (uint8)",
|
176
|
-
"function decreaseAllowance(address spender, uint256 subtractedValue) returns (bool)",
|
177
|
-
"function increaseAllowance(address spender, uint256 addedValue) returns (bool)",
|
178
|
-
"function locker() view returns (address)",
|
179
|
-
"function name() view returns (string)",
|
180
|
-
"function owner() view returns (address)",
|
181
|
-
"function renounceOwnership() returns ()",
|
182
|
-
"function setLocker(address _locker) returns ()",
|
183
|
-
"function symbol() view returns (string)",
|
184
|
-
"function totalSupply() view returns (uint256)",
|
185
|
-
"function transfer(address recipient, uint256 amount) returns (bool)",
|
186
|
-
"function transferFrom(address sender, address recipient, uint256 amount) returns (bool)",
|
187
|
-
"function transferOwnership(address newOwner) returns ()",
|
188
|
-
]);
|
189
|
-
|
190
170
|
export class ERC20ContractView extends ContractView<ERC20> {
|
191
171
|
constructor(contract: ERC20) {
|
192
172
|
super(contract);
|
@@ -472,295 +452,150 @@ export class ERC20ContractView extends ContractView<ERC20> {
|
|
472
452
|
allowance(
|
473
453
|
owner: string,
|
474
454
|
spender: string,
|
475
|
-
|
455
|
+
callContext: EthCallContext,
|
476
456
|
): EthCallParam {
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
return {
|
484
|
-
context: ethCallContext,
|
485
|
-
calldata,
|
486
|
-
};
|
487
|
-
} catch (e) {
|
488
|
-
const stack = new Error().stack;
|
489
|
-
throw transformEtherError(e, undefined, stack);
|
490
|
-
}
|
457
|
+
return encodeCallData(
|
458
|
+
callContext,
|
459
|
+
"allowance",
|
460
|
+
"function allowance(address,address)",
|
461
|
+
[owner, spender],
|
462
|
+
);
|
491
463
|
},
|
492
464
|
approve(
|
493
465
|
spender: string,
|
494
466
|
amount: BigNumberish,
|
495
|
-
|
467
|
+
callContext: EthCallContext,
|
496
468
|
): EthCallParam {
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
};
|
504
|
-
} catch (e) {
|
505
|
-
const stack = new Error().stack;
|
506
|
-
throw transformEtherError(e, undefined, stack);
|
507
|
-
}
|
469
|
+
return encodeCallData(
|
470
|
+
callContext,
|
471
|
+
"approve",
|
472
|
+
"function approve(address,uint256)",
|
473
|
+
[spender, amount],
|
474
|
+
);
|
508
475
|
},
|
509
|
-
balanceOf(account: string,
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
};
|
517
|
-
} catch (e) {
|
518
|
-
const stack = new Error().stack;
|
519
|
-
throw transformEtherError(e, undefined, stack);
|
520
|
-
}
|
476
|
+
balanceOf(account: string, callContext: EthCallContext): EthCallParam {
|
477
|
+
return encodeCallData(
|
478
|
+
callContext,
|
479
|
+
"balanceOf",
|
480
|
+
"function balanceOf(address)",
|
481
|
+
[account],
|
482
|
+
);
|
521
483
|
},
|
522
|
-
burn(amount: BigNumberish,
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
return {
|
527
|
-
context: ethCallContext,
|
528
|
-
calldata,
|
529
|
-
};
|
530
|
-
} catch (e) {
|
531
|
-
const stack = new Error().stack;
|
532
|
-
throw transformEtherError(e, undefined, stack);
|
533
|
-
}
|
484
|
+
burn(amount: BigNumberish, callContext: EthCallContext): EthCallParam {
|
485
|
+
return encodeCallData(callContext, "burn", "function burn(uint256)", [
|
486
|
+
amount,
|
487
|
+
]);
|
534
488
|
},
|
535
489
|
burnFrom(
|
536
490
|
account: string,
|
537
491
|
amount: BigNumberish,
|
538
|
-
|
492
|
+
callContext: EthCallContext,
|
539
493
|
): EthCallParam {
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
return {
|
547
|
-
context: ethCallContext,
|
548
|
-
calldata,
|
549
|
-
};
|
550
|
-
} catch (e) {
|
551
|
-
const stack = new Error().stack;
|
552
|
-
throw transformEtherError(e, undefined, stack);
|
553
|
-
}
|
494
|
+
return encodeCallData(
|
495
|
+
callContext,
|
496
|
+
"burnFrom",
|
497
|
+
"function burnFrom(address,uint256)",
|
498
|
+
[account, amount],
|
499
|
+
);
|
554
500
|
},
|
555
|
-
decimals(
|
556
|
-
|
557
|
-
const iface = new Interface(["function decimals()"]);
|
558
|
-
const calldata = iface.encodeFunctionData("decimals", []);
|
559
|
-
return {
|
560
|
-
context: ethCallContext,
|
561
|
-
calldata,
|
562
|
-
};
|
563
|
-
} catch (e) {
|
564
|
-
const stack = new Error().stack;
|
565
|
-
throw transformEtherError(e, undefined, stack);
|
566
|
-
}
|
501
|
+
decimals(callContext: EthCallContext): EthCallParam {
|
502
|
+
return encodeCallData(callContext, "decimals", "function decimals()", []);
|
567
503
|
},
|
568
504
|
decreaseAllowance(
|
569
505
|
spender: string,
|
570
506
|
subtractedValue: BigNumberish,
|
571
|
-
|
507
|
+
callContext: EthCallContext,
|
572
508
|
): EthCallParam {
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
subtractedValue,
|
580
|
-
]);
|
581
|
-
return {
|
582
|
-
context: ethCallContext,
|
583
|
-
calldata,
|
584
|
-
};
|
585
|
-
} catch (e) {
|
586
|
-
const stack = new Error().stack;
|
587
|
-
throw transformEtherError(e, undefined, stack);
|
588
|
-
}
|
509
|
+
return encodeCallData(
|
510
|
+
callContext,
|
511
|
+
"decreaseAllowance",
|
512
|
+
"function decreaseAllowance(address,uint256)",
|
513
|
+
[spender, subtractedValue],
|
514
|
+
);
|
589
515
|
},
|
590
516
|
increaseAllowance(
|
591
517
|
spender: string,
|
592
518
|
addedValue: BigNumberish,
|
593
|
-
|
519
|
+
callContext: EthCallContext,
|
594
520
|
): EthCallParam {
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
addedValue,
|
602
|
-
]);
|
603
|
-
return {
|
604
|
-
context: ethCallContext,
|
605
|
-
calldata,
|
606
|
-
};
|
607
|
-
} catch (e) {
|
608
|
-
const stack = new Error().stack;
|
609
|
-
throw transformEtherError(e, undefined, stack);
|
610
|
-
}
|
521
|
+
return encodeCallData(
|
522
|
+
callContext,
|
523
|
+
"increaseAllowance",
|
524
|
+
"function increaseAllowance(address,uint256)",
|
525
|
+
[spender, addedValue],
|
526
|
+
);
|
611
527
|
},
|
612
|
-
locker(
|
613
|
-
|
614
|
-
const iface = new Interface(["function locker()"]);
|
615
|
-
const calldata = iface.encodeFunctionData("locker", []);
|
616
|
-
return {
|
617
|
-
context: ethCallContext,
|
618
|
-
calldata,
|
619
|
-
};
|
620
|
-
} catch (e) {
|
621
|
-
const stack = new Error().stack;
|
622
|
-
throw transformEtherError(e, undefined, stack);
|
623
|
-
}
|
528
|
+
locker(callContext: EthCallContext): EthCallParam {
|
529
|
+
return encodeCallData(callContext, "locker", "function locker()", []);
|
624
530
|
},
|
625
|
-
name(
|
626
|
-
|
627
|
-
const iface = new Interface(["function name()"]);
|
628
|
-
const calldata = iface.encodeFunctionData("name", []);
|
629
|
-
return {
|
630
|
-
context: ethCallContext,
|
631
|
-
calldata,
|
632
|
-
};
|
633
|
-
} catch (e) {
|
634
|
-
const stack = new Error().stack;
|
635
|
-
throw transformEtherError(e, undefined, stack);
|
636
|
-
}
|
531
|
+
name(callContext: EthCallContext): EthCallParam {
|
532
|
+
return encodeCallData(callContext, "name", "function name()", []);
|
637
533
|
},
|
638
|
-
owner(
|
639
|
-
|
640
|
-
const iface = new Interface(["function owner()"]);
|
641
|
-
const calldata = iface.encodeFunctionData("owner", []);
|
642
|
-
return {
|
643
|
-
context: ethCallContext,
|
644
|
-
calldata,
|
645
|
-
};
|
646
|
-
} catch (e) {
|
647
|
-
const stack = new Error().stack;
|
648
|
-
throw transformEtherError(e, undefined, stack);
|
649
|
-
}
|
534
|
+
owner(callContext: EthCallContext): EthCallParam {
|
535
|
+
return encodeCallData(callContext, "owner", "function owner()", []);
|
650
536
|
},
|
651
|
-
renounceOwnership(
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
};
|
659
|
-
} catch (e) {
|
660
|
-
const stack = new Error().stack;
|
661
|
-
throw transformEtherError(e, undefined, stack);
|
662
|
-
}
|
537
|
+
renounceOwnership(callContext: EthCallContext): EthCallParam {
|
538
|
+
return encodeCallData(
|
539
|
+
callContext,
|
540
|
+
"renounceOwnership",
|
541
|
+
"function renounceOwnership()",
|
542
|
+
[],
|
543
|
+
);
|
663
544
|
},
|
664
|
-
setLocker(_locker: string,
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
};
|
672
|
-
} catch (e) {
|
673
|
-
const stack = new Error().stack;
|
674
|
-
throw transformEtherError(e, undefined, stack);
|
675
|
-
}
|
545
|
+
setLocker(_locker: string, callContext: EthCallContext): EthCallParam {
|
546
|
+
return encodeCallData(
|
547
|
+
callContext,
|
548
|
+
"setLocker",
|
549
|
+
"function setLocker(address)",
|
550
|
+
[_locker],
|
551
|
+
);
|
676
552
|
},
|
677
|
-
symbol(
|
678
|
-
|
679
|
-
const iface = new Interface(["function symbol()"]);
|
680
|
-
const calldata = iface.encodeFunctionData("symbol", []);
|
681
|
-
return {
|
682
|
-
context: ethCallContext,
|
683
|
-
calldata,
|
684
|
-
};
|
685
|
-
} catch (e) {
|
686
|
-
const stack = new Error().stack;
|
687
|
-
throw transformEtherError(e, undefined, stack);
|
688
|
-
}
|
553
|
+
symbol(callContext: EthCallContext): EthCallParam {
|
554
|
+
return encodeCallData(callContext, "symbol", "function symbol()", []);
|
689
555
|
},
|
690
|
-
totalSupply(
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
};
|
698
|
-
} catch (e) {
|
699
|
-
const stack = new Error().stack;
|
700
|
-
throw transformEtherError(e, undefined, stack);
|
701
|
-
}
|
556
|
+
totalSupply(callContext: EthCallContext): EthCallParam {
|
557
|
+
return encodeCallData(
|
558
|
+
callContext,
|
559
|
+
"totalSupply",
|
560
|
+
"function totalSupply()",
|
561
|
+
[],
|
562
|
+
);
|
702
563
|
},
|
703
564
|
transfer(
|
704
565
|
recipient: string,
|
705
566
|
amount: BigNumberish,
|
706
|
-
|
567
|
+
callContext: EthCallContext,
|
707
568
|
): EthCallParam {
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
return {
|
715
|
-
context: ethCallContext,
|
716
|
-
calldata,
|
717
|
-
};
|
718
|
-
} catch (e) {
|
719
|
-
const stack = new Error().stack;
|
720
|
-
throw transformEtherError(e, undefined, stack);
|
721
|
-
}
|
569
|
+
return encodeCallData(
|
570
|
+
callContext,
|
571
|
+
"transfer",
|
572
|
+
"function transfer(address,uint256)",
|
573
|
+
[recipient, amount],
|
574
|
+
);
|
722
575
|
},
|
723
576
|
transferFrom(
|
724
577
|
sender: string,
|
725
578
|
recipient: string,
|
726
579
|
amount: BigNumberish,
|
727
|
-
|
580
|
+
callContext: EthCallContext,
|
728
581
|
): EthCallParam {
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
recipient,
|
736
|
-
amount,
|
737
|
-
]);
|
738
|
-
return {
|
739
|
-
context: ethCallContext,
|
740
|
-
calldata,
|
741
|
-
};
|
742
|
-
} catch (e) {
|
743
|
-
const stack = new Error().stack;
|
744
|
-
throw transformEtherError(e, undefined, stack);
|
745
|
-
}
|
582
|
+
return encodeCallData(
|
583
|
+
callContext,
|
584
|
+
"transferFrom",
|
585
|
+
"function transferFrom(address,address,uint256)",
|
586
|
+
[sender, recipient, amount],
|
587
|
+
);
|
746
588
|
},
|
747
589
|
transferOwnership(
|
748
590
|
newOwner: string,
|
749
|
-
|
591
|
+
callContext: EthCallContext,
|
750
592
|
): EthCallParam {
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
]
|
756
|
-
|
757
|
-
context: ethCallContext,
|
758
|
-
calldata,
|
759
|
-
};
|
760
|
-
} catch (e) {
|
761
|
-
const stack = new Error().stack;
|
762
|
-
throw transformEtherError(e, undefined, stack);
|
763
|
-
}
|
593
|
+
return encodeCallData(
|
594
|
+
callContext,
|
595
|
+
"transferOwnership",
|
596
|
+
"function transferOwnership(address)",
|
597
|
+
[newOwner],
|
598
|
+
);
|
764
599
|
},
|
765
600
|
};
|
766
601
|
}
|
@@ -774,11 +609,6 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
774
609
|
spender: string,
|
775
610
|
overrides?: Overrides,
|
776
611
|
): Promise<bigint> {
|
777
|
-
const ethCallContext = {
|
778
|
-
chainId: this.context.chainId,
|
779
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
780
|
-
address: this.context.address,
|
781
|
-
};
|
782
612
|
return await this.view.allowance(
|
783
613
|
owner,
|
784
614
|
spender,
|
@@ -787,16 +617,11 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
787
617
|
...overrides,
|
788
618
|
},
|
789
619
|
this.context.preparedData,
|
790
|
-
|
620
|
+
this.context.getEthCallContext(),
|
791
621
|
);
|
792
622
|
}
|
793
623
|
|
794
624
|
async balanceOf(account: string, overrides?: Overrides): Promise<bigint> {
|
795
|
-
const ethCallContext = {
|
796
|
-
chainId: this.context.chainId,
|
797
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
798
|
-
address: this.context.address,
|
799
|
-
};
|
800
625
|
return await this.view.balanceOf(
|
801
626
|
account,
|
802
627
|
{
|
@@ -804,103 +629,73 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
804
629
|
...overrides,
|
805
630
|
},
|
806
631
|
this.context.preparedData,
|
807
|
-
|
632
|
+
this.context.getEthCallContext(),
|
808
633
|
);
|
809
634
|
}
|
810
635
|
|
811
636
|
async decimals(overrides?: Overrides): Promise<bigint> {
|
812
|
-
const ethCallContext = {
|
813
|
-
chainId: this.context.chainId,
|
814
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
815
|
-
address: this.context.address,
|
816
|
-
};
|
817
637
|
return await this.view.decimals(
|
818
638
|
{
|
819
639
|
blockTag: this.context.blockNumber,
|
820
640
|
...overrides,
|
821
641
|
},
|
822
642
|
this.context.preparedData,
|
823
|
-
|
643
|
+
this.context.getEthCallContext(),
|
824
644
|
);
|
825
645
|
}
|
826
646
|
|
827
647
|
async locker(overrides?: Overrides): Promise<string> {
|
828
|
-
const ethCallContext = {
|
829
|
-
chainId: this.context.chainId,
|
830
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
831
|
-
address: this.context.address,
|
832
|
-
};
|
833
648
|
return await this.view.locker(
|
834
649
|
{
|
835
650
|
blockTag: this.context.blockNumber,
|
836
651
|
...overrides,
|
837
652
|
},
|
838
653
|
this.context.preparedData,
|
839
|
-
|
654
|
+
this.context.getEthCallContext(),
|
840
655
|
);
|
841
656
|
}
|
842
657
|
|
843
658
|
async name(overrides?: Overrides): Promise<string> {
|
844
|
-
const ethCallContext = {
|
845
|
-
chainId: this.context.chainId,
|
846
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
847
|
-
address: this.context.address,
|
848
|
-
};
|
849
659
|
return await this.view.name(
|
850
660
|
{
|
851
661
|
blockTag: this.context.blockNumber,
|
852
662
|
...overrides,
|
853
663
|
},
|
854
664
|
this.context.preparedData,
|
855
|
-
|
665
|
+
this.context.getEthCallContext(),
|
856
666
|
);
|
857
667
|
}
|
858
668
|
|
859
669
|
async owner(overrides?: Overrides): Promise<string> {
|
860
|
-
const ethCallContext = {
|
861
|
-
chainId: this.context.chainId,
|
862
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
863
|
-
address: this.context.address,
|
864
|
-
};
|
865
670
|
return await this.view.owner(
|
866
671
|
{
|
867
672
|
blockTag: this.context.blockNumber,
|
868
673
|
...overrides,
|
869
674
|
},
|
870
675
|
this.context.preparedData,
|
871
|
-
|
676
|
+
this.context.getEthCallContext(),
|
872
677
|
);
|
873
678
|
}
|
874
679
|
|
875
680
|
async symbol(overrides?: Overrides): Promise<string> {
|
876
|
-
const ethCallContext = {
|
877
|
-
chainId: this.context.chainId,
|
878
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
879
|
-
address: this.context.address,
|
880
|
-
};
|
881
681
|
return await this.view.symbol(
|
882
682
|
{
|
883
683
|
blockTag: this.context.blockNumber,
|
884
684
|
...overrides,
|
885
685
|
},
|
886
686
|
this.context.preparedData,
|
887
|
-
|
687
|
+
this.context.getEthCallContext(),
|
888
688
|
);
|
889
689
|
}
|
890
690
|
|
891
691
|
async totalSupply(overrides?: Overrides): Promise<bigint> {
|
892
|
-
const ethCallContext = {
|
893
|
-
chainId: this.context.chainId,
|
894
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
895
|
-
address: this.context.address,
|
896
|
-
};
|
897
692
|
return await this.view.totalSupply(
|
898
693
|
{
|
899
694
|
blockTag: this.context.blockNumber,
|
900
695
|
...overrides,
|
901
696
|
},
|
902
697
|
this.context.preparedData,
|
903
|
-
|
698
|
+
this.context.getEthCallContext(),
|
904
699
|
);
|
905
700
|
}
|
906
701
|
|
@@ -913,11 +708,6 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
913
708
|
amount: BigNumberish,
|
914
709
|
overrides?: Overrides,
|
915
710
|
): Promise<boolean> {
|
916
|
-
const ethCallContext = {
|
917
|
-
chainId: this.context.chainId,
|
918
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
919
|
-
address: this.context.address,
|
920
|
-
};
|
921
711
|
return await this.view.callStatic.approve(
|
922
712
|
spender,
|
923
713
|
amount,
|
@@ -926,15 +716,10 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
926
716
|
...overrides,
|
927
717
|
},
|
928
718
|
this.context.preparedData,
|
929
|
-
|
719
|
+
this.context.getEthCallContext(),
|
930
720
|
);
|
931
721
|
},
|
932
722
|
async burn(amount: BigNumberish, overrides?: Overrides): Promise<void> {
|
933
|
-
const ethCallContext = {
|
934
|
-
chainId: this.context.chainId,
|
935
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
936
|
-
address: this.context.address,
|
937
|
-
};
|
938
723
|
return await this.view.callStatic.burn(
|
939
724
|
amount,
|
940
725
|
{
|
@@ -942,7 +727,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
942
727
|
...overrides,
|
943
728
|
},
|
944
729
|
this.context.preparedData,
|
945
|
-
|
730
|
+
this.context.getEthCallContext(),
|
946
731
|
);
|
947
732
|
},
|
948
733
|
async burnFrom(
|
@@ -950,11 +735,6 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
950
735
|
amount: BigNumberish,
|
951
736
|
overrides?: Overrides,
|
952
737
|
): Promise<void> {
|
953
|
-
const ethCallContext = {
|
954
|
-
chainId: this.context.chainId,
|
955
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
956
|
-
address: this.context.address,
|
957
|
-
};
|
958
738
|
return await this.view.callStatic.burnFrom(
|
959
739
|
account,
|
960
740
|
amount,
|
@@ -963,7 +743,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
963
743
|
...overrides,
|
964
744
|
},
|
965
745
|
this.context.preparedData,
|
966
|
-
|
746
|
+
this.context.getEthCallContext(),
|
967
747
|
);
|
968
748
|
},
|
969
749
|
async decreaseAllowance(
|
@@ -971,11 +751,6 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
971
751
|
subtractedValue: BigNumberish,
|
972
752
|
overrides?: Overrides,
|
973
753
|
): Promise<boolean> {
|
974
|
-
const ethCallContext = {
|
975
|
-
chainId: this.context.chainId,
|
976
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
977
|
-
address: this.context.address,
|
978
|
-
};
|
979
754
|
return await this.view.callStatic.decreaseAllowance(
|
980
755
|
spender,
|
981
756
|
subtractedValue,
|
@@ -984,7 +759,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
984
759
|
...overrides,
|
985
760
|
},
|
986
761
|
this.context.preparedData,
|
987
|
-
|
762
|
+
this.context.getEthCallContext(),
|
988
763
|
);
|
989
764
|
},
|
990
765
|
async increaseAllowance(
|
@@ -992,11 +767,6 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
992
767
|
addedValue: BigNumberish,
|
993
768
|
overrides?: Overrides,
|
994
769
|
): Promise<boolean> {
|
995
|
-
const ethCallContext = {
|
996
|
-
chainId: this.context.chainId,
|
997
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
998
|
-
address: this.context.address,
|
999
|
-
};
|
1000
770
|
return await this.view.callStatic.increaseAllowance(
|
1001
771
|
spender,
|
1002
772
|
addedValue,
|
@@ -1005,30 +775,20 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1005
775
|
...overrides,
|
1006
776
|
},
|
1007
777
|
this.context.preparedData,
|
1008
|
-
|
778
|
+
this.context.getEthCallContext(),
|
1009
779
|
);
|
1010
780
|
},
|
1011
781
|
async renounceOwnership(overrides?: Overrides): Promise<void> {
|
1012
|
-
const ethCallContext = {
|
1013
|
-
chainId: this.context.chainId,
|
1014
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
1015
|
-
address: this.context.address,
|
1016
|
-
};
|
1017
782
|
return await this.view.callStatic.renounceOwnership(
|
1018
783
|
{
|
1019
784
|
blockTag: this.context.blockNumber,
|
1020
785
|
...overrides,
|
1021
786
|
},
|
1022
787
|
this.context.preparedData,
|
1023
|
-
|
788
|
+
this.context.getEthCallContext(),
|
1024
789
|
);
|
1025
790
|
},
|
1026
791
|
async setLocker(_locker: string, overrides?: Overrides): Promise<void> {
|
1027
|
-
const ethCallContext = {
|
1028
|
-
chainId: this.context.chainId,
|
1029
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
1030
|
-
address: this.context.address,
|
1031
|
-
};
|
1032
792
|
return await this.view.callStatic.setLocker(
|
1033
793
|
_locker,
|
1034
794
|
{
|
@@ -1036,7 +796,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1036
796
|
...overrides,
|
1037
797
|
},
|
1038
798
|
this.context.preparedData,
|
1039
|
-
|
799
|
+
this.context.getEthCallContext(),
|
1040
800
|
);
|
1041
801
|
},
|
1042
802
|
async transfer(
|
@@ -1044,11 +804,6 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1044
804
|
amount: BigNumberish,
|
1045
805
|
overrides?: Overrides,
|
1046
806
|
): Promise<boolean> {
|
1047
|
-
const ethCallContext = {
|
1048
|
-
chainId: this.context.chainId,
|
1049
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
1050
|
-
address: this.context.address,
|
1051
|
-
};
|
1052
807
|
return await this.view.callStatic.transfer(
|
1053
808
|
recipient,
|
1054
809
|
amount,
|
@@ -1057,7 +812,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1057
812
|
...overrides,
|
1058
813
|
},
|
1059
814
|
this.context.preparedData,
|
1060
|
-
|
815
|
+
this.context.getEthCallContext(),
|
1061
816
|
);
|
1062
817
|
},
|
1063
818
|
async transferFrom(
|
@@ -1066,11 +821,6 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1066
821
|
amount: BigNumberish,
|
1067
822
|
overrides?: Overrides,
|
1068
823
|
): Promise<boolean> {
|
1069
|
-
const ethCallContext = {
|
1070
|
-
chainId: this.context.chainId,
|
1071
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
1072
|
-
address: this.context.address,
|
1073
|
-
};
|
1074
824
|
return await this.view.callStatic.transferFrom(
|
1075
825
|
sender,
|
1076
826
|
recipient,
|
@@ -1080,18 +830,13 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1080
830
|
...overrides,
|
1081
831
|
},
|
1082
832
|
this.context.preparedData,
|
1083
|
-
|
833
|
+
this.context.getEthCallContext(),
|
1084
834
|
);
|
1085
835
|
},
|
1086
836
|
async transferOwnership(
|
1087
837
|
newOwner: string,
|
1088
838
|
overrides?: Overrides,
|
1089
839
|
): Promise<void> {
|
1090
|
-
const ethCallContext = {
|
1091
|
-
chainId: this.context.chainId,
|
1092
|
-
blockTag: "0x" + this.context.blockNumber.toString(16),
|
1093
|
-
address: this.context.address,
|
1094
|
-
};
|
1095
840
|
return await this.view.callStatic.transferOwnership(
|
1096
841
|
newOwner,
|
1097
842
|
{
|
@@ -1099,7 +844,7 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1099
844
|
...overrides,
|
1100
845
|
},
|
1101
846
|
this.context.preparedData,
|
1102
|
-
|
847
|
+
this.context.getEthCallContext(),
|
1103
848
|
);
|
1104
849
|
},
|
1105
850
|
};
|
@@ -1113,18 +858,10 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1113
858
|
spender: string,
|
1114
859
|
overrides?: Overrides,
|
1115
860
|
): EthCallParam {
|
1116
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1117
|
-
if (overrides?.blockTag) {
|
1118
|
-
blockTagWithOverride =
|
1119
|
-
typeof overrides.blockTag == "string"
|
1120
|
-
? overrides.blockTag
|
1121
|
-
: "0x" + overrides.blockTag.toString(16);
|
1122
|
-
}
|
1123
|
-
|
1124
861
|
return this.view.encodeCall.allowance(owner, spender, {
|
1125
862
|
chainId: this.context.chainId.toString(),
|
1126
863
|
address: this.context.address,
|
1127
|
-
blockTag:
|
864
|
+
blockTag: this.context.getBlockTag(overrides),
|
1128
865
|
});
|
1129
866
|
},
|
1130
867
|
approve(
|
@@ -1132,48 +869,24 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1132
869
|
amount: BigNumberish,
|
1133
870
|
overrides?: Overrides,
|
1134
871
|
): EthCallParam {
|
1135
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1136
|
-
if (overrides?.blockTag) {
|
1137
|
-
blockTagWithOverride =
|
1138
|
-
typeof overrides.blockTag == "string"
|
1139
|
-
? overrides.blockTag
|
1140
|
-
: "0x" + overrides.blockTag.toString(16);
|
1141
|
-
}
|
1142
|
-
|
1143
872
|
return this.view.encodeCall.approve(spender, amount, {
|
1144
873
|
chainId: this.context.chainId.toString(),
|
1145
874
|
address: this.context.address,
|
1146
|
-
blockTag:
|
875
|
+
blockTag: this.context.getBlockTag(overrides),
|
1147
876
|
});
|
1148
877
|
},
|
1149
878
|
balanceOf(account: string, overrides?: Overrides): EthCallParam {
|
1150
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1151
|
-
if (overrides?.blockTag) {
|
1152
|
-
blockTagWithOverride =
|
1153
|
-
typeof overrides.blockTag == "string"
|
1154
|
-
? overrides.blockTag
|
1155
|
-
: "0x" + overrides.blockTag.toString(16);
|
1156
|
-
}
|
1157
|
-
|
1158
879
|
return this.view.encodeCall.balanceOf(account, {
|
1159
880
|
chainId: this.context.chainId.toString(),
|
1160
881
|
address: this.context.address,
|
1161
|
-
blockTag:
|
882
|
+
blockTag: this.context.getBlockTag(overrides),
|
1162
883
|
});
|
1163
884
|
},
|
1164
885
|
burn(amount: BigNumberish, overrides?: Overrides): EthCallParam {
|
1165
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1166
|
-
if (overrides?.blockTag) {
|
1167
|
-
blockTagWithOverride =
|
1168
|
-
typeof overrides.blockTag == "string"
|
1169
|
-
? overrides.blockTag
|
1170
|
-
: "0x" + overrides.blockTag.toString(16);
|
1171
|
-
}
|
1172
|
-
|
1173
886
|
return this.view.encodeCall.burn(amount, {
|
1174
887
|
chainId: this.context.chainId.toString(),
|
1175
888
|
address: this.context.address,
|
1176
|
-
blockTag:
|
889
|
+
blockTag: this.context.getBlockTag(overrides),
|
1177
890
|
});
|
1178
891
|
},
|
1179
892
|
burnFrom(
|
@@ -1181,33 +894,17 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1181
894
|
amount: BigNumberish,
|
1182
895
|
overrides?: Overrides,
|
1183
896
|
): EthCallParam {
|
1184
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1185
|
-
if (overrides?.blockTag) {
|
1186
|
-
blockTagWithOverride =
|
1187
|
-
typeof overrides.blockTag == "string"
|
1188
|
-
? overrides.blockTag
|
1189
|
-
: "0x" + overrides.blockTag.toString(16);
|
1190
|
-
}
|
1191
|
-
|
1192
897
|
return this.view.encodeCall.burnFrom(account, amount, {
|
1193
898
|
chainId: this.context.chainId.toString(),
|
1194
899
|
address: this.context.address,
|
1195
|
-
blockTag:
|
900
|
+
blockTag: this.context.getBlockTag(overrides),
|
1196
901
|
});
|
1197
902
|
},
|
1198
903
|
decimals(overrides?: Overrides): EthCallParam {
|
1199
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1200
|
-
if (overrides?.blockTag) {
|
1201
|
-
blockTagWithOverride =
|
1202
|
-
typeof overrides.blockTag == "string"
|
1203
|
-
? overrides.blockTag
|
1204
|
-
: "0x" + overrides.blockTag.toString(16);
|
1205
|
-
}
|
1206
|
-
|
1207
904
|
return this.view.encodeCall.decimals({
|
1208
905
|
chainId: this.context.chainId.toString(),
|
1209
906
|
address: this.context.address,
|
1210
|
-
blockTag:
|
907
|
+
blockTag: this.context.getBlockTag(overrides),
|
1211
908
|
});
|
1212
909
|
},
|
1213
910
|
decreaseAllowance(
|
@@ -1215,18 +912,10 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1215
912
|
subtractedValue: BigNumberish,
|
1216
913
|
overrides?: Overrides,
|
1217
914
|
): EthCallParam {
|
1218
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1219
|
-
if (overrides?.blockTag) {
|
1220
|
-
blockTagWithOverride =
|
1221
|
-
typeof overrides.blockTag == "string"
|
1222
|
-
? overrides.blockTag
|
1223
|
-
: "0x" + overrides.blockTag.toString(16);
|
1224
|
-
}
|
1225
|
-
|
1226
915
|
return this.view.encodeCall.decreaseAllowance(spender, subtractedValue, {
|
1227
916
|
chainId: this.context.chainId.toString(),
|
1228
917
|
address: this.context.address,
|
1229
|
-
blockTag:
|
918
|
+
blockTag: this.context.getBlockTag(overrides),
|
1230
919
|
});
|
1231
920
|
},
|
1232
921
|
increaseAllowance(
|
@@ -1234,123 +923,59 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1234
923
|
addedValue: BigNumberish,
|
1235
924
|
overrides?: Overrides,
|
1236
925
|
): EthCallParam {
|
1237
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1238
|
-
if (overrides?.blockTag) {
|
1239
|
-
blockTagWithOverride =
|
1240
|
-
typeof overrides.blockTag == "string"
|
1241
|
-
? overrides.blockTag
|
1242
|
-
: "0x" + overrides.blockTag.toString(16);
|
1243
|
-
}
|
1244
|
-
|
1245
926
|
return this.view.encodeCall.increaseAllowance(spender, addedValue, {
|
1246
927
|
chainId: this.context.chainId.toString(),
|
1247
928
|
address: this.context.address,
|
1248
|
-
blockTag:
|
929
|
+
blockTag: this.context.getBlockTag(overrides),
|
1249
930
|
});
|
1250
931
|
},
|
1251
932
|
locker(overrides?: Overrides): EthCallParam {
|
1252
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1253
|
-
if (overrides?.blockTag) {
|
1254
|
-
blockTagWithOverride =
|
1255
|
-
typeof overrides.blockTag == "string"
|
1256
|
-
? overrides.blockTag
|
1257
|
-
: "0x" + overrides.blockTag.toString(16);
|
1258
|
-
}
|
1259
|
-
|
1260
933
|
return this.view.encodeCall.locker({
|
1261
934
|
chainId: this.context.chainId.toString(),
|
1262
935
|
address: this.context.address,
|
1263
|
-
blockTag:
|
936
|
+
blockTag: this.context.getBlockTag(overrides),
|
1264
937
|
});
|
1265
938
|
},
|
1266
939
|
name(overrides?: Overrides): EthCallParam {
|
1267
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1268
|
-
if (overrides?.blockTag) {
|
1269
|
-
blockTagWithOverride =
|
1270
|
-
typeof overrides.blockTag == "string"
|
1271
|
-
? overrides.blockTag
|
1272
|
-
: "0x" + overrides.blockTag.toString(16);
|
1273
|
-
}
|
1274
|
-
|
1275
940
|
return this.view.encodeCall.name({
|
1276
941
|
chainId: this.context.chainId.toString(),
|
1277
942
|
address: this.context.address,
|
1278
|
-
blockTag:
|
943
|
+
blockTag: this.context.getBlockTag(overrides),
|
1279
944
|
});
|
1280
945
|
},
|
1281
946
|
owner(overrides?: Overrides): EthCallParam {
|
1282
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1283
|
-
if (overrides?.blockTag) {
|
1284
|
-
blockTagWithOverride =
|
1285
|
-
typeof overrides.blockTag == "string"
|
1286
|
-
? overrides.blockTag
|
1287
|
-
: "0x" + overrides.blockTag.toString(16);
|
1288
|
-
}
|
1289
|
-
|
1290
947
|
return this.view.encodeCall.owner({
|
1291
948
|
chainId: this.context.chainId.toString(),
|
1292
949
|
address: this.context.address,
|
1293
|
-
blockTag:
|
950
|
+
blockTag: this.context.getBlockTag(overrides),
|
1294
951
|
});
|
1295
952
|
},
|
1296
953
|
renounceOwnership(overrides?: Overrides): EthCallParam {
|
1297
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1298
|
-
if (overrides?.blockTag) {
|
1299
|
-
blockTagWithOverride =
|
1300
|
-
typeof overrides.blockTag == "string"
|
1301
|
-
? overrides.blockTag
|
1302
|
-
: "0x" + overrides.blockTag.toString(16);
|
1303
|
-
}
|
1304
|
-
|
1305
954
|
return this.view.encodeCall.renounceOwnership({
|
1306
955
|
chainId: this.context.chainId.toString(),
|
1307
956
|
address: this.context.address,
|
1308
|
-
blockTag:
|
957
|
+
blockTag: this.context.getBlockTag(overrides),
|
1309
958
|
});
|
1310
959
|
},
|
1311
960
|
setLocker(_locker: string, overrides?: Overrides): EthCallParam {
|
1312
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1313
|
-
if (overrides?.blockTag) {
|
1314
|
-
blockTagWithOverride =
|
1315
|
-
typeof overrides.blockTag == "string"
|
1316
|
-
? overrides.blockTag
|
1317
|
-
: "0x" + overrides.blockTag.toString(16);
|
1318
|
-
}
|
1319
|
-
|
1320
961
|
return this.view.encodeCall.setLocker(_locker, {
|
1321
962
|
chainId: this.context.chainId.toString(),
|
1322
963
|
address: this.context.address,
|
1323
|
-
blockTag:
|
964
|
+
blockTag: this.context.getBlockTag(overrides),
|
1324
965
|
});
|
1325
966
|
},
|
1326
967
|
symbol(overrides?: Overrides): EthCallParam {
|
1327
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1328
|
-
if (overrides?.blockTag) {
|
1329
|
-
blockTagWithOverride =
|
1330
|
-
typeof overrides.blockTag == "string"
|
1331
|
-
? overrides.blockTag
|
1332
|
-
: "0x" + overrides.blockTag.toString(16);
|
1333
|
-
}
|
1334
|
-
|
1335
968
|
return this.view.encodeCall.symbol({
|
1336
969
|
chainId: this.context.chainId.toString(),
|
1337
970
|
address: this.context.address,
|
1338
|
-
blockTag:
|
971
|
+
blockTag: this.context.getBlockTag(overrides),
|
1339
972
|
});
|
1340
973
|
},
|
1341
974
|
totalSupply(overrides?: Overrides): EthCallParam {
|
1342
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1343
|
-
if (overrides?.blockTag) {
|
1344
|
-
blockTagWithOverride =
|
1345
|
-
typeof overrides.blockTag == "string"
|
1346
|
-
? overrides.blockTag
|
1347
|
-
: "0x" + overrides.blockTag.toString(16);
|
1348
|
-
}
|
1349
|
-
|
1350
975
|
return this.view.encodeCall.totalSupply({
|
1351
976
|
chainId: this.context.chainId.toString(),
|
1352
977
|
address: this.context.address,
|
1353
|
-
blockTag:
|
978
|
+
blockTag: this.context.getBlockTag(overrides),
|
1354
979
|
});
|
1355
980
|
},
|
1356
981
|
transfer(
|
@@ -1358,18 +983,10 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1358
983
|
amount: BigNumberish,
|
1359
984
|
overrides?: Overrides,
|
1360
985
|
): EthCallParam {
|
1361
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1362
|
-
if (overrides?.blockTag) {
|
1363
|
-
blockTagWithOverride =
|
1364
|
-
typeof overrides.blockTag == "string"
|
1365
|
-
? overrides.blockTag
|
1366
|
-
: "0x" + overrides.blockTag.toString(16);
|
1367
|
-
}
|
1368
|
-
|
1369
986
|
return this.view.encodeCall.transfer(recipient, amount, {
|
1370
987
|
chainId: this.context.chainId.toString(),
|
1371
988
|
address: this.context.address,
|
1372
|
-
blockTag:
|
989
|
+
blockTag: this.context.getBlockTag(overrides),
|
1373
990
|
});
|
1374
991
|
},
|
1375
992
|
transferFrom(
|
@@ -1378,33 +995,17 @@ export class ERC20BoundContractView extends BoundContractView<
|
|
1378
995
|
amount: BigNumberish,
|
1379
996
|
overrides?: Overrides,
|
1380
997
|
): EthCallParam {
|
1381
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1382
|
-
if (overrides?.blockTag) {
|
1383
|
-
blockTagWithOverride =
|
1384
|
-
typeof overrides.blockTag == "string"
|
1385
|
-
? overrides.blockTag
|
1386
|
-
: "0x" + overrides.blockTag.toString(16);
|
1387
|
-
}
|
1388
|
-
|
1389
998
|
return this.view.encodeCall.transferFrom(sender, recipient, amount, {
|
1390
999
|
chainId: this.context.chainId.toString(),
|
1391
1000
|
address: this.context.address,
|
1392
|
-
blockTag:
|
1001
|
+
blockTag: this.context.getBlockTag(overrides),
|
1393
1002
|
});
|
1394
1003
|
},
|
1395
1004
|
transferOwnership(newOwner: string, overrides?: Overrides): EthCallParam {
|
1396
|
-
let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
|
1397
|
-
if (overrides?.blockTag) {
|
1398
|
-
blockTagWithOverride =
|
1399
|
-
typeof overrides.blockTag == "string"
|
1400
|
-
? overrides.blockTag
|
1401
|
-
: "0x" + overrides.blockTag.toString(16);
|
1402
|
-
}
|
1403
|
-
|
1404
1005
|
return this.view.encodeCall.transferOwnership(newOwner, {
|
1405
1006
|
chainId: this.context.chainId.toString(),
|
1406
1007
|
address: this.context.address,
|
1407
|
-
blockTag:
|
1008
|
+
blockTag: this.context.getBlockTag(overrides),
|
1408
1009
|
});
|
1409
1010
|
},
|
1410
1011
|
};
|