Execution reverted for an unknown reason, better return #1579
Unanswered
joaofranciscoguarda
asked this question in
Idea / Feature Request
Replies: 1 comment
-
You can use viem/src/actions/public/simulateContract.ts Lines 305 to 314 in 5f350ec |
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
-
Problem: Custom erc721 contract error not returning usefull information
Suggestion:
Returning the keccak256 or the already readable error message, such as Tendely does. Or returning the RPC response within the error message.
Execution:
Tendely:
Viem is very powerfull and can't let this pass. I'm using viem for a back-end project, the errors and solutions provided are very handy, but returning nothing is a problem, very hard to debug with nothing usefull in the logs.
I'm using
estimateGas
to avoid usingsimulateContract
, because I had to pass to much information (such as the ABI) when it's not needed to send all those information only to simulate (and because even with wrong data or addresses the simulate passes, so using .call( ) it's not safe enough for the situation), and to continue the process, having the needed gas is needed, so, it fits perfectly in the use case. In the execution I'm usingsendRawTransaction
The error in case is related to someone that already minted an assets, so would be perfect to handle a already minted case, but I can't know if it's the case when the error is "blank"
Ps: It's not a rpc error, the logs show a try in 3 different rpc, same error in 3 tries.
Beta Was this translation helpful? Give feedback.
All reactions