Skip to content

Commit e7a2efc

Browse files
authored
deploy script: deploy factory only on test networks. (#260)
* deploy script: deploy factory only on test networks.
1 parent 9b5f2e4 commit e7a2efc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

deploy/2_deploy_SimpleAccountFactory.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { ethers } from 'hardhat'
55
const deploySimpleAccountFactory: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
66
const provider = ethers.provider
77
const from = await provider.getSigner().getAddress()
8+
const network = await provider.getNetwork()
9+
// only deploy on local test network.
10+
if (network.chainId !== 31337 && network.chainId !== 1337) {
11+
return
12+
}
813

914
const entrypoint = await hre.deployments.get('EntryPoint')
1015
const ret = await hre.deployments.deploy(

0 commit comments

Comments
 (0)