mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-04 18:03:43 +00:00
refactor(@embark/deployment): make use of newly introduced ZERO_ADDRESS
This commit is contained in:
parent
8b68beca17
commit
c66fe695f0
@ -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));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user