diff --git a/deploy/2_deploy_SimpleAccountFactory.ts b/deploy/2_deploy_SimpleAccountFactory.ts index d1716d4..33b81ae 100644 --- a/deploy/2_deploy_SimpleAccountFactory.ts +++ b/deploy/2_deploy_SimpleAccountFactory.ts @@ -5,6 +5,11 @@ import { ethers } from 'hardhat' const deploySimpleAccountFactory: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const provider = ethers.provider const from = await provider.getSigner().getAddress() + const network = await provider.getNetwork() + // only deploy on local test network. + if (network.chainId !== 31337 && network.chainId !== 1337) { + return + } const entrypoint = await hre.deployments.get('EntryPoint') const ret = await hre.deployments.deploy(