diff --git a/src/random.ts b/src/random.ts new file mode 100644 index 0000000..f4e6382 --- /dev/null +++ b/src/random.ts @@ -0,0 +1,9 @@ +import { utils } from 'ethers' + +export function randomAddress(): string { + return randomHex(20) +} + +export function randomHex(length: number): string { + return utils.hexlify(utils.randomBytes(length)) +}