calling contract method with many return values gives overflow (fault="overflow", operation="toNumber", value="<LARGE_NUMBER>", code=NUMERIC_FAULT, version=bignumber/5.5.0) #2282
Unanswered
michaeljohnbennett
asked this question in
Q&A
Replies: 1 comment
-
At some point in your react code, there must be a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a somewhat similar issue to other discussions but it appears to be a problem when I have a
public view
function returning a few arrays.I'm using typechain on top of ethers.js and I have this solidity function i call:
and the ABI is:
Which give me a typechain definition of:
When I make a call on the hardhat console for instance it all returns fine.
When I use it on a react frontend, talking to my localhost hardhat node via metamask I get this error:
If I take away some of the output arrays it works. All i'm doing on the react side is calling the method on the contract (all the other method calls work fine) and when I inspect the object I can see each of the collections is an error similar to this.
React app deps:
Also, splitting them into smaller view functions works as well, it seems when there are more than 6 elements to be returned it doesn't like it.
Beta Was this translation helpful? Give feedback.
All reactions