File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
packages/thirdweb/src/contract/deployment/utils Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -162,24 +162,22 @@ export async function deployCreate2Factory(options: ClientAndChainAndAccount) {
162162 chain,
163163 } ) ;
164164
165- let deploymentInfo : Create2FactoryDeploymentInfo ;
165+ let gasPrice : bigint | undefined ;
166+ let gasLimit : bigint | undefined ;
166167
167168 if ( CUSTOM_GAS_FOR_CHAIN [ chainId ] ) {
168- const gasPrice = CUSTOM_GAS_FOR_CHAIN [ chainId . toString ( ) ] ?. gasPrice ;
169- const gasLimit = CUSTOM_GAS_FOR_CHAIN [ chainId . toString ( ) ] ?. gasLimit ;
170-
171- deploymentInfo = await _getCreate2FactoryDeploymentInfo ( eipChain , {
172- gasPrice,
173- gasLimit,
174- } ) ;
169+ gasPrice = CUSTOM_GAS_FOR_CHAIN [ chainId . toString ( ) ] ?. gasPrice ;
170+ gasLimit = CUSTOM_GAS_FOR_CHAIN [ chainId . toString ( ) ] ?. gasLimit ;
175171 } else {
176172 const gasPriceFetched = await getGasPrice ( options ) ;
177- const bin = _getNearestGasPriceBin ( gasPriceFetched ) ;
178- deploymentInfo = await _getCreate2FactoryDeploymentInfo ( eipChain , {
179- gasPrice : bin ,
180- } ) ;
173+ gasPrice = _getNearestGasPriceBin ( gasPriceFetched ) ;
181174 }
182175
176+ const deploymentInfo = await _getCreate2FactoryDeploymentInfo ( eipChain , {
177+ gasPrice,
178+ gasLimit,
179+ } ) ;
180+
183181 const balance = await eth_getBalance ( rpcRequest , {
184182 address : deploymentInfo . signerAddress ,
185183 } ) ;
You can’t perform that action at this time.
0 commit comments