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

EVM errors use inconsistent casing #3943

Open
scorbajio opened this issue Mar 27, 2025 · 1 comment · May be fixed by #3968
Open

EVM errors use inconsistent casing #3943

scorbajio opened this issue Mar 27, 2025 · 1 comment · May be fixed by #3968

Comments

@scorbajio
Copy link
Contributor

eof errors have a different casing than the evm's own errors:

        // If value is nonzero and in static mode, throw:
        if (runState.interpreter.isStatic() && value !== BIGINT_0) {
          trap(ERROR.STATIC_STATE_CHANGE)
        }

        // If value > 0, charge CALL_VALUE_COST
        if (value > BIGINT_0) {
          gas += common.param('callValueTransferGas')
        }

        // Check if the target address > 20 bytes
        if (toAddr > EXTCALL_TARGET_MAX) {
          trap(EOFError.InvalidExtcallTarget)
        }

STATIC_STATE_CHANGE is snake case and InvalidExtcallTarget is camel case. It would be more consistent if they were the same casing.

@jochem-brouwer
Copy link
Member

We should update the EOF errors to use the snake case format, so InvalidExtcallTarget -> INVALID_EXTCALL_TARGET and for the other errors as well 😄 👍

@scorbajio scorbajio linked a pull request Apr 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants