@0x/contracts-test-utils
: Add hexConcat()
in hex_utils.ts
.
This commit is contained in:
parent
527256b416
commit
4734acbe61
@ -29,6 +29,10 @@
|
||||
{
|
||||
"note": "Remove formatters",
|
||||
"pr": 1834
|
||||
},
|
||||
{
|
||||
"note": "Add `hexConcat()` in `hex_utils.ts`",
|
||||
"pr": 1885
|
||||
}
|
||||
]
|
||||
},
|
||||
|
8
contracts/test-utils/src/hex_utils.ts
Normal file
8
contracts/test-utils/src/hex_utils.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import * as ethUtil from 'ethereumjs-util';
|
||||
|
||||
/**
|
||||
* Concatenate all arguments as a hex string.
|
||||
*/
|
||||
export function hexConcat(...args: Array<string | number | Buffer>): string {
|
||||
return ethUtil.bufferToHex(Buffer.concat(args.map(h => ethUtil.toBuffer(h))));
|
||||
}
|
@ -27,6 +27,7 @@ export { OrderFactory } from './order_factory';
|
||||
export { bytes32Values, testCombinatoriallyWithReferenceFuncAsync, uint256Values } from './combinatorial_utils';
|
||||
export { TransactionFactory } from './transaction_factory';
|
||||
export { testWithReferenceFuncAsync } from './test_with_reference';
|
||||
export { hexConcat } from './hex_utils';
|
||||
export {
|
||||
ContractName,
|
||||
ERC20BalancesByOwner,
|
||||
|
Loading…
x
Reference in New Issue
Block a user