diff --git a/packages/solidity-devops/js/forgeScriptRun.js b/packages/solidity-devops/js/forgeScriptRun.js index 4f61c9393c..a05f1b7eb3 100755 --- a/packages/solidity-devops/js/forgeScriptRun.js +++ b/packages/solidity-devops/js/forgeScriptRun.js @@ -3,6 +3,7 @@ const fs = require('fs') const { readChainSpecificOptions, + readChainVerificationOptions, logWallet, isVerifierEnabled, } = require('./utils/chain.js') @@ -18,7 +19,7 @@ const { logInfo } = require('./utils/logger.js') const { parseCommandLineArgs, isBroadcasted, - addVerifyOptions, + addVerifyIfNotPresent, addOptions, } = require('./utils/options.js') const { assertCondition } = require('./utils/utils.js') @@ -47,7 +48,11 @@ let forgeOptions = addOptions( forgeOptions = addOptions(forgeOptions, readChainSpecificOptions(chainName)) forgeOptions = addOptions(forgeOptions, options) if (isBroadcast && isVerifierEnabled(chainName)) { - forgeOptions = addVerifyOptions(forgeOptions) + forgeOptions = addOptions( + forgeOptions, + readChainVerificationOptions(chainName) + ) + forgeOptions = addVerifyIfNotPresent(forgeOptions) } const currentTimestamp = Date.now() diff --git a/packages/solidity-devops/js/utils/options.js b/packages/solidity-devops/js/utils/options.js index 661b5ddf98..f25bb8bc63 100644 --- a/packages/solidity-devops/js/utils/options.js +++ b/packages/solidity-devops/js/utils/options.js @@ -28,7 +28,7 @@ const isBroadcasted = (options) => { return options.includes('--broadcast') } -const addVerifyOptions = (options) => { +const addVerifyIfNotPresent = (options) => { return options.includes('--verify') ? options : `${options} --verify` } @@ -39,6 +39,6 @@ const addOptions = (options, newOptions) => { module.exports = { parseCommandLineArgs, isBroadcasted, - addVerifyOptions, + addVerifyIfNotPresent, addOptions, }