evmone
evmone copied to clipboard
Implement EIP-663 variant C
This implement the variant C of the EIP-663 by adding 4 new instructions for EVM stack manipulation: DUPN, SWAPN, DUPSN, SWAPSN.
The function change is only done in the analysis phase when the instruction argument (stack item index) is decode. During execution the same procedure is used as for legacy DUP and SWAP instructions.
Closes #84.
Codecov Report
Merging #98 into master will decrease coverage by
3.05%. The diff coverage is100%.
@@ Coverage Diff @@
## master #98 +/- ##
=========================================
- Coverage 93.46% 90.4% -3.06%
=========================================
Files 18 18
Lines 1866 1938 +72
Branches 197 202 +5
=========================================
+ Hits 1744 1752 +8
- Misses 97 161 +64
Partials 25 25
Unit test suggestions:
- check the case with implicit zero bytes (check at least that it completes sucessfully, maybe check that it's the same gas used as with actual zero args)
- check that it's undefined isntructions before Istanbul
- Two test cases from the EIP spec
Can I close this?