Skip to content

Commit f695210

Browse files
committed
docs(checksum): add reference link
1 parent 9ee4987 commit f695210

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/address.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function validateAndParseAddress(address: BigNumberish): string {
2222
return result;
2323
}
2424

25+
// from https://github.com/ethers-io/ethers.js/blob/fc1e006575d59792fa97b4efb9ea2f8cca1944cf/packages/address/src.ts/index.ts#L12
2526
export function getChecksumAddress(address: BigNumberish): string {
2627
const chars = removeHexPrefix(validateAndParseAddress(address)).toLowerCase().split('');
2728
const hashed = arrayify(pedersen([0, address]), { hexPad: 'left' }); // as the hash will be 251 bits (63 chars) we need to pad it to 64 chars without changing the number value ("left")

0 commit comments

Comments
 (0)