neo-decompiler 0.8.1

Neo N3 NEF decompiler: parse, disassemble, lift bytecode to high-level pseudocode and C# skeletons, with a CLI, JSON reports, and optional WebAssembly bindings.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::{make_instr, CfgBuilder, OpCode};

#[test]
fn cfg_to_dot_produces_valid_output() {
    let instructions = vec![
        make_instr(0, OpCode::Push0, None),
        make_instr(1, OpCode::Ret, None),
    ];

    let cfg = CfgBuilder::new(&instructions).build();
    let dot = cfg.to_dot();

    assert!(dot.contains("digraph CFG"));
    assert!(dot.contains("BB0"));
}