Skip to content

Instantly share code, notes, and snippets.

@rishub
Created June 10, 2020 18:22
Show Gist options
  • Save rishub/b33945fe2f903aab54e56c95831cf189 to your computer and use it in GitHub Desktop.
Save rishub/b33945fe2f903aab54e56c95831cf189 to your computer and use it in GitHub Desktop.

For example, previously an eth_call may have returned this:

{'id': 2, 'jsonrpc': '2.0', 'result': '0x'}

And now under 1.9.15, it will return this:

{'error': {'code': -32000,
 'message': 'insufficient funds for gas * price + value'},
 'id': 2,
 'jsonrpc': '2.0'}

Another example is for reverts, previous results would be encoded with an error hex like this:

{'id': 1337,
	 'jsonrpc': '2.0',
	 'result': '0x08c379a00000...}

In 1.9.15, this now has a revert reason:

{'error': {'code': 3,
           'data': '0x08c379a...',
           'message': 'execution reverted: HAS_NEVER_OWNED_KEY'},
'id': 1337,
'jsonrpc': '2.0'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment