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

Propagate certain reverts encoded as panics #339

Closed
cburgdorf opened this issue Mar 26, 2021 · 1 comment
Closed

Propagate certain reverts encoded as panics #339

cburgdorf opened this issue Mar 26, 2021 · 1 comment

Comments

@cburgdorf
Copy link
Collaborator

What is wrong?

We currently use revert(0,0) in a couple of scenarios that should be formated as panics ( keccak256(Panic(uint256)))
Currently available panics are

0x01: Using assert.
0x11: SafeMath over-/under-flows.
0x12: Divide by 0.
0x21: Conversion into non-existent enum type.
0x22: Incorrectly encoded storage byte array.
0x31: pop() on an empty array.
0x32: Index out of bounds exception.
0x41: Allocating too much memory or creating a too large array.
0x51: Calling a zero-initialized variable of internal function type.

How can it be fixed

🤖

cburgdorf added a commit to cburgdorf/fe that referenced this issue Jul 8, 2021
cburgdorf added a commit to cburgdorf/fe that referenced this issue Jul 8, 2021
@cburgdorf
Copy link
Collaborator Author

I think we can close this even if we don't have implemented all of them yet. We do have the mechanics in place and are using panic/error codes whenever it is appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant