diff --git a/src/lib/modules/deployment/contract_deployer.js b/src/lib/modules/deployment/contract_deployer.js index a8b78a324..e4a787f10 100644 --- a/src/lib/modules/deployment/contract_deployer.js +++ b/src/lib/modules/deployment/contract_deployer.js @@ -1,6 +1,7 @@ let async = require('async'); //require("../utils/debug_util.js")(__filename, async); let utils = require('../../utils/utils.js'); +import { ZERO_ADDRESS } from '../../utils/addressUtils'; class ContractDeployer { constructor(options) { @@ -45,7 +46,7 @@ class ContractDeployer { self.events.request('contracts:contract', contractName, (referedContract) => { // Because we're referring to a contract that is not being deployed (ie. an interface), // we still need to provide a valid address so that the ABI checker won't fail. - cb(null, (referedContract.deployedAddress || '0x0000000000000000000000000000000000000000')); + cb(null, (referedContract.deployedAddress || ZERO_ADDRESS)); }); } diff --git a/src/lib/utils/addressUtils.ts b/src/lib/utils/addressUtils.ts index 53b6878c3..9c9b6694c 100644 --- a/src/lib/utils/addressUtils.ts +++ b/src/lib/utils/addressUtils.ts @@ -1,6 +1,6 @@ const ZERO_ADDRESS_SHORTHAND_REGEX = /^0x0$/; const ZERO_ADDRESS_SHORTHAND_SEARCH_REGEX = /'0x0'/g; -const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; +export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; export function extendZeroAddressShorthand(value: string) { if (value.match(ZERO_ADDRESS_SHORTHAND_REGEX) !== null) {