WTF-EVM-Opcodes icon indicating copy to clipboard operation
WTF-EVM-Opcodes copied to clipboard

fix python code in SIGNEXTEND opcode

Open gitglorythegreat opened this issue 8 months ago • 0 comments

  1. b == 31时,b 为最高字节位,不需要扩展。
  2. b0时,8 * b - 1-1,明显可以看出原来的代码有错。操作数都是 256 bit,字节位是从 0 到 31,所以应该是8 * (b + 1) - 1
  3. 置1后,需要取余将结果变回 256 bit 非负数。

gitglorythegreat avatar Jun 25 '24 07:06 gitglorythegreat