Neo.Disassembler.CSharp
3.10.0
Prefix Reserved
dotnet add package Neo.Disassembler.CSharp --version 3.10.0
NuGet\Install-Package Neo.Disassembler.CSharp -Version 3.10.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Neo.Disassembler.CSharp" Version="3.10.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Neo.Disassembler.CSharp" Version="3.10.0" />
<PackageReference Include="Neo.Disassembler.CSharp" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Neo.Disassembler.CSharp --version 3.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Neo.Disassembler.CSharp, 3.10.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Neo.Disassembler.CSharp@3.10.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Neo.Disassembler.CSharp&version=3.10.0
#tool nuget:?package=Neo.Disassembler.CSharp&version=3.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Neo.Disassembler.CSharp
A disassembler for NeoVM bytecode that converts compiled Neo smart contracts back into readable C#-like instructions.
Features
- NeoVM Disassembly: Convert NeoVM bytecode to human-readable instructions
- Debug Info Parsing: Parse and utilize debug information for source mapping
- Method Extraction: Extract and display individual contract methods
- Instruction Analysis: Detailed opcode analysis with parameter decoding
Installation
dotnet add package Neo.Disassembler.CSharp
Usage
Basic Disassembly
using Neo.Disassembler.CSharp;
using Neo.SmartContract;
// Load a NEF file
var nef = Neo.IO.Helper.AsSerializable<NefFile>(File.ReadAllBytes("contract.nef"));
// Disassemble the entire script
var instructions = Disassembler.ConvertScriptToInstructions(nef.Script);
foreach (var (address, instruction) in instructions)
{
Console.WriteLine($"{address:X4}: {instruction}");
}
Method-Specific Disassembly
// Disassemble a specific method using debug info
var debugInfo = JObject.Parse(File.ReadAllText("contract.debug.json"));
var method = Disassembler.GetMethod(methodDescriptor, debugInfo);
var (start, end) = Disassembler.GetMethodStartEndAddress(method);
var methodInstructions = Disassembler.ConvertMethodToInstructions(nef, start, end);
API Reference
Main Classes
Disassembler- Core disassembly functionalityInstruction- Represents a single NeoVM instructionDebugInfo- Debug information parser
Integration
This package is used by:
- Neo.SmartContract.Testing - For test coverage analysis
- Neo.Compiler.CSharp - For debugging support
License
MIT - See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Neo (>= 3.10.0)
- Neo.Extensions (>= 3.10.0)
- Neo.IO (>= 3.10.0)
- Neo.Json (>= 3.10.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Neo.Disassembler.CSharp:
| Package | Downloads |
|---|---|
|
R3E.SmartContract.Testing
TestEngine for NEO smart contract testing. |
|
|
Neo.SmartContract.Testing
TestEngine for NEO smart contract testing. |
GitHub repositories
This package is not used by any popular GitHub repositories.