useSimulateContract with BigInt argument throws "TypeError: Do not know how to serialize a BigInt" #2833
Closed
1 task done
Labels
needs reproduction
Misc: Needs Reproduction
Check existing issues
Viem Version
2.21.18
Current Behavior
Throws with:
Somewhere in the source
JSON.stringify
is used, but that built-in method does not support the native BigInt. This is a known issue and the reason for libraries like safe-stable-stringify (14m weekly downloads 😬).Expected Behavior
Should succeed.
Steps To Reproduce
Run the cod above.
Link to Minimal Reproducible Example
https://too_little_bandwidth_sorry.fyi
Anything else?
No response
The text was updated successfully, but these errors were encountered: