diff --git a/modules/4337/hardhat.config.ts b/modules/4337/hardhat.config.ts index 93f54360..49e430c2 100644 --- a/modules/4337/hardhat.config.ts +++ b/modules/4337/hardhat.config.ts @@ -4,8 +4,8 @@ import 'hardhat-deploy' import dotenv from 'dotenv' import type { HardhatUserConfig, HttpNetworkUserConfig } from 'hardhat/types' import yargs from 'yargs/yargs' -import { getSingletonFactoryInfo } from "@safe-global/safe-singleton-factory"; -import { DeterministicDeploymentInfo } from "hardhat-deploy/dist/types"; +import { getSingletonFactoryInfo } from '@safe-global/safe-singleton-factory' +import { DeterministicDeploymentInfo } from 'hardhat-deploy/dist/types' import './src/tasks/localVerify' import './src/tasks/deployContracts' import './src/tasks/codesize' @@ -47,24 +47,24 @@ const soliditySettings = SOLIDITY_SETTINGS } const deterministicDeployment = (network: string): DeterministicDeploymentInfo => { - const info = getSingletonFactoryInfo(parseInt(network)); - if (!info) { - throw new Error(` + const info = getSingletonFactoryInfo(parseInt(network)) + if (!info) { + throw new Error(` Safe factory not found for network ${network}. You can request a new deployment at https://github.com/safe-global/safe-singleton-factory. For more information, see https://github.com/safe-global/safe-smart-account#replay-protection-eip-155 - `); - } + `) + } + + const gasLimit = BigInt(info.gasLimit) + const gasPrice = BigInt(info.gasPrice) - const gasLimit = BigInt(info.gasLimit) - const gasPrice = BigInt(info.gasPrice) - - return { - factory: info.address, - deployer: info.signerAddress, - funding: String(gasLimit * gasPrice), - signedTx: info.transaction, - }; -}; + return { + factory: info.address, + deployer: info.signerAddress, + funding: String(gasLimit * gasPrice), + signedTx: info.transaction, + } +} const customNetwork = NODE_URL ? {