ethers.js
ethers.js copied to clipboard
Pack of "address" as Uint8Array(20)
Ethers Version
6.9.2
Search Terms
abi
Describe the Problem
pack() of "address" with a bytes20-equivalent should just pack directly.
https://github.com/ethers-io/ethers.js/blob/6017d3d39a4d428793bddae33d82fd814cacd878/src.ts/hash/solidity.ts#L83-L89
https://github.com/ethers-io/ethers.js/blob/6017d3d39a4d428793bddae33d82fd814cacd878/src.ts/hash/solidity.ts#L16-L20
Code Snippet
ethers.solidityPackedKeccak256(['address'], [new Uint8Array(20]);
Contract ABI
No response
Errors
TypeError: invalid address (argument="address", value=0x0000000000000000000000000000000000000000, code=INVALID_ARGUMENT, version=6.9.2)
Environment
node.js (v12 or newer)
Environment (Other)
No response