A bug found in simulateBlocks #3444
Replies: 2 comments
-
A PR has been submitted #3445 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Merged! 🎉 |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, viem developer team.
When I make a simulateCalls request (which internally calls simulateBlocks), the response may look like this:
The corresponding ABI is:
However, this response cannot be decoded using
decodeFunctionResult
(insimulateBlocks
) because thereturnData
is "0x".To handle this issue, I added a condition to check if
data !== '0x'
, and everything works fine now:viem/src/actions/public/simulateBlocks.ts
Line 246 in 06518ed
Beta Was this translation helpful? Give feedback.
All reactions