From cbb1fab481166dbb2c1ba4a055debd14e9053f9e Mon Sep 17 00:00:00 2001 From: islishude Date: Sun, 24 Mar 2024 13:00:19 +0800 Subject: [PATCH] internal/ethapi: add 0x prefix for the revert bytes --- internal/ethapi/errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ethapi/errors.go b/internal/ethapi/errors.go index 3d2cff6efc..cec2e3903b 100644 --- a/internal/ethapi/errors.go +++ b/internal/ethapi/errors.go @@ -50,7 +50,7 @@ func newRevertError(revert []byte) *revertError { if errUnpack == nil { err = fmt.Errorf("%w: %v", vm.ErrExecutionReverted, reason) } else if len(revert) >= 4 { - err = fmt.Errorf("execution reverted with a custom error: %x", revert) + err = fmt.Errorf("execution reverted with a custom error: %#x", revert) } return &revertError{ error: err,