Expand description
Neo N3 Core Types
This crate provides the core types and data structures for Neo N3 smart contract development.
Structs§
- Array
Full Error - An error returned when a
NeoArraywould exceedNeoArray::MAX_SIZEitems. - BigInt
- A big signed integer type.
- Byte
String Full Error - Error returned by
NeoByteString::try_push/NeoByteString::try_extend_from_slicewhen the on-chainMAX_SIZE(1 MiB) would be exceeded. - 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
- NeoByte
String - Neo N3 ByteString type
- NeoContractABI
- Neo N3 Contract ABI
- NeoContract
Event - Neo N3 Contract Event
- NeoContract
Manifest - Neo N3 Contract Manifest
- NeoContract
Method - Neo N3 Contract Method
- NeoContract
Parameter - Neo N3 Contract Parameter
- NeoContract
Permission - Neo N3 Contract Permission
- NeoInteger
- Neo N3 Integer type (arbitrary precision)
- NeoIterator
- Neo N3 Iterator type
- NeoMap
- Neo N3 Map type
- NeoStorage
Context - Neo N3 Storage Context type
- NeoString
- Neo N3 String type
- NeoStruct
- Neo N3 Struct type
Enums§
- NeoError
- Neo N3 Error type
- NeoValue
- Neo N3 Value type (union of all Neo types)
- Remove
Strict Error - Error returned by
NeoMap::remove_strict.
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§
- Contract
Caller - 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 theFromNeoValuetrait. The default implementation delegates to the existingNeoVMSyscall::contract_callpath; contract code that wants a custom transport (e.g. off-chain simulation) can overridecall_rawand route the value throughcall_typed. - From
NeoValue - A type that can be deserialised from a NeoVM
StackItem/NeoValue. This is the L9IInteroperableequivalent in the C# devpack: any contract return type (or argument type) implements this trait, enablingNeoContract::call_typed<T>to round-trip the on-chain value into a typed Rust value. - NeoContract
- Neo N3 Contract trait
- NeoContract
Entry - Neo N3 Contract Entry Point
- NeoContract
Method Trait - Neo N3 Contract Method trait
Functions§
- serialise_
array - Serialise a
NeoArray<NeoValue>as a NeoVMArrayStackItem. - serialise_
notification - Serialise a UTF-8 event name + state array as a notification body.
The body has the same shape as C#
RuntimeNotifyexpects:[event_name as NeoVM ByteString, state as Array StackItem]. - serialise_
value - Serialise a single StackItem (used for things like
Contract.Callargs that aren’t wrapped in an outer array).
Type Aliases§
- NeoResult
- Neo N3 Result type