usyd-blockchain / vandal

Static program analysis framework for Ethereum smart contract bytecode.
BSD 3-Clause "New" or "Revised" License
161 stars 39 forks source link

Wrong hex code of CREATE2 #61

Closed gsalzer closed 4 years ago

gsalzer commented 4 years ago

In file src/opcodes.py, replace the line

CREATE2 = OpCode("CREATE2", 0xfb, 4, 1)

by

CREATE2 = OpCode("CREATE2", 0xf5, 4, 1)

The hex code of CREATE2 is 0xf5, not 0xfb.

Furthermore I suggest to integrate the lines below the headline

# New Byzantinium OpCodes for block.number >= BYZANTIUM_FORK_BLKNUM

into the general list of instructions, since the Constantinople opcodes, even newer than Byzantinium, have been integrated there as well.

b-scholz commented 4 years ago

@gsalzer - please could you create a pull-request. I am happy to accept.

gsalzer commented 4 years ago

@b-scholz done