@@ -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,6 +55,11 @@ 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 ( 
@@ -57,27 +69,33 @@ async function main() {
5769  const  WalletSimple  =  await  ethers . getContractFactory ( 
5870    walletImplementationContractName 
5971  ) ; 
60-   const  walletSimple  =  await  WalletSimple . deploy ( ) ; 
72+   const  walletSimple  =  await  WalletSimple . deploy ( gasParams ) ; 
6173  await  walletSimple . deployed ( ) ; 
6274  output . walletImplementation  =  walletSimple . address ; 
6375  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+     walletSimple . address , 
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 ) ; 
0 commit comments