@@ -10,12 +10,19 @@ async function main() {
1010 forwarderFactory : ''
1111 } ;
1212
13+ const feeData = await ethers . provider . getFeeData ( ) ;
14+
15+ const gasParams = {
16+ gasPrice : feeData . gasPrice ! . mul ( '2' ) ,
17+ gasLimit : 4500000
18+ } ;
19+
1320 const [ deployer ] = await ethers . getSigners ( ) ;
1421
1522 let walletImplementationContractName = '' ;
1623 let walletFactoryContractName = 'WalletFactory' ;
1724 const chainId = await deployer . getChainId ( ) ;
18- switch ( await deployer . getChainId ( ) ) {
25+ switch ( chainId ) {
1926 // https://chainlist.org/
2027 //eth
2128 case 1 :
@@ -48,36 +55,47 @@ async function main() {
4855 case 11155420 :
4956 walletImplementationContractName = 'OpethWalletSimple' ;
5057 break ;
58+ //avaxc
59+ case 43114 :
60+ //tavaxc
61+ case 43113 :
62+ walletImplementationContractName = 'AvaxcWalletSimple' ;
5163 }
5264
5365 console . log (
5466 'Deployed wallet contract called: ' + walletImplementationContractName
5567 ) ;
5668
57- const WalletSimple = await ethers . getContractFactory (
58- walletImplementationContractName
59- ) ;
60- const walletSimple = await WalletSimple . deploy ( ) ;
61- await walletSimple . deployed ( ) ;
62- output . walletImplementation = walletSimple . address ;
63- console . log ( 'WalletSimple deployed at ' + walletSimple . address ) ;
69+ // const WalletSimple = await ethers.getContractFactory(
70+ // walletImplementationContractName
71+ // );
72+ // const walletSimple = await WalletSimple.deploy(gasParams );
73+ // await walletSimple.deployed();
74+ // output.walletImplementation = walletSimple.address;
75+ // console.log('WalletSimple deployed at ' + walletSimple.address);
6476
6577 const WalletFactory = await ethers . getContractFactory (
6678 walletFactoryContractName
6779 ) ;
68- const walletFactory = await WalletFactory . deploy ( walletSimple . address ) ;
80+ const walletFactory = await WalletFactory . deploy (
81+ '0xe5DcdC13B628c2df813DB1080367E929c1507Ca0' ,
82+ gasParams
83+ ) ;
6984 await walletFactory . deployed ( ) ;
7085 output . walletFactory = walletFactory . address ;
7186 console . log ( 'WalletFactory deployed at ' + walletFactory . address ) ;
7287
7388 const Forwarder = await ethers . getContractFactory ( 'Forwarder' ) ;
74- const forwarder = await Forwarder . deploy ( ) ;
89+ const forwarder = await Forwarder . deploy ( gasParams ) ;
7590 await forwarder . deployed ( ) ;
7691 output . forwarderImplementation = forwarder . address ;
7792 console . log ( 'Forwarder deployed at ' + forwarder . address ) ;
7893
7994 const ForwarderFactory = await ethers . getContractFactory ( 'ForwarderFactory' ) ;
80- const forwarderFactory = await ForwarderFactory . deploy ( forwarder . address ) ;
95+ const forwarderFactory = await ForwarderFactory . deploy (
96+ forwarder . address ,
97+ gasParams
98+ ) ;
8199 await forwarderFactory . deployed ( ) ;
82100 output . forwarderFactory = forwarderFactory . address ;
83101 console . log ( 'ForwarderFactory deployed at ' + forwarderFactory . address ) ;
@@ -89,19 +107,19 @@ async function main() {
89107 await new Promise ( ( r ) => setTimeout ( r , 1000 * 300 ) ) ;
90108
91109 // We have to wait for a minimum of 10 block confirmations before we can call the etherscan api to verify
92- await walletSimple . deployTransaction . wait ( 10 ) ;
110+ // await walletSimple.deployTransaction.wait(10);
93111 await walletFactory . deployTransaction . wait ( 10 ) ;
94112 await forwarder . deployTransaction . wait ( 10 ) ;
95113 await forwarderFactory . deployTransaction . wait ( 10 ) ;
96114
97115 console . log ( 'Done waiting, verifying' ) ;
98- await verifyContract (
99- walletImplementationContractName ,
100- walletSimple . address ,
101- [ ]
102- ) ;
116+ // await verifyContract(
117+ // walletImplementationContractName,
118+ // walletSimple.address,
119+ // []
120+ // );
103121 await verifyContract ( 'WalletFactory' , walletFactory . address , [
104- walletSimple . address
122+ '0xe5DcdC13B628c2df813DB1080367E929c1507Ca0'
105123 ] ) ;
106124 await verifyContract ( 'Forwarder' , forwarder . address , [ ] ) ;
107125 await verifyContract ( 'ForwarderFactory' , forwarderFactory . address , [
0 commit comments