Replies: 2 comments
-
Answer is: just use |
Beta Was this translation helpful? Give feedback.
-
That is the purpose of A |
Beta Was this translation helpful? Give feedback.
-
Answer is: just use |
Beta Was this translation helpful? Give feedback.
-
That is the purpose of A |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Ethers Version
6.3.0
Search Terms
toQuantity, hexlify
Describe the Problem
toQuantity
method trims away the leading 0s from the hexlify result if it so happens to start with a 0. That makes it uncompatible with it's reverse method, getBytes(), as getBytes() requires a 66 length BytesLike value. A "invalid BytesLike value" error is thrown.Code Snippet
Contract ABI
No response
Errors
Environment
Ethereum (mainnet/ropsten/rinkeby/goerli), Hardhat
Environment (Other)
No response
Beta Was this translation helpful? Give feedback.
All reactions