Skip to content

Commit

Permalink
Fix some smol errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Apr 3, 2024
1 parent a9f4db1 commit f24fb3b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions packages/solidity-devops/js/forgeVerifyContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const contractName = getContractName(contractAlias)
const chainId = getChainId(chainName)
const deployment = getSavedDeployment(chainName, contractAlias)
if (!deployment) {
process.exit(0)
process.exit(1)
}
const chainVerificationOptions = readChainVerificationOptions(chainName)
if (!chainVerificationOptions) {
Expand All @@ -30,7 +30,6 @@ const { address, constructorArgs } = deployment
if (!address) {
logError(`Missing address in deployment file for ${contractAlias}`)
process.exit(1)
process.exit(0)
}
if (!constructorArgs) {
constructorArgs = '0x'
Expand Down
4 changes: 2 additions & 2 deletions packages/solidity-devops/js/utils/cast.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const getChainGasPricingRPC = (rpcUrl) => {
const baseFee = getCommandOutput(`cast base-fee --rpc-url ${rpcUrl}`)
const gasPrice = getCommandOutput(`cast gas-price --rpc-url ${rpcUrl}`)
return {
baseFee,
gasPrice,
baseFee: Number(baseFee),
gasPrice: Number(gasPrice),
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/solidity-devops/js/utils/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {
} = require('./cast.js')
const { tryReadConfigValue } = require('./config.js')
const { readEnv } = require('./env.js')
const { logInfo } = require('./logger.js')
const { logError, logInfo } = require('./logger.js')
const { readWalletAddress, readWalletType } = require('./wallet.js')

const OPTION_AUTO_FILL_GAS_PRICE_LEGACY = '--auto-gas-legacy'
Expand Down
3 changes: 2 additions & 1 deletion packages/solidity-devops/js/utils/etherscan.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { VERIFIER_ETHERSCAN } = require('./chain.js')
const { readEnv } = require('./env.js')
const { getCommandOutput, runCommand, syncSleep } = require('./utils.js')
const { logError, logInfo } = require('./logger.js')
const { getCommandOutput, syncSleep } = require('./utils.js')

const MAX_ATTEMPTS = 10

Expand Down
4 changes: 2 additions & 2 deletions packages/solidity-devops/js/verifyProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { positionalArgs } = parseCommandLineArgs({
const [chainName, contractAlias] = positionalArgs
const deployment = getSavedDeployment(chainName, contractAlias)
if (!deployment) {
process.exit(0)
process.exit(1)
}
const { address } = deployment
if (!address) {
Expand All @@ -29,13 +29,13 @@ const guid = initiateVerifyProxy(chainName, address)
if (!guid) {
process.exit(1)
}
}
const response = getRequestStatus(chainName, 'checkproxyverification', guid)
if (!response) {
process.exit(1)
}
if (response.status === '0') {
logError(`Verification failed: ${response.result}`)
process.exit(1)
} else {
logSuccess(response.result)
}

0 comments on commit f24fb3b

Please sign in to comment.