Solana-Style Syntax

Neo N3 + Anchor Patterns = Perfect DX

Build Neo N3 smart contracts with familiar Solana Anchor-style syntax. Production-ready framework with 100% Neo N3 feature coverage, comprehensive NEP standards support, and enterprise-grade security.

100%
Neo N3 Features
14
Examples
NEP
Standards
Oracle
Support

Familiar Solana-Style Syntax

Write Neo N3 contracts with Anchor patterns you already know

🚀 Solana-Style Neo N3 Contract
New #[program]
#![no_std]
#![no_main]

use neo_contract::prelude::*;

declare_id!("MyNeoContract");

#[program]
pub mod my_contract {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        let storage = Storage::get_context();
        
        Storage::put(
            storage,
            ByteString::from_literal("owner"),
            ctx.accounts.owner.key
        );
        
        Runtime::log(ByteString::from_literal("Initialized"));
        Ok(())
    }

    pub fn transfer(ctx: Context<Transfer>, amount: Int256) -> Result<()> {
        require!(
            ctx.accounts.from.key == ctx.accounts.authority.key,
            ContractError::Unauthorized
        );
        
        // Transfer logic here
        emit!(TransferEvent {
            from: ctx.accounts.from.key,
            to: ctx.accounts.to.key,
            amount,
        });
        
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize<'info> {
    pub owner: Signer<'info>,
}

#[derive(Accounts)]
pub struct Transfer<'info> {
    pub authority: Signer<'info>,
    pub from: Account<'info>,
    pub to: Account<'info>,
}

#[event]
pub struct TransferEvent {
    pub from: H160,
    pub to: H160,
    pub amount: Int256,
}

#[error_code]
pub enum ContractError {
    #[msg("Unauthorized access")]
    Unauthorized,
}

Comprehensive Neo N3 Features

100% feature coverage with elegant Solana-style developer experience

Anchor-Style Syntax

Familiar #[program], Context<T>, and #[derive(Accounts)] patterns from Solana Anchor

  • Program macros
  • Account validation
  • Error handling
  • Event emission

Oracle Support

Complete Neo N3 Oracle service integration for external data feeds

  • Request/Response
  • JSON/XPath filters
  • Callback handling
  • Gas management

Native Contracts

Full interoperability with all Neo N3 native contracts

  • NEO & GAS tokens
  • Policy contract
  • Management
  • Crypto & StdLib

NEP Standards

Complete implementation of Neo Enhancement Proposals

  • NEP-17 Tokens
  • NEP-11 NFTs
  • NEP-24 Royalties
  • Custom standards

Security First

Built-in security patterns and comprehensive validation

  • Multi-sig support
  • Witness checking
  • ECDSA verification
  • Access control

WASM to NEF

Integrated compiler for Neo Executable Format generation

  • Automatic compilation
  • Manifest generation
  • Debug support
  • Optimization

Framework Architecture

Modular design for maximum flexibility and performance

neo-contract

Core library with Neo N3 runtime, storage, and native contract bindings

neo-contract-proc-macros

Procedural macros for Solana-style syntax and code generation

neo-compiler

WASM to NEF bytecode translator with manifest generation

Examples

14 production-ready examples covering all use cases

Production-Ready Examples

Learn by example with 14 comprehensive smart contracts

Hello World

Basic contract with Solana-style syntax

View Code →

NEP-17 Token

Fungible token implementation

View Code →

NEP-11 NFT

Non-fungible token with metadata

View Code →

DEX

Decentralized exchange with AMM

View Code →

Governance

DAO voting and proposals

View Code →

Oracle Price Feed

External data integration

View Code →

Multi-Sig Wallet

Multi-signature authorization

View Code →

NFT Marketplace

Buy, sell, and auction NFTs

View Code →

Staking

Token staking with rewards

View Code →

Crowdfunding

Decentralized fundraising

View Code →

NEP-24 Royalty NFT

NFTs with royalty support

View Code →

Neo Features Showcase

Complete Neo N3 feature demo

View Code →

Getting Started

Start building Neo N3 smart contracts in minutes

1

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
2

Clone the Framework

git clone https://github.com/r3e-network/neo-contract-rs
cd neo-contract-rs
3

Build Your First Contract

cd examples/01-hello-world
cargo build --target wasm32-unknown-unknown --release
../../target/release/neo-compiler compile target/wasm32-unknown-unknown/release/hello_world.wasm
4

Deploy to Neo Express

neoxp create
neoxp wallet create alice
neoxp contract deploy hello_world.nef alice

Documentation

Everything you need to master Neo N3 development

Ready to Build on Neo N3?

Join the growing community of developers building the future of blockchain with Neo N3 and Rust