Skip to content

Commit

Permalink
fix(pg): make language in user logs neutral to deployments/upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-goldman committed Nov 23, 2022
1 parent 0485624 commit a1ae30f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-cars-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chugsplash/plugins': patch
---

Make language in the user logs neutral to deployments/upgrades.
20 changes: 9 additions & 11 deletions packages/plugins/src/hardhat/deployments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const deployChugSplashConfig = async (
hre
)

spinner.start('Checking status of the deployment...')
spinner.start(`Committing ${parsedConfig.options.projectName}...`)

const ChugSplashManager = getChugSplashManager(
signer,
Expand All @@ -153,7 +153,7 @@ export const deployChugSplashConfig = async (
)
await createDeploymentArtifacts(hre, parsedConfig, finalDeploymentTxnHash)
spinner.succeed(
`${parsedConfig.options.projectName} was already deployed on ${hre.network.name}.`
`${parsedConfig.options.projectName} was already completed on ${hre.network.name}.`
)
displayDeploymentTable(parsedConfig, silent)
return
Expand All @@ -167,10 +167,6 @@ export const deployChugSplashConfig = async (
}

if (currBundleStatus === ChugSplashBundleStatus.EMPTY) {
spinner.succeed(
`${parsedConfig.options.projectName} is a fresh deployment.`
)
spinner.start(`Committing ${parsedConfig.options.projectName}.`)
await proposeChugSplashBundle(
hre,
parsedConfig,
Expand All @@ -182,10 +178,10 @@ export const deployChugSplashConfig = async (
currBundleStatus = ChugSplashBundleStatus.PROPOSED
}

spinner.succeed(`Committed the deployment.`)
spinner.succeed(`Committed ${parsedConfig.options.projectName}.`)

if (currBundleStatus === ChugSplashBundleStatus.PROPOSED) {
spinner.start('Funding the deployment...')
spinner.start(`Funding ${parsedConfig.options.projectName}...`)
// Get the amount necessary to fund the deployment.
const executionAmountPlusBuffer = await getExecutionAmountToSendPlusBuffer(
hre.ethers.provider,
Expand All @@ -203,10 +199,12 @@ export const deployChugSplashConfig = async (
hre
)
currBundleStatus = ChugSplashBundleStatus.APPROVED
spinner.succeed('Funded the deployment.')
spinner.succeed(`Funded ${parsedConfig.options.projectName}.`)
}

spinner.start('The deployment is being executed. This may take a moment.')
spinner.start(
`${parsedConfig.options.projectName} is being executed. This may take a moment.`
)

// If executing locally, then startup executor with HRE provider and pass in canonical config
if (!remoteExecution) {
Expand Down Expand Up @@ -235,7 +233,7 @@ export const deployChugSplashConfig = async (
)

// At this point, the bundle has been completed.
spinner.succeed(`${parsedConfig.options.projectName} deployed!`)
spinner.succeed(`${parsedConfig.options.projectName} completed!`)
displayDeploymentTable(parsedConfig, silent)
}

Expand Down
7 changes: 5 additions & 2 deletions packages/plugins/src/hardhat/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export const chugsplashDeployTask = async (
}

task(TASK_CHUGSPLASH_DEPLOY)
.setDescription('Deploys a ChugSplash config file')
.addPositionalParam(
'configPath',
'Path to the ChugSplash config file to deploy'
Expand Down Expand Up @@ -545,7 +546,7 @@ export const chugsplashCommitSubtask = async (
? spinner.start(
`Committing ${parsedConfig.options.projectName} on ${hre.network.name}.`
)
: spinner.start('Loading the deployment info...')
: spinner.start('Building the project...')
}

let configSourceNames = Object.values(parsedConfig.contracts)
Expand Down Expand Up @@ -648,7 +649,9 @@ IPFS_API_KEY_SECRET: ...
? spinner.succeed(
`Committed ${parsedConfig.options.projectName} on ${hre.network.name}.`
)
: spinner.succeed('Loaded the deployment info.')
: spinner.succeed(
`Built ${parsedConfig.options.projectName} on ${hre.network.name}.`
)
}

return { bundle, configUri, bundleId, canonicalConfig }
Expand Down

0 comments on commit a1ae30f

Please sign in to comment.