From b4b35d7521c4cd494744174cc6575969fcd928ca Mon Sep 17 00:00:00 2001 From: Martin HS Date: Tue, 17 Dec 2024 18:37:29 +0100 Subject: [PATCH] fix(core/vm): make all opcodes proper type #30925 Noticed this omission while doing some work on goevmlab. We don't properly type some of the opcodes, but apparently implicit casting works in all the internal usecases. --- core/vm/opcodes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index d094b4e05c28..6cb60bc31c40 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -163,7 +163,7 @@ const ( // 0x80 range - dups. const ( - DUP1 = 0x80 + iota + DUP1 OpCode = 0x80 + iota DUP2 DUP3 DUP4 @@ -183,7 +183,7 @@ const ( // 0x90 range - swaps. const ( - SWAP1 = 0x90 + iota + SWAP1 OpCode = 0x90 + iota SWAP2 SWAP3 SWAP4