mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-16 23:57:11 +00:00
refactor(@embark/utils): move toChecksumAddress to embark-utils
This commit is contained in:
parent
c30f742c38
commit
a69f619cf7
@ -15,7 +15,8 @@ import {
|
|||||||
decodeParams,
|
decodeParams,
|
||||||
sha3,
|
sha3,
|
||||||
isHex,
|
isHex,
|
||||||
soliditySha3
|
soliditySha3,
|
||||||
|
toChecksumAddress
|
||||||
} from './web3Utils';
|
} from './web3Utils';
|
||||||
import { getAddressToContract, getTransactionParams } from './transactionUtils';
|
import { getAddressToContract, getTransactionParams } from './transactionUtils';
|
||||||
import LongRunningProcessTimer from './longRunningProcessTimer';
|
import LongRunningProcessTimer from './longRunningProcessTimer';
|
||||||
@ -216,6 +217,7 @@ const Utils = {
|
|||||||
LogHandler: require('./logHandler'),
|
LogHandler: require('./logHandler'),
|
||||||
LongRunningProcessTimer,
|
LongRunningProcessTimer,
|
||||||
proposeAlternative,
|
proposeAlternative,
|
||||||
|
toChecksumAddress,
|
||||||
toposort,
|
toposort,
|
||||||
AddressUtils,
|
AddressUtils,
|
||||||
AccountParser
|
AccountParser
|
||||||
|
@ -51,3 +51,7 @@ export function isHex(hex: string) {
|
|||||||
export function soliditySha3(arg: any) {
|
export function soliditySha3(arg: any) {
|
||||||
return web3.utils.soliditySha3(arg);
|
return web3.utils.soliditySha3(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function toChecksumAddress(address: any) {
|
||||||
|
return web3.utils.toChecksumAddress(address);
|
||||||
|
}
|
||||||
|
@ -287,11 +287,6 @@ function isValidDomain(v) {
|
|||||||
return isValid;
|
return isValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toChecksumAddress(address) {
|
|
||||||
const Web3 = require('web3');
|
|
||||||
return Web3.utils.toChecksumAddress(address);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a URL
|
* Builds a URL
|
||||||
*
|
*
|
||||||
@ -445,7 +440,6 @@ module.exports = {
|
|||||||
extractTar,
|
extractTar,
|
||||||
extractZip,
|
extractZip,
|
||||||
getExternalContractUrl,
|
getExternalContractUrl,
|
||||||
toChecksumAddress,
|
|
||||||
normalizeInput,
|
normalizeInput,
|
||||||
buildUrl,
|
buildUrl,
|
||||||
buildUrlFromConfig,
|
buildUrlFromConfig,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user