Skip to content

Commit

Permalink
core/vm: make INVALID a defined opcode (ethereum#24017)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Feb 23, 2024
1 parent 737609a commit ed0d2aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions core/vm/opcodes.go
Expand Up @@ -212,6 +212,7 @@ const (

STATICCALL OpCode = 0xfa
REVERT OpCode = 0xfd
INVALID OpCode = 0xfe
SELFDESTRUCT OpCode = 0xff
)

Expand Down Expand Up @@ -376,6 +377,7 @@ var opCodeToString = map[OpCode]string{
CREATE2: "CREATE2",
STATICCALL: "STATICCALL",
REVERT: "REVERT",
INVALID: "INVALID",
SELFDESTRUCT: "SELFDESTRUCT",
}

Expand Down Expand Up @@ -529,6 +531,7 @@ var stringToOp = map[string]OpCode{
"RETURN": RETURN,
"CALLCODE": CALLCODE,
"REVERT": REVERT,
"INVALID": INVALID,
"SELFDESTRUCT": SELFDESTRUCT,
}

Expand Down
Expand Up @@ -59,7 +59,7 @@
"result": {
"calls": [
{
"error": "invalid opcode: opcode 0xfe not defined",
"error": "invalid opcode: INVALID",
"from": "0x33056b5dcac09a9b4becad0e1dcf92c19bd0af76",
"gas": "0x75fe3",
"gasUsed": "0x75fe3",
Expand Down

0 comments on commit ed0d2aa

Please sign in to comment.