Skip to content

Commit

Permalink
fix(pg): replace spinner in chugsplash-deploy task due to clash with …
Browse files Browse the repository at this point in the history
…hardhat
  • Loading branch information
sam-goldman committed Nov 6, 2022
1 parent 57b1e55 commit 5ce19b6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-dots-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chugsplash/plugins': patch
---

Replace spinner in chugsplash-deploy task due to clash with Hardhat's logs
16 changes: 4 additions & 12 deletions packages/plugins/src/hardhat/deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
ChugSplashConfig,
getProxyAddress,
loadChugSplashConfig,
writeSnapshotId,
isSetImplementationAction,
fromRawChugSplashAction,
isEmptyChugSplashConfig,
Expand All @@ -19,21 +18,19 @@ import {
parseChugSplashConfig,
createDeploymentFolderForNetwork,
writeDeploymentArtifact,
log,
} from '@chugsplash/core'
import {
ChugSplashManagerABI,
OWNER_BOND_AMOUNT,
EXECUTOR_BOND_AMOUNT,
ProxyABI,
} from '@chugsplash/contracts'
import ora from 'ora'
import { getChainId } from '@eth-optimism/core-utils'

import {
getConstructorArgValues,
getContractArtifact,
generateRuntimeBytecode,
getDeployedBytecode,
getStorageLayout,
getBuildInfo,
} from './artifacts'
Expand Down Expand Up @@ -80,8 +77,7 @@ export const deployChugSplashConfig = async (
})
const parsedConfig = parseChugSplashConfig(config)

const spinner = ora({ isSilent: hide })
spinner.start(`Deploying: ${parsedConfig.options.projectName}`)
log(`Deploying: ${parsedConfig.options.projectName}`, hide)

// Register the project with the signer as the owner. Once we've completed the deployment, we'll
// transfer ownership to the project owner specified in the config.
Expand Down Expand Up @@ -244,8 +240,6 @@ export const deployChugSplashConfig = async (
}
}

spinner.succeed(`Deployed: ${parsedConfig.options.projectName}`)

if (!hide) {
const deployments = {}
Object.entries(parsedConfig.contracts).forEach(
Expand All @@ -260,8 +254,6 @@ export const deployChugSplashConfig = async (
}

if ((await getChainId(hre.ethers.provider)) !== 31337) {
spinner.start('Generating artifacts...')

createDeploymentFolderForNetwork(
hre.network.name,
hre.config.paths.deployed
Expand Down Expand Up @@ -297,10 +289,10 @@ export const deployChugSplashConfig = async (
artifact,
referenceName
)

spinner.succeed('Generated artifacts.')
}
}

log(`Deployed: ${parsedConfig.options.projectName}`, hide)
}

export const getContract = async (
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/src/hardhat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from './artifacts'
export * from './tasks'
export * from './deployments'
export * from './type-extensions'
export * from './utils'
export * from './utils'

0 comments on commit 5ce19b6

Please sign in to comment.