2018-06-19 19:15:43 +00:00
|
|
|
import ../nimbus/vm/code_stream, ../nimbus/vm/interpreter/opcode_values, strformat
|
2018-05-18 10:57:55 +00:00
|
|
|
|
|
|
|
var c = newCodeStreamFromUnescaped("0x6003600202600055")
|
|
|
|
|
|
|
|
let opcodes = c.decompile()
|
|
|
|
for op in opcodes:
|
|
|
|
echo &"[{op[0]}]\t{op[1]}\t{op[2]}"
|
|
|
|
|
|
|
|
# [1] PUSH1 0x03
|
|
|
|
# [3] PUSH1 0x02
|
|
|
|
# [4] MUL
|
|
|
|
# [6] PUSH1 0x00
|
|
|
|
# [7] SSTORE
|
|
|
|
# [-1] STOP
|