FixedNumber.toHexString gives incorrect results for negative numbers #2720
Answered
by
ricmoo
abazlinton
asked this question in
Q&A
-
Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
ricmoo
Feb 20, 2022
Replies: 1 comment 3 replies
-
FixedNumber returns the normalized 2’s compliment value, for its width, that is compatible with the decimal types in Solidity, Vyper, etc. BigNumber does not support this implicitly, because a BigNumber doesn’t have a known width to sign extend to. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
abazlinton
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FixedNumber returns the normalized 2’s compliment value, for its width, that is compatible with the decimal types in Solidity, Vyper, etc.
BigNumber does not support this implicitly, because a BigNumber doesn’t have a known width to sign extend to.