@0x/contracts-test-utils
: Add hexConcat()
in hex_utils.ts
.
This commit is contained in:
committed by
Amir Bandeali
parent
527256b416
commit
4734acbe61
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))));
|
||||
}
|
Reference in New Issue
Block a user