OffchainLabs / go-ethereum

GNU Lesser General Public License v3.0
52 stars 88 forks source link

Parse ABI errors in abi/bind #287

Closed PlasmaPower closed 5 months ago

PlasmaPower commented 5 months ago

Newer Solidity versions support returning ABI encoded errors, instead of the old string errors. This PR updates abi/bind to parse them, and provide nice errors like execution reverted: NoSuchKeyset(0x0100000000000000000000000000000000000000000000000000000000000000)

This can't decode the errors of anything called by the target contract unless it also includes those errors, but this should already be a big improvement.

This PR also updates the incorrect (or rather, too vague) return type of the Error Unpack method.