Skip to content

overflow reading uint256 public constant containing a large value #4193

Answered by ricmoo
rjwalters asked this question in Q&A
Discussion options

You must be logged in to vote

That’s because you are passing in a JavaScript number. If you are passing in a value beyond the ieee 754 safe range, you must either pass in a string or an ES2020 BigInt.

This is a safety check because if you use large JavaScript numbers there is no way to ensure there wasn’t precision loss.

How are you passing this value in?

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by rjwalters
Comment options

You must be logged in to vote
3 replies
@ricmoo
Comment options

@rjwalters
Comment options

@rjwalters
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants