evm: improve error message for invalid account (#883)

* evm: improve error message for invalid account

* fix
This commit is contained in:
Federico Kunze Küllmer
2022-01-05 15:08:31 +01:00
committed by GitHub
parent 8eaffe88a5
commit eea80d50c3
3 changed files with 10 additions and 6 deletions
+4
View File
@@ -32,6 +32,7 @@ const (
codeErrInvalidGasCap
codeErrInvalidBaseFee
codeErrGasOverflow
codeErrInvalidAccount
)
var ErrPostTxProcessing = errors.New("failed to execute post processing")
@@ -93,6 +94,9 @@ var (
// ErrGasOverflow returns an error if gas computation overlow/underflow
ErrGasOverflow = sdkerrors.Register(ModuleName, codeErrGasOverflow, "gas computation overflow/underflow")
// ErrInvalidAccount returns an error if the account is not an EVM compatible account
ErrInvalidAccount = sdkerrors.Register(ModuleName, codeErrInvalidAccount, "account type is not a valid ethereum account")
)
// NewExecErrorWithReason unpacks the revert return bytes and returns a wrapped error