fix(core/vm): make all opcodes proper type #30925#2290
fix(core/vm): make all opcodes proper type #30925#2290gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR corrects opcode constant typing in the EVM opcode definitions so DUP and SWAP opcode ranges are explicitly typed as vm.OpCode, aligning them with the rest of the opcode constants.
Changes:
- Type
DUP1(and thus the entire DUP iota block) asOpCode. - Type
SWAP1(and thus the entire SWAP iota block) asOpCode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed changes
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.
Ref: ethereum#30925
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that