revertresolver

command
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: MIT Imports: 7 Imported by: 0

README

Revert Resolver

This is a tool for parsing a revert message from a raw trace error corresponding to the hash of a custom error type. Sometimes this hash is not useful because we don't know the actual revert reason. For example, if when running cast run <hash>, we encounter this error:

0xeb9266

Then we can run:

go run main.go -p ../../packages/contracts-core -f 0xeb9266

which will resolve to the reason:

UnformattedAttestation(): 0xeb92662c687ecb0d91cd0350e030a511efe609e0ecfff5618dd8fbce75158ce1 (File: contracts/libs/memory/Attestation.sol, Line: 103)

Note that the -f flag is optional; if unspecified, the script will yield all revert reasons as output (with their corresponding hashes).

This tool is currently limited to error emits that don't take any parameters. A future version will use the abigen'd info.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL