From 023e20374e0c4cd061e772844a3d16f2326e89d4 Mon Sep 17 00:00:00 2001 From: ucwong Date: Wed, 18 Dec 2024 04:27:57 +0800 Subject: [PATCH] make all opcodes proper type --- core/vm/opcodes.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/vm/opcodes.go b/core/vm/opcodes.go index 58553f6af4..47caef3721 100644 --- a/core/vm/opcodes.go +++ b/core/vm/opcodes.go @@ -154,7 +154,11 @@ const ( PUSH30 PUSH31 PUSH32 - DUP1 +) + +// 0x80 range - dups. +const ( + DUP1 OpCode = 0x80 + iota DUP2 DUP3 DUP4 @@ -170,7 +174,11 @@ const ( DUP14 DUP15 DUP16 - SWAP1 +) + +// 0x90 range - swaps. +const ( + SWAP1 OpCode = 0x90 + iota SWAP2 SWAP3 SWAP4