Skip to content

Commit

Permalink
deploy script: deploy factory only on test networks. (#260)
Browse files Browse the repository at this point in the history
* deploy script: deploy factory only on test networks.
  • Loading branch information
drortirosh authored Apr 24, 2023
1 parent 9b5f2e4 commit e7a2efc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deploy/2_deploy_SimpleAccountFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e7a2efc

Please sign in to comment.