deploy script: deploy factory only on test networks. (#260)

* deploy script: deploy factory only on test networks.
This commit is contained in:
Dror Tirosh
2023-04-24 19:32:00 +03:00
committed by GitHub
parent 9b5f2e4bb3
commit e7a2efc8c2

View File

@@ -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(