plugeth/accounts
Marius van der Wijden 0b3f3be2b5
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>
2020-06-08 11:09:49 +03:00
..
abi internal/ethapi: return revert reason for eth_call (#21083) 2020-06-08 11:09:49 +03:00
external all: fix typos in comments (#21118) 2020-05-25 10:21:28 +02:00
keystore accounts/keystore, cmd/faucet: return old account to allow unlock 2020-06-04 10:57:21 +03:00
scwallet all: fix typos in comments (#21118) 2020-05-25 10:21:28 +02:00
usbwallet accounts/usbwallet: fix staticcheck warnings (#20372) 2019-11-29 11:47:14 +01:00
accounts_test.go all: update author list and licenses 2019-07-22 12:17:27 +03:00
accounts.go accounts/external: convert signature v value to 0/1 (#20997) 2020-05-01 13:52:41 +02:00
errors.go all: replace passPHRASE with passWORD in user interactions (#19932) 2019-08-12 12:00:38 +03:00
hd_test.go all: fix typos in comments (#21118) 2020-05-25 10:21:28 +02:00
hd.go accounts: switch Ledger derivation path to canonical one 2019-04-10 13:09:08 +03:00
manager.go accounts: add walletsNoLock to avoid double read lock (#20655) 2020-02-12 15:20:50 +01:00
sort.go accounts, console: frendly card errors, support pin unblock 2019-04-08 13:19:37 +02:00
url_test.go all: update author list and licenses 2019-07-22 12:17:27 +03:00
url.go accounts: add unit tests for URL (#17182) 2018-07-18 11:32:49 +03:00