mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-19 17:14:40 +00:00
refactor (@embark/embark-utils): add ZERO_ADDRESS to embark-utils
refactor (@embark/embark-utils): add ZERO_ADDRESS to embark-utils fix utils
This commit is contained in:
parent
4c8dd79ea9
commit
5f8da19505
@ -4,6 +4,8 @@ const https = require('follow-redirects').https;
|
|||||||
const {canonicalHost, defaultCorsHost, defaultHost, dockerHostSwap, isDocker} = require('./host');
|
const {canonicalHost, defaultCorsHost, defaultHost, dockerHostSwap, isDocker} = require('./host');
|
||||||
const {findNextPort} = require('./network');
|
const {findNextPort} = require('./network');
|
||||||
|
|
||||||
|
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||||
|
|
||||||
function checkIsAvailable(url, callback) {
|
function checkIsAvailable(url, callback) {
|
||||||
const protocol = url.split(':')[0];
|
const protocol = url.split(':')[0];
|
||||||
const httpObj = (protocol === 'https') ? https : http;
|
const httpObj = (protocol === 'https') ? https : http;
|
||||||
@ -58,7 +60,8 @@ const Utils = {
|
|||||||
hashTo32ByteHexString,
|
hashTo32ByteHexString,
|
||||||
isHex,
|
isHex,
|
||||||
soliditySha3,
|
soliditySha3,
|
||||||
recursiveMerge
|
recursiveMerge,
|
||||||
|
ZERO_ADDRESS
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = Utils;
|
module.exports = Utils;
|
||||||
|
@ -2,9 +2,11 @@ import { each } from "async";
|
|||||||
import { Callback, Logger } from "embark";
|
import { Callback, Logger } from "embark";
|
||||||
import { NodeVM, NodeVMOptions } from "vm2";
|
import { NodeVM, NodeVMOptions } from "vm2";
|
||||||
|
|
||||||
|
import {recursiveMerge} from "embark-utils";
|
||||||
|
|
||||||
const fs = require("./fs");
|
const fs = require("./fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const { recursiveMerge, isEs6Module, compact } = require("../../utils/utils");
|
const { isEs6Module, compact } = require("../../utils/utils");
|
||||||
|
|
||||||
const WEB3_INVALID_RESPONSE_ERROR: string = "Invalid JSON RPC response";
|
const WEB3_INVALID_RESPONSE_ERROR: string = "Invalid JSON RPC response";
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import {joinPath, hashTo32ByteHexString, soliditySha3, recursiveMerge} from 'embark-utils';
|
import {joinPath, hashTo32ByteHexString, soliditySha3, recursiveMerge, ZERO_ADDRESS} from 'embark-utils';
|
||||||
const namehash = require('eth-ens-namehash');
|
const namehash = require('eth-ens-namehash');
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
const embarkJsUtils = require('embarkjs').Utils;
|
const embarkJsUtils = require('embarkjs').Utils;
|
||||||
const reverseAddrSuffix = '.addr.reverse';
|
const reverseAddrSuffix = '.addr.reverse';
|
||||||
const ENSFunctions = require('./ENSFunctions');
|
const ENSFunctions = require('./ENSFunctions');
|
||||||
const secureSend = embarkJsUtils.secureSend;
|
const secureSend = embarkJsUtils.secureSend;
|
||||||
import {ZERO_ADDRESS} from '../../utils/addressUtils';
|
|
||||||
import EmbarkJS from 'embarkjs';
|
import EmbarkJS from 'embarkjs';
|
||||||
|
|
||||||
const ENS_WHITELIST = ["eth", "xyz"];
|
const ENS_WHITELIST = ["eth", "xyz"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user