erigon-pulse/internal
Marius van der Wijden 2d592517b9 internal/ethapi: return revert reason for eth_call (#21083)
* internal/ethapi: return revert reason for eth_call

* internal/ethapi: moved revert reason logic to doCall

* accounts/abi/bind/backends: added revert reason logic to simulated backend

* internal/ethapi: fixed linting error

* internal/ethapi: check if require reason can be unpacked

* internal/ethapi: better error logic

* internal/ethapi: simplify logic

* internal/ethapi: return vmError()

* internal/ethapi: move handling of revert out of docall

* graphql: removed revert logic until spec change

* rpc: internal/ethapi: added custom error types

* graphql: use returndata instead of return

Return() checks if there is an error. If an error is found, we return nil.
For most use cases it can be beneficial to return the output even if there
was an error. This code should be changed anyway once the spec supports
error reasons in graphql responses

* accounts/abi/bind/backends: added tests for revert reason

* internal/ethapi: add errorCode to revert error

* internal/ethapi: add errorCode of 3 to revertError

* internal/ethapi: unified estimateGasErrors, simplified logic

* internal/ethapi: unified handling of errors in DoEstimateGas

* rpc: print error data field

* accounts/abi/bind/backends: unify simulatedBackend and RPC

* internal/ethapi: added binary data to revertError data

* internal/ethapi: refactored unpacking logic into newRevertError

* accounts/abi/bind/backends: fix EstimateGas

* accounts, console, internal, rpc: minor error interface cleanups

* Revert "accounts, console, internal, rpc: minor error interface cleanups"

This reverts commit 2d3ef53c5304e429a04983210a417c1f4e0dafb7.

* re-apply the good parts of 2d3ef53c53

* rpc: add test for returning server error data from client

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
# Conflicts:
#	accounts/abi/bind/backends/simulated.go
#	accounts/abi/bind/backends/simulated_test.go
2020-06-15 19:38:13 +03:00
..
build internal/build: don't crash in DownloadFile when offline (#20595) 2020-02-27 17:20:36 +03:00
cmdtest all: fix typos in comments (#21118) 2020-06-15 19:38:13 +03:00
debug Mgr schedule iterator (#566) 2020-05-28 12:33:05 +01:00
ethapi internal/ethapi: return revert reason for eth_call (#21083) 2020-06-15 19:38:13 +03:00
guide Apply Turbo-Geth modifications to go-ethereum codebase 2019-11-01 21:52:03 +01:00
jsre all: fix typos in comments (#21118) 2020-06-15 19:38:13 +03:00
testlog internal/testlog: print file+line number of log call in test log (#20528) 2020-01-30 13:36:30 +02:00
web3ext geth 1.9.13 (#469) 2020-04-19 18:31:47 +01:00