@@ -10,12 +10,20 @@ async function main() {
1010    forwarderFactory : '' 
1111  } ; 
1212
13+ 
14+   const  feeData  =  await  ethers . provider . getFeeData ( ) ; 
15+ 
16+   const  gasParams  =  { 
17+     gasPrice : feeData . gasPrice ! . mul ( '2' ) , 
18+     gasLimit : 4500000 
19+   } ; 
20+ 
1321  const  [ deployer ]  =  await  ethers . getSigners ( ) ; 
1422
1523  let  walletImplementationContractName  =  '' ; 
1624  let  walletFactoryContractName  =  'WalletFactory' ; 
1725  const  chainId  =  await  deployer . getChainId ( ) ; 
18-   switch  ( await   deployer . getChainId ( ) )  { 
26+   switch  ( chainId )  { 
1927    // https://chainlist.org/ 
2028    //eth 
2129    case  1 :
@@ -48,6 +56,11 @@ async function main() {
4856    case  11155420 :
4957      walletImplementationContractName  =  'OpethWalletSimple' ; 
5058      break ; 
59+     //avaxc 
60+     case  43114 :
61+     //tavaxc 
62+     case  43113 :
63+       walletImplementationContractName  =  'AvaxcWalletSimple' ; 
5164  } 
5265
5366  console . log ( 
@@ -57,27 +70,27 @@ async function main() {
5770  const  WalletSimple  =  await  ethers . getContractFactory ( 
5871    walletImplementationContractName 
5972  ) ; 
60-   const  walletSimple  =  await  WalletSimple . deploy ( ) ; 
73+   const  walletSimple  =  await  WalletSimple . deploy ( gasParams ) ; 
6174  await  walletSimple . deployed ( ) ; 
6275  output . walletImplementation  =  walletSimple . address ; 
6376  console . log ( 'WalletSimple deployed at '  +  walletSimple . address ) ; 
6477
6578  const  WalletFactory  =  await  ethers . getContractFactory ( 
6679    walletFactoryContractName 
6780  ) ; 
68-   const  walletFactory  =  await  WalletFactory . deploy ( walletSimple . address ) ; 
81+   const  walletFactory  =  await  WalletFactory . deploy ( walletSimple . address ,   gasParams ) ; 
6982  await  walletFactory . deployed ( ) ; 
7083  output . walletFactory  =  walletFactory . address ; 
7184  console . log ( 'WalletFactory deployed at '  +  walletFactory . address ) ; 
7285
7386  const  Forwarder  =  await  ethers . getContractFactory ( 'Forwarder' ) ; 
74-   const  forwarder  =  await  Forwarder . deploy ( ) ; 
87+   const  forwarder  =  await  Forwarder . deploy ( gasParams ) ; 
7588  await  forwarder . deployed ( ) ; 
7689  output . forwarderImplementation  =  forwarder . address ; 
7790  console . log ( 'Forwarder deployed at '  +  forwarder . address ) ; 
7891
7992  const  ForwarderFactory  =  await  ethers . getContractFactory ( 'ForwarderFactory' ) ; 
80-   const  forwarderFactory  =  await  ForwarderFactory . deploy ( forwarder . address ) ; 
93+   const  forwarderFactory  =  await  ForwarderFactory . deploy ( forwarder . address ,   gasParams ) ; 
8194  await  forwarderFactory . deployed ( ) ; 
8295  output . forwarderFactory  =  forwarderFactory . address ; 
8396  console . log ( 'ForwarderFactory deployed at '  +  forwarderFactory . address ) ; 
0 commit comments