1
0
Fork 0
forked from forks/go-ethereum
go-ethereum-modded-tocallarg/ethclient
Felix Lange e92e22a7cf
ethclient: add RevertErrorData function and example (#30669)
Here I'm adding a new helper function that extracts the revert reason of
a contract call. Unfortunately, this aspect of the API is underspecified.
See these spec issues for more detail:

- https://github.com/ethereum/execution-apis/issues/232
- https://github.com/ethereum/execution-apis/issues/463
- https://github.com/ethereum/execution-apis/issues/523

The function added here only works with Geth-like servers that return
error code `3`. We will not be able to support all possible servers.
However, if there is a specific server implementation that makes it
possible to extract the same info, we could add it in the same function
as well.

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-11-07 20:26:02 +01:00
..
gethclient internal/ethapi: eth_multicall (#27720) 2024-09-06 11:31:00 +02:00
simulated eth/catalyst: use setcanonical instead of sethead in simulated fork (#30465) 2024-09-30 14:46:39 +02:00
ethclient.go ethclient: add RevertErrorData function and example (#30669) 2024-11-07 20:26:02 +01:00
ethclient_test.go ethclient: add RevertErrorData function and example (#30669) 2024-11-07 20:26:02 +01:00
example_test.go ethclient: add RevertErrorData function and example (#30669) 2024-11-07 20:26:02 +01:00
signer.go ethclient: fix tx sender cache miss detection (#23877) 2021-11-17 14:44:41 +01:00
types_test.go ethclient: add RevertErrorData function and example (#30669) 2024-11-07 20:26:02 +01:00