Skip to content

Commit

Permalink
document why we start EVM exit codes at 33
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Feb 20, 2024
1 parent cf910a8 commit eb83497
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion chain/actors/builtin/evm/actor.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ import (

var Methods = builtin{{.latestVersion}}.MethodsEVM

// See https://github.com/filecoin-project/builtin-actors/blob/6e781444cee5965278c46ef4ffe1fb1970f18d7d/actors/evm/src/lib.rs#L35-L42
const (
ErrReverted exitcode.ExitCode = iota + 33
ErrReverted exitcode.ExitCode = iota + 33 // EVM exit codes start at 33
ErrInvalidInstruction
ErrUndefinedInstruction
ErrStackUnderflow
Expand Down
3 changes: 2 additions & 1 deletion chain/actors/builtin/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import (

var Methods = builtin12.MethodsEVM

// See https://github.com/filecoin-project/builtin-actors/blob/6e781444cee5965278c46ef4ffe1fb1970f18d7d/actors/evm/src/lib.rs#L35-L42
const (
ErrReverted exitcode.ExitCode = iota + 33
ErrReverted exitcode.ExitCode = iota + 33 // EVM exit codes start at 33
ErrInvalidInstruction
ErrUndefinedInstruction
ErrStackUnderflow
Expand Down

0 comments on commit eb83497

Please sign in to comment.