Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error for evm revert #511

Merged
merged 2 commits into from
Jun 3, 2024
Merged

Add error for evm revert #511

merged 2 commits into from
Jun 3, 2024

Conversation

udpatil
Copy link
Contributor

@udpatil udpatil commented Jun 1, 2024

Describe your changes and provide context

This adds an error code for evm revert, and updates the tx result with it in the case of evm response containing a VM Error

Testing performed to validate your change

Tested on local chain

Copy link

codecov bot commented Jun 1, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 55.32%. Comparing base (d5e83d2) to head (f3e2621).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #511   +/-   ##
=======================================
  Coverage   55.32%   55.32%           
=======================================
  Files         631      631           
  Lines       54173    54178    +5     
=======================================
+ Hits        29970    29974    +4     
- Misses      22060    22061    +1     
  Partials     2143     2143           
Files Coverage Δ
types/errors/errors.go 85.04% <ø> (ø)
baseapp/abci.go 52.40% <16.66%> (-0.31%) ⬇️

... and 2 files with indirect coverage changes

@@ -156,6 +156,9 @@ var (
// ErrUnsupportedTxType defines an error for an unsupported transaction type (e.g., EIP-4844 transactions)
ErrUnsupportedTxType = Register(RootCodespace, 44, "unsupported transaction type")

// ErrEVMVMError defines an error for an evm vm error (eg. revert)
ErrEVMVMError = Register(RootCodespace, 45, "evm vm error")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about evm reverted? (Often it's some contract validation that reverts, so it's not really a broken thing)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah sounds good

@udpatil udpatil requested a review from Kbhat1 June 3, 2024 14:28
@udpatil udpatil merged commit aefbf94 into main Jun 3, 2024
14 of 15 checks passed
@udpatil udpatil deleted the evm-err-cosmos-code branch June 3, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants