Neo.SmartContract.Framework
3.10.0
Prefix Reserved
dotnet add package Neo.SmartContract.Framework --version 3.10.0
NuGet\Install-Package Neo.SmartContract.Framework -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.SmartContract.Framework" Version="3.10.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Neo.SmartContract.Framework" Version="3.10.0" />
<PackageReference Include="Neo.SmartContract.Framework" />
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.SmartContract.Framework --version 3.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Neo.SmartContract.Framework, 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.SmartContract.Framework@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.SmartContract.Framework&version=3.10.0
#tool nuget:?package=Neo.SmartContract.Framework&version=3.10.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Neo.SmartContract.Framework
The foundational framework for developing Neo smart contracts in C#. Provides essential types, attributes, and APIs for blockchain development.
Features
- Smart Contract Base:
SmartContractbase class with core functionality - Native Contracts: Access to Neo native contracts (NeoToken, GasToken, etc.)
- Cryptographic APIs: Hashing, encryption, and signature verification
- Storage APIs: Persistent storage operations
- Blockchain Access: Block and transaction information
- Supported Standards: NEP-11, NEP-17, and other standard implementations
Installation
dotnet add package Neo.SmartContract.Framework
Quick Start
using Neo.SmartContract.Framework;
using Neo.SmartContract.Framework.Attributes;
using Neo.SmartContract.Framework.Services;
using System.ComponentModel;
using System.Numerics;
namespace MyContract
{
[DisplayName("MyToken")]
[ContractAuthor("Your Name", "you@example.com")]
[ContractDescription("My NEP-17 Token")]
[ContractVersion("0.0.1")]
[SupportedStandards(NepStandard.Nep17)]
public class MyToken : Nep17Token
{
[Hash160("NXV7ZhHiyM1aHXwpVsRZC6BwNFP2jghXAq")]
private static readonly UInt160 Owner = default!;
public override string Symbol { [Safe] get => "MYT"; }
public override byte Decimals { [Safe] get => 8; }
public static void OnNEP17Payment(UInt160 from, BigInteger amount, object? data = null)
{
// Handle incoming payments
}
[Safe]
public static bool IsOwner() => Runtime.CheckWitness(Owner);
}
}
Core Components
Attributes
[DisplayName]- Set contract/method display name[ContractAuthor],[ContractDescription],[ContractVersion]- Add metadata to contract manifest[SupportedStandards]- Declare supported NEP standards[Hash160],[InitialValue]- Initialize static fields[Safe]- Mark methods as safe (no state changes)
Native Contracts
NeoToken- NEO token operationsGasToken- GAS token operationsContractManagement- Contract deployment/managementCryptoLib- Cryptographic operationsStdLib- Standard library functions
Services
Storage- Key-value persistent storageRuntime- Contract execution contextBlockchain- Block and transaction accessExecutionEngine- Script execution utilities
Documentation
For comprehensive documentation and examples: https://github.com/neo-project/neo-devpack-dotnet/tree/master-n3/docs
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
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Neo.SmartContract.Framework:
| Repository | Stars |
|---|---|
|
neo-project/examples
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.10.0 | 129 | 6/12/2026 |
| 3.9.1 | 999 | 1/28/2026 |
| 3.9.0 | 139 | 1/28/2026 |
| 3.8.1 | 1,480 | 5/12/2025 |
| 3.7.4.1 | 363 | 11/6/2024 |
| 3.7.4 | 1,178 | 5/20/2024 |
| 3.6.2 | 675 | 11/22/2023 |
| 3.6.0 | 524 | 9/13/2023 |
| 3.5.0 | 1,288 | 12/8/2022 |
| 3.4.0 | 1,038 | 8/5/2022 |
| 3.3.0 | 945 | 6/6/2022 |
| 3.1.0 | 1,407 | 11/14/2021 |
| 3.0.3 | 807 | 10/8/2021 |
| 3.0.2 | 734 | 8/6/2021 |
Loading failed