neo-decompiler 0.11.0

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
use crate::disassembler::UnknownHandling;
use crate::error::Result;
use crate::manifest::ContractManifest;

pub(super) fn parse_manifest(
    manifest_json: Option<&str>,
    strict: bool,
) -> Result<Option<ContractManifest>> {
    manifest_json
        .map(|json| {
            if strict {
                ContractManifest::from_json_str_strict(json)
            } else {
                ContractManifest::from_json_str(json)
            }
        })
        .transpose()
}

pub(super) fn unknown_handling(fail_on_unknown_opcodes: bool) -> UnknownHandling {
    if fail_on_unknown_opcodes {
        UnknownHandling::Error
    } else {
        UnknownHandling::Permit
    }
}