我无法确定如何获取交易的状态,即失败并返回错误&001010";。
能够显示错误消息或还原原因。取决于EVM客户端(GoEtherum、Erigon、Ganache、Etherum Tester等)没有防弹标准。
客户端只存储接收字段status
,即0
或1
(=成功)
客户端不存储还原原因(我在这一点上可能是错误的,最近发生了变化)
若要获取实际的错误消息,您需要使用特殊的eth_call
JSON-RPC重播事务和特定的块高度。
Here is a Javascript library for doing it和a related blog post about the topic。