Neo DevPack for Solidity
Fast, standards-oriented Solidity-to-NeoVM compiler for Neo N3.
Status: Production-focused ยท Actively fuzzed ยท Neo N3 focused
๐ฏ At a Glance
- Solidity โ NeoVM: Compile Solidity 0.8.x to Neo N3 (
.nef+.manifest.json). - Primary Implementation: Rust-based compiler (production-focused) with archived Go reference implementation.
- EVM semantics: ABI-compatible selectors and metadata; NEP standard detection (NEP-11/17/24).
- Optimized output: Multi-level optimizer, Neo-specific lowering, manifest generation.
- Tooling friendly: CLI first, with active Hardhat/Foundry-adjacent workspace packages for compilation, deployment, scaffolding, and cross-package smoke coverage.
- Quality-focused: Unit/integration/runtime tests, clear diagnostics.
๐ Quick Start
Installation
# Install from source
# Or download pre-built binaries
Basic Usage
# Compile Solidity to Neo N3 contract (generates .nef + .manifest.json)
# With optimization
# Emit CALLT + method tokens (more efficient native contract calls)
# Generate only specific formats
Batch Compilation (Examples)
The repository ships a handful of non-trivial Solidity contracts under examples/
(ERC-20/721, UniswapV2Pair, governance, multisig). To compile them all into Neo
artifacts:
for; do
done
For a quick end-to-end sanity check (NEF magic + manifest structure), run:
For a local deploy + invoke smoke test (fresh Neo-Express chain), run:
# or:
For a deploy smoke test that validates parameterised Solidity constructors
(constructor args passed via _deploy(data, update)), run:
# or:
For an additional deploy test that validates manifest permissions for native contracts (StdLib/CryptoLib) via mapping storage, run:
# or:
To run all Neo-Express smoke tests:
Deploy Famous Upstream EVM Contracts on Neo N3
To demonstrate compiler capability on widely used upstream contracts (OpenZeppelin, Aave, Safe, Uniswap, Chainlink), run:
This command compiles + deploys a curated set of upstream contracts to a fresh local Neo N3 chain (neoxp), then generates:
docs/data/famous-contracts-neoxp-deploy-results.jsondocs/solidity/famous-contracts-neoxp-deploy.md
It auto-installs Neo Express 3.9.1 into build/dotnet-tools/ when missing.
(Neo.Express tracks its own release cadence independent of the Neo N3 node
version โ the compiler/runtime target Neo N3 v3.10.0, but the latest
Neo.Express toolchain is 3.9.1.)
For strict type-3 verification (deploy + state-changing invoke + post-state assertion), run:
This generates:
docs/data/famous-contracts-neoxp-runtime-results.jsondocs/solidity/famous-contracts-neoxp-runtime.md
Use this runtime report when you need executable correctness proof, not deploy-only coverage.
For the strict-safe new showcase suite specifically (wired in CI as neoxp-showcases):
# or
Production Readiness Gate
Run one command to validate formatting, lint, release build, full tests, strict-compatibility compile sweeps, and full Neo-Express deploy smokes:
CI Coverage (Neo-Express Showcases)
The CI workflow (.github/workflows/ci.yml) includes a dedicated neoxp-showcases job that:
- installs Rust + .NET 8 +
jqon Ubuntu - runs
examples/test_neoxp_new_showcases_smoke.sh - validates
UpgradeLifecycleShowcase,WitnessGuardShowcase, andOracleRelayStrictShowcaseend-to-end
This keeps local and CI smoke coverage aligned for the new strict-safe showcase contracts.
For an on-chain check that abi.encode / abi.decode preserve argument order
(StdLib.serialize/deserialize round-trip), run:
# or:
Runtime Semantics & Metadata
- Execution overrides:
ExecutionOverrideslets you inject deterministic block height, timestamp, and calling script hash for a single invocation. UseNeoRuntime::execute_with_overridesand inspectExecutionMetadataonExecutionResult. - Iterator handles:
Storage.Findreturns real iterator tokens;Iterator.NextandIterator.Valueoperate on handles and respect overlay storage changes. - Syscall gas hints: The embedded runtime uses per-syscall gas hints (storage/crypto/runtime/oracle/contract) to better mirror Neo N3 pricing.
- Contract registry: A lightweight in-memory ContractManagement surface
supports
Deploy,Update, andGetContract, tracking NEF/manifest bytes and update counters for native contract calls.
For a detailed runtime surface (opcodes, syscalls, native contracts, iterator
semantics, gas hints), see docs/RUNTIME_SPEC.md.
Example Contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.34;
contract SimpleToken {
mapping(address => uint256) public balances;
uint256 public totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor(uint256 _totalSupply) {
totalSupply = _totalSupply;
balances[msg.sender] = _totalSupply;
}
function transfer(address from, address to, uint256 amount, bytes memory data) public returns (bool) {
data;
require(from == msg.sender, "from must be caller");
require(balances[from] >= amount, "Insufficient balance");
balances[from] -= amount;
balances[to] += amount;
emit Transfer(from, to, amount);
return true;
}
}
Compilation & Deployment:
# 1. Compile to Neo N3 contract files
# This generates: SimpleToken.nef + SimpleToken.manifest.json
# 2. Deploy to Neo TestNet
# If your Solidity constructor has parameters, pass constructor args through
# `_deploy(data, update)`. Neo-Express / CLI tooling: pass a JSON array string
# (e.g. `[1000000]`); SDKs that support StackItems may pass an Array directly.
# For contract-to-contract deploy flows, `abi.encode(...)` (StdLib.serialize bytes) is also supported.
#
# For local Neo-Express deploys, see:
# bash examples/test_neoxp_constructor_smoke.sh
# 3. Verify deployment
๐งฉ Solidity Feature Support on NeoVM
146 Solidity features audited โ โ 114 fully supported (78%) ยท โ ๏ธ 29 partial (20%) ยท โ 2 unsupported (1%) ยท ๐ซ 1 intentionally blocked (1%)
The maintained per-feature source of truth is
docs/SOLIDITY_SUPPORT_MATRIX.md, with
rendered category pages under
docs/solidity/feature-support/. The root
FEATURE_MATRIX.md is only a stable redirect for older
links.
Important NeoVM differences:
| Area | Current behavior |
|---|---|
| Contract deployment | new Contract(...) is source-compatible but does not deploy a child contract; it inlines/simulates constructor-like logic and returns a zero-address placeholder. Use ContractManagement.deploy(nef, manifest, data) for real deployment. |
| Delegate execution | address.delegatecall(...) and callcode(...) are blocked at compile time because Neo N3 has no caller-storage execution context. |
| Value transfer | Ether-style attached value is not available; use NEP-17 callbacks and explicit GAS/NEP transfers. |
| ABI payloads | Neo contract calls use method names and StdLib.serialize-style payloads, not byte-identical EVM calldata. |
๐ Complete Documentation
๐๏ธ Architecture Overview
The Neo DevPack for Solidity consists of several integrated components:
graph TB
A[Solidity Source] --> B[Yul IR Generation]
B --> C[Neo DevPack for Solidity]
C --> D[Lexer]
C --> E[Parser]
C --> F[Semantic Analyzer]
C --> G[Optimizer]
C --> H[Code Generator]
H --> I[NeoVM Bytecode]
H --> J[Neo Manifest]
H --> K[ABI JSON]
L[Neo-Sol Runtime] --> M[Memory Manager]
L --> N[Storage Manager]
L --> O[ABI Encoder]
L --> P[Crypto Library]
L --> Q[Event System]
R[Developer Tools] --> S[Hardhat Plugin]
R --> T[Foundry Adapter]
R --> U[CLI Tools]
R --> V[Debug Tools]
[!NOTE] Neo-Sol Runtime (C#) is standalone and experimental. The
src/Neo.Sol.RuntimeC# library shown above is a separate EVM-emulation experiment: it is not used by theneo-solccompiler, is not shipped in releases, and uses an EVM keccak-style storage layout that is intentionally different from compiler-emitted contracts (which useSHA256(variable_name)base slots pluskeccak256(serialize(key) || slot)for mapping elements). The two storage layouts are not interoperable.
๐ง Installation & Setup
System Requirements
- Rust: 1.88 or higher
- Node.js: 20.19+ or 22.12+ (for tooling and documentation builds)
- .NET SDK: 8.0 or higher (for optional C# runtime)
- Neo CLI: 3.0+ (for deployment)
- Memory: 4GB RAM minimum, 8GB recommended
- Disk Space: 2GB for full installation
Build from Source
# Clone repository
# Build compiler
# (Optional) Build C# runtime library (requires .NET SDK)
# (Optional) Build tooling packages
# Run comprehensive tests
Development Setup
# Install development dependencies (Rust + tooling)
# Build tooling packages
# Run all test suites
CLI Reference
Basic Commands
# Compile with default settings (generates .nef + .manifest.json)
# Specify output file prefix
# Set optimization level (0-3)
# Generate specific formats
# Resolve Solidity imports (repeatable)
Advanced Options
# Emit CALLT + method tokens for native calls
# JSON output with all information
# Verbose output for debugging
# Override NEF source field and emit JSON warnings
# Predict the deployed contract hash (Neo derives it from sender + NEF checksum + manifest name)
# Only emit outputs for specific contracts (repeatable; useful when imports include extra contracts)
# Fail compilation if full wildcard manifest permissions are required
# Stricter: fail compilation if any wildcard contract permissions are required
# Stricter: fail compilation if any wildcard method permissions are required
# Provide an explicit allowlist to replace wildcard permissions (useful for dynamic calls)
# Emit structured errors to stderr as JSON
)
))
)
Structured diagnostics:
--json-warningsemits warnings as JSON lines on stderr (codes:COMPILER_WARNING,NEF_SOURCE_TRUNCATED).--json-errorsemits errors as JSON lines on stderr (codes:VALIDATION_ERROR,IR_GENERATION_ERROR,GENERIC_ERROR,IO_ERROR).
These flags do not alter file outputs; they only change how diagnostics are printed.
Manifest Field Overrides (NatSpec)
Use NatSpec custom tags on a contract to override selected Neo manifest fields at compile time:
/**
* @custom:neo.manifest.groups [{"pubkey":"03...","signature":"AQID"}]
* @custom:neo.manifest.features {}
* @custom:neo.manifest.supportedstandards ["NEP-17","NEP-26"]
* @custom:neo.manifest.trusts ["0x1111111111111111111111111111111111111111"]
* @custom:neo.manifest.extra.Repository "https://github.com/acme/project"
* @custom:neo.manifest.extra.Build {"commit":"abc123","pipeline":"ci"}
*/
contract MyContract { }
Supported tag prefixes: @custom:neo.manifest.* and @custom:manifest.*.
Supported fields:
name(string)groups(JSON array)features(JSON object)supportedstandards(JSON array)trusts(JSON array or"*")extra.<Key>(any JSON value, or plain string)
For Neo N3 compatibility, features must remain an empty object ({}); populated
feature keys are ignored because Neo rejects them at deploy time.
Batch Operations
# Compile multiple files
# Compile specific contract
# Batch compilation with optimization
Integration Guide
Hardhat Integration
Hardhat integration is primarily useful for compilation + artifact management. Use Hardhat 2.28.x with the current Neo plugins; Hardhat 3 needs a separate plugin/runtime migration before it is supported.
// hardhat.config.ts
import "@neo-devpack-solidity/hardhat-solc-neo";
export default {
neoSolc: {
solidity: {
version: "0.8.34",
settings: {
optimizer: { enabled: true, runs: 200 },
neo: {
// neo-solc flags forwarded by the plugin:
callt: true,
denyWildcardContracts: true,
denyWildcardMethods: true,
// If your contract uses intentional dynamic calls, provide an allowlist:
// manifestPermissions: "./permissions.json",
// manifestPermissionsMode: "replace-wildcards",
},
},
},
},
};
# Compile contracts (standard-json via neo-solc)
# Deploy to Neo (requires a funded account in neoNetworks.<network>.accounts)
Foundry Integration
# Install Neo Foundry
# Initialize project
# Build contracts
# Run tests
; ) for
Direct Integration
There is no stable published JavaScript runtime package for the compiler itself in this repository. For programmatic workflows today, prefer:
- the Rust
neo-solcbinary directly @neo-devpack-solidity/cli-toolsfor Node-based wrapper commands@neo-devpack-solidity/hardhat-solc-neoand@neo-devpack-solidity/hardhat-neo-deployerfor Hardhat integration
Testing Framework
Unit Testing
# Run all tests
# Run specific test suite
# Run with output
# Run release-mode tests when investigating performance-sensitive behavior
Integration Testing
# Full compilation pipeline tests
# Real contract examples in the integration module
# Aggregate project test lane
Property-Based Testing
# Fuzzing/property tests for robustness
# Deep property run
PROPTEST_CASES=200
# Differential testing (EVM vs NeoVM)
๐ฏ API Reference
Compiler API
use compile_contracts;
let source = read_to_string.expect;
let artifacts = compile_contracts.expect;
for artifact in artifacts
Runtime API
using System.Numerics;
using Neo.Sol.Runtime;
var runtime = Evm.CreateRuntime();
// Memory operations
runtime.Memory.Store(0x40, new BigInteger(123));
var data = runtime.Memory.Load(0x40);
var value = runtime.Memory.LoadBigInteger(0x40);
// Storage operations
runtime.Storage.Store(BigInteger.Zero, value);
var retrieved = runtime.Storage.LoadBigInteger(BigInteger.Zero);
// Cryptographic operations
var hash = runtime.Keccak256(data);
var publicKey = runtime.EcRecover(hash, signature, recoveryId);
ABI Encoder API
using Neo.Sol.Runtime.ABI;
// Encode function call
var selector = AbiEncoder.CalculateFunctionSelector("transfer(address,uint256)");
var encoded = AbiEncoder.EncodeCall("transfer(address,uint256)", recipient, amount);
// Decode function result
var success = AbiEncoder.DecodeBool(returnData);
// Encode events
runtime.Events.EmitEvent("Transfer(address,address,uint256)", new object[] { from, to }, amount);
๐ Optimization Guide
Optimization Levels
| Level | Description | Use Case | Compilation Time | Performance Gain |
|---|---|---|---|---|
-O0 |
No optimization | Development, debugging | Fastest | None |
-O1 |
Basic optimization | Testing, CI/CD | Fast | 10-20% |
-O2 |
Standard optimization | Production builds | Moderate | 30-50% |
-O3 |
Aggressive optimization | Critical performance | Slow | 50-80% |
Performance Tips
// โ
Good: Use unchecked only when wraparound is intentional or overflow is proven impossible
unchecked {
for (uint256 i = 0; i < length; ++i) {
total += values[i];
}
}
// โ
Good: Pack structs efficiently
struct PackedData {
uint128 amount; // 16 bytes
uint64 timestamp; // 8 bytes
uint32 blockNumber; // 4 bytes
uint32 nonce; // 4 bytes
} // Total: 32 bytes (1 storage slot)
// โ
Good: Use mapping for O(1) lookups
mapping(address => uint256) balances;
// โ Avoid: Linear searches in arrays
address[] holders; // Expensive to search
Gas Optimization
# Compare optimization levels
# Compare the generated .nef file sizes
# Inspect generated NeoVM assembly
๐ Security Best Practices
Automated Security Analysis
# Analysis mode emits an EVM-to-Neo upgrade/readiness JSON report instead of artifacts.
# It is supported for single-file input; Standard JSON mode rejects it.
# Compile production artifacts with strict manifest permissions after review.
# Stricter builds (recommended for production):
# - reject wildcard contract permissions (contract='*')
# - reject wildcard method permissions (methods='*')
Common Security Patterns
// โ
Reentrancy protection
bool private locked;
modifier noReentrancy() {
require(!locked, "Reentrant call");
locked = true;
_;
locked = false;
}
// โ
Safe arithmetic (Solidity 0.8+)
function safeAdd(uint256 a, uint256 b) public pure returns (uint256) {
return a + b; // Built-in overflow protection
}
// โ
Input validation
function transfer(address to, uint256 amount) public {
require(to != address(0), "Invalid recipient");
require(amount > 0, "Invalid amount");
require(balances[msg.sender] >= amount, "Insufficient balance");
// ... rest of function
}
๐ Debugging Guide
Debug Information
# Compile with verbose output (prints a high-level IR summary)
# View manifest information
|
# View NeoVM assembly (disassembly)
Common Issues & Solutions
| Error | Cause | Solution |
|---|---|---|
Stack too deep |
Too many local variables | Restructure code, use structs |
Gas limit exceeded |
Infinite loop or expensive operation | Add gas checks, optimize code |
Invalid jump destination |
Corrupted bytecode | Check compiler version, rebuild |
Revert without reason |
Failed require without message | Add descriptive error messages |
Interactive Debugging
neo-solc does not currently emit source-map/debug-info artifacts as standalone CLI output formats (nef, manifest, json, assembly, complete only). Source-map/debug internals exist in the compiler pipeline for downstream debugger-oriented tooling; interactive on-chain debugger support remains planned. Use Neo N3 tooling (neo-cli / neo-express / RPC tracing) for on-chain debugging.
๐ Performance Benchmarks
Compilation Performance
| Contract Size | Lines of Code | Compilation Time (O2) | Memory Usage |
|---|---|---|---|
| Simple Token | 100 | 50ms | 15MB |
| ERC721 NFT | 500 | 200ms | 45MB |
| DeFi Protocol | 2000 | 800ms | 120MB |
| Large DAO | 5000 | 2000ms | 250MB |
Runtime Performance
| Operation | Neo-Sol Runtime | Native NeoVM | Overhead |
|---|---|---|---|
| Arithmetic | 1.2ฮผs | 1.0ฮผs | 20% |
| Memory Load | 2.1ฮผs | 1.8ฮผs | 17% |
| Storage Load | 12.3ฮผs | 10.5ฮผs | 17% |
| Keccak256 | 45.2ฮผs | N/A | N/A |
| EcRecover | 156.8ฮผs | N/A | N/A |
๐ค Contributing
Development Workflow
# 1. Fork and clone
# 2. Create feature branch
# 3. Install dependencies
# 4. Make changes and test
# 5. Format and lint
# 6. Commit and push
# 7. Create pull request
Code Standards
- Rust: Follow Rust style guidelines
- C#: Follow Microsoft C# conventions
- TypeScript: Follow Airbnb TypeScript Style Guide
- Tests: 100% test coverage for new features
- Documentation: Update docs for all public APIs
Release Process
# 1. Update version numbers (Cargo + npm packages + docs)
# Edit Cargo.toml / package.json / devpack/package.json / docs
# 2. Update changelog
# Edit CHANGELOG.md: promote Unreleased -> new version section
# 3. Run release-readiness validation
# 4. Commit and push
# 5. Tag and publish release pipeline
๐ Project Status
Implementation Language
- Primary: Rust (src/) - Production-ready compiler and runtime
- Archived: Go implementation (archive/go_implementation/) - Reference implementation, no longer maintained
Current Progress
Core Compiler
- โ Solidity frontend (solang-based parser) with semantic validation
- โ Multi-level optimizer (4 levels: 0-3)
- โ NeoVM code generator
- โ Solidity-style public state variable getters
- โ Error handling and reporting
- โ CLI interface with file, Standard JSON, manifest-policy, diagnostics, and analysis modes
- โ Neo N3 native formats (.nef and .manifest.json)
- โ
Broad Solidity 0.8.x support; see
docs/SOLIDITY_SUPPORT_MATRIX.mdfor current feature status - โ Variable handling with proper index-based storage
- โ Loop control (break/continue) with context tracking
- โ Function overloading support with Neo ABI name mangling for same-arity overloads
Runtime Library
- โ EVM-compatible memory manager
- โ Storage manager with Solidity layout compatibility
- โ ABI encoder/decoder for basic types
- โ Cryptographic library (keccak256, ecrecover, sha256)
- โ Event system with Runtime.Notify integration
- โ Context objects (msg, tx, block) with Neo mapping
- โ
External call manager (
call/staticcallmappings;delegatecallis rejected) - โ Exception handling (try/catch with runtime guards)
- โ
Iterator handles for
Iterator.NextandIterator.Value - โ Per-syscall gas accounting with approximate Neo N3 costs
- โ Broad documented opcode subset; unsupported opcodes are rejected explicitly
- โ Oracle native-contract routing with deterministic request IDs and local price state; live callbacks require Neo-Express/TestNet validation
Testing
- โ Unit tests for runtime primitives and compiler helpers
- โ Integration tests for compiler pipeline behavior
- โ E2E compilation tests for all examples (80 tests)
- โ Conformance test vectors (40 vectors, minimum 95.0% pass gate)
- โ Neo-Express deployment smoke tests
- โ Cross-platform CI/CD (Linux, macOS, Windows)
- โ End-to-end contract execution tests
- โ Fuzzing framework (property-based testing)
- โ Reference-crate differential tests for supported crypto, arithmetic, and disassembly paths
- ๐ Broader EVM-vs-NeoVM differential testing (planned)
Developer Tools
- โ CLI tools (neo-solc) - fully functional
- โ Hardhat integration (@neo-devpack-solidity/hardhat-solc-neo)
- โ Hardhat deployer (@neo-devpack-solidity/hardhat-neo-deployer)
- โ Foundry adapter (@neo-devpack-solidity/neo-foundry)
- โ ABI router (@neo-devpack-solidity/abi-router)
- โ Shared types (@neo-devpack-solidity/types)
- โ CLI tools package (@neo-devpack-solidity/cli-tools)
- โ Debug/source-map type support for downstream tooling
- โ Network configurations for Neo TestNet/MainNet
- โ Artifact management
- ๐ Standalone CLI source-map/debug artifact emission and interactive debugger integration (planned)
Documentation
- โ Comprehensive README with examples
- โ Architecture documentation (docs/ARCHITECTURE.md)
- โ Runtime specification (docs/RUNTIME_SPEC.md)
- โ NeoVM parity TODO list (docs/NEO_VM_PARITY_TODO.md)
- โ Solidity support matrix (docs/SOLIDITY_SUPPORT_MATRIX.md)
- โ Error reference (docs/ERROR_REFERENCE.md)
- โ Security best practices
- ๐ Video tutorials and workshops (planned)
๐ Metrics & Statistics
- ๐ Total Lines of Code: ~50,000 (Rust implementation)
- ๐งช Test Coverage: Layered Rust, fuzz, E2E, conformance, and Neo-Express validation
- โก Performance: Optimized code generation with multi-level optimization
- ๐ Security: Basic security analysis; external audit recommended for production
- ๐ Documentation: Comprehensive guides and reference documentation
- ๐ ๏ธ Compatibility: Solidity 0.8.x on NeoVM 3.0+; see
docs/SOLIDITY_SUPPORT_MATRIX.mdfor the current feature audit
๐ฏ Production Readiness
| Component | Status | Test Coverage | Documentation | Notes |
|---|---|---|---|---|
| Compiler Core | ๐ข Production-focused | Unit + integration suites | Complete | Validate target contracts with the production gate and Neo-Express/TestNet |
| Runtime Library | ๐ข Production-focused | Runtime and property suites | Complete | Deterministic embedded runtime; validate final behavior on Neo-Express/TestNet |
| Developer Tools | ๐ข Stable | Smoke Tests | Good | CLI fully functional |
| Testing Suite | ๐ข Comprehensive | Rust + fuzz + E2E + conformance | Good | 40-vector conformance gate requires at least 95.0% |
| Documentation | ๐ข Good | Docs structure check | Good | Comprehensive guides |
โ ๏ธ Known Limitations
The compiler is intended for production-oriented use, but please note:
| Area | Status | Notes |
|---|---|---|
| Oracle Integration | Partial | Embedded runtime records requests and price state, but does not contact oracle nodes or deliver live callbacks |
| Fuzzing Framework | โ Done | Property-based tests plus 11 cargo-fuzz targets |
| Differential Testing | Partial | Reference-crate differential tests exist; broader EVM-vs-NeoVM differential testing remains planned |
| IDE Debugging | Planned | Interactive debugging tools not yet implemented |
Note on intrinsic devpack libraries (Runtime, Storage, Syscalls, NativeCalls, Neo, abi):
they are compiler intrinsics. Their Solidity source may include overloaded/internal helper signatures
for tooling ergonomics; the compiler lowers supported members directly to Neo syscalls/native calls.
Recommendation: For MainNet deployment, thoroughly test your contracts on Neo N3 TestNet first.
๐ Roadmap
Phase 1: Core Stability (Q1 2024) โ
- โ Complete compiler implementation
- โ Runtime library with EVM compatibility
- โ Basic tooling and CLI interface
- โ Comprehensive testing framework
Phase 2: Developer Experience (Q2 2024) โ
- โ Hardhat and Foundry integration
- โ Source-map/debug internals for downstream tooling
- โ Performance optimization
- โ Security analysis features
Phase 3: Production Deployment (Q3 2024) โ
- โ Audit-ready codebase
- โ Performance benchmarking
- โ Community testing and feedback
- โ MainNet deployment support
Phase 4: Ecosystem Growth (2025-2026) ๐
- ๐ Additional language support (Vyper)
- ๐ Advanced optimization passes
- ๐ IDE integrations (VS Code, IntelliJ)
- ๐ Educational resources and workshops
- ๐ Formal verification tools
- ๐ Multi-chain support
๐ Examples Gallery
Real-World Contracts
We've included production-oriented implementations of popular contract patterns:
๐ช ERC20 Token (420 lines)
- Complete standard implementation
- Advanced features: minting, burning, pausing
- Owner management and emergency functions
- Batch operations and token recovery
- Comprehensive event logging
๐จ ERC721 NFT (850 lines)
- Note: this example includes EVM-specific patterns (inline assembly +
.selector) and is not currently supported end-to-end; preferexamples/new/NFT.solordevpack/examples/CompleteNEP11NFT.solfor Neo N3. - Full NFT implementation with metadata
- Enumerable extension for token discovery
- Royalty support (EIP-2981)
- Batch minting and advanced features
- Gas-optimized storage patterns
๐ฆ Uniswap V2 Pair (650 lines)
- Complete AMM implementation
- Liquidity provision and swapping
- Price oracle functionality
- Fee collection and governance
- Advanced mathematical operations
๐ MultiSig Wallet (720 lines)
- Neo-adapted: uses native GAS (NEP-17) transfers and accepts deposits via
onNEP17Payment. - Smaller Neo-native example:
examples/new/MultiSigWalletNEP17.sol. - Multi-signature transaction approval
- Owner management and daily limits
- Emergency stop functionality
- Batch operations support
- Comprehensive security features
๐ณ๏ธ Governance Token (980 lines)
- Neo-adapted: proposals cannot attach native value (
values[]must be0); use NEP-17 transfers and a Neo-compatible timelock contract instead. - ERC20 with voting capabilities
- Delegation and vote tracking
- Proposal creation and execution
- Timelock integration
- Advanced governance features
๐พ Simple Storage (170 lines)
- Basic storage read/write operations
- Key-value mapping storage
- Owner access control
- Increment/decrement functions
- Ideal for learning NeoVM storage
๐ Escrow (280 lines)
- Secure fund escrow service
- Time-locked releases
- Multi-party dispute resolution
- Arbiter-based conflict handling
- Fee collection system
๐ฐ Lottery (320 lines)
- Multi-round lottery system
- Ticket purchase and tracking
- Pseudo-random winner selection
- Prize pool management
- Operator fee collection
๐ Staking (310 lines)
- Token staking with rewards
- Configurable lock periods
- APY calculation
- Emergency withdraw function
- Reward distribution tracking
๐ท๏ธ Name Service (350 lines)
- Decentralized name registration
- Address resolution
- Text record storage
- Name transfer and renewal
- Similar to ENS for Neo N3
๐๏ธ Famous DeFi/Web3 Contracts (examples/famous/)
Ports of iconic Ethereum DeFi protocols adapted for Neo N3:
- WGAS โ Wrapped GAS (WETH9-style NEP-17 wrapper)
- FlashLoan โ Aave V2-style flash loan pool
- SimpleAMM โ Uniswap V2-style constant-product AMM
- TokenVesting โ OpenZeppelin-style linear vesting with cliff
- SimpleLending โ Compound-style lending with liquidation
- SimpleDAO โ Governor-style DAO with staking and timelock
See examples/famous/README.md for full details and Neo N3 adaptation notes.
Usage Examples
# Compile ERC20 token
# Deploy to Neo TestNet
# Verify deployment
# Run the ERC20-style integration coverage
๐ Support & Community
Getting Help
- ๐ Documentation: Complete guides and API reference
- ๐ฌ Discord: Join our Discord server
- ๐ Issues: Report bugs on GitHub Issues
- ๐ง Email: Technical support at jimmy@r3e.network
Community Resources
- ๐ฅ Video Tutorials: YouTube Channel
- ๐ Blog Posts: Development Blog
- ๐ Workshops: Monthly community workshops
- ๐ฑ Twitter: @R3ENetwork for updates
Contributing
We welcome contributions from the community! Check out our:
- ๐ฅ Contributing Guide
- ๐ฏ Good First Issues
- ๐๏ธ Testing and Local Validation
- ๐ Security Policy
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Neo Global Development Team for blockchain infrastructure
- Ethereum Foundation for Solidity language specification
- Rust Community for excellent tooling and libraries
- Open Source Contributors who made this project possible
Built with โค๏ธ by R3E Network
Website โข Documentation โข Discord โข Twitter
Bringing Ethereum's developer ecosystem to Neo blockchain