Refactor contracts-core into contracts-multisig, contracts-core and contracts-test-utils

This commit is contained in:
Leonid Logvinov
2018-11-23 14:03:48 +01:00
parent 450c72035f
commit 0faa8b3231
82 changed files with 5670 additions and 213 deletions

View File

@@ -0,0 +1,11 @@
import { generatePseudoRandomSalt } from '@0x/order-utils';
import { crypto } from '@0x/order-utils/lib/src/crypto';
export const addressUtils = {
generatePseudoRandomAddress(): string {
const randomBigNum = generatePseudoRandomSalt();
const randomBuff = crypto.solSHA3([randomBigNum]);
const randomAddress = `0x${randomBuff.slice(0, 20).toString('hex')}`;
return randomAddress;
},
};