Skip to main content

Module prelude

Module prelude 

Source
Expand description

Neo N3 Prelude - commonly used items

Re-exports§

pub use crate::serde;
pub use crate::native_contracts::*;
pub use crate::standards::*;

Macros§

neo_manifest_overlay
Neo N3 Manifest Overlay macro
neo_permission
Declare manifest permissions and embed them as a custom section.
neo_safe_methods
Declare safe methods for the contract manifest.
neo_supported_standards
Declare supported standards for the contract manifest.
neo_trusts
Declare trusted contracts for the contract manifest.

Structs§

BigInt
A big signed integer type.
DefaultContractCaller
The default ContractCaller impl: routes call_raw to NeoVMSyscall::contract_call. Used by host-mode tests and by production code that needs the L6 cross-call upgrade (tracked in the audit).
Hash160
A 20-byte script hash used to identify accounts and contracts on Neo N3.
Hash256
A 32-byte hash used for transaction and block identifiers on Neo N3.
NeoArray
Neo N3 Array type
NeoBoolean
Neo N3 Boolean type
NeoByteString
Neo N3 ByteString type
NeoContractABI
Neo N3 Contract ABI
NeoContractEvent
Neo N3 Contract Event
NeoContractManifest
Neo N3 Contract Manifest
NeoContractMethod
Neo N3 Contract Method
NeoContractParameter
Neo N3 Contract Parameter
NeoContractPermission
Neo N3 Contract Permission
NeoContractRuntime
Neo N3 contract management operations.
NeoCrypto
Crypto helpers for Neo N3 smart contracts.
NeoInteger
Neo N3 Integer type (arbitrary precision)
NeoIterator
Neo N3 Iterator type
NeoJSON
Minimal JSON helpers to support tests.
NeoMap
Neo N3 Map type
NeoRuntime
Direct wrappers for the canonical System.Runtime syscalls.
NeoRuntimeContext
Lightweight view of the runtime context.
NeoStorage
Storage convenience helpers built on top of the syscall layer.
NeoStorageContext
Neo N3 Storage Context type
NeoString
Neo N3 String type
NeoStruct
Neo N3 Struct type
RawKeyBuilder
Fixed-capacity stack key builder for RawStorage keys.
RawStorage
Heap-free storage facade that operates on &[u8] slices.

Enums§

ContractCallError
Error type for the L9 typed-call helpers. Reserved for future use (the L6 cross-call executor will return this rather than panicking with “see L6 design”).
NeoError
Neo N3 Error type
NeoValue
Neo N3 Value type (union of all Neo types)
RawStorageGet
Outcome of RawStorage::get_into.

Constants§

MAX_NOTIFICATION_SIZE
Max serialised size for a notification (C#: MaxNotificationSize = 1024).
MAX_STACK_SIZE
Max items in a serialised Array/Struct (C#: Limits.MaxStackSize).

Traits§

ContractCaller
Trait for static-method-style cross-contract calls. The L9 call_typed<T> helper invokes a remote contract’s method and decodes the return value into a typed Rust value via the FromNeoValue trait. The default implementation delegates to the existing NeoVMSyscall::contract_call path; contract code that wants a custom transport (e.g. off-chain simulation) can override call_raw and route the value through call_typed.
FromNeoValue
A type that can be deserialised from a NeoVM StackItem / NeoValue. This is the L9 IInteroperable equivalent in the C# devpack: any contract return type (or argument type) implements this trait, enabling NeoContract::call_typed<T> to round-trip the on-chain value into a typed Rust value.
NeoContract
Neo N3 Contract trait
NeoContractEntry
Neo N3 Contract Entry Point
NeoContractMethodTrait
Neo N3 Contract Method trait

Functions§

call_typed
Helper: typed cross-contract call with the default caller. Mirrors the C# Contract.Call<T> API.
serialise_array
Serialise a NeoArray<NeoValue> as a NeoVM Array StackItem.
serialise_notification
Serialise a UTF-8 event name + state array as a notification body. The body has the same shape as C# RuntimeNotify expects: [event_name as NeoVM ByteString, state as Array StackItem].
serialise_value
Serialise a single StackItem (used for things like Contract.Call args that aren’t wrapped in an outer array).

Type Aliases§

NeoResult
Neo N3 Result type

Attribute Macros§

neo_contract
Neo N3 Contract macro
neo_entry
Neo N3 Entry Point macro
neo_event
Neo N3 Event macro
neo_method
Neo N3 Method macro
neo_safe
Mark a single exported function as safe in the manifest.