Skip to content

Types and Values

Neo DevPack for Solidity enforces Solidity typing at compile time, then lowers values to NeoVM stack items, storage payloads, and ABI types.

Value Types

Solidity TypeNeoVM RepresentationNotes
boolBooleanDirect stack item mapping.
uint* / int*BigIntegerWidth is enforced by the compiler; NeoVM integers are arbitrary precision.
addressUInt160 / 20-byte script hashNeo addresses represent accounts or contracts by script hash.
address payableUInt160 plus compatibility members.transfer() and .send() map to GAS transfer warnings.
bytes1 ... bytes32Fixed-length ByteArraybytes32 maps to Neo ABI Hash256 and is common for NEP-11 token IDs.
string / dynamic bytesByteArray payloadUsed as raw bytes in storage-key derivation.
enumBigInteger backed by uint8Solidity enum conversion rules still apply.
User-defined value typeUnderlying value typeZero-cost Solidity abstraction.

Reference Types

Solidity TypeNeoVM RepresentationNotes
Memory arraysNeoVM ArrayRuntime stack representation.
Storage arraysNeo storage keysLength and element keys are derived deterministically.
Structs in memoryNeoVM ArrayFields keep their declared order.
Structs in storageSerialized binary blobRead/write is atomic for the full struct value.
calldataTreated like memoryAccepted for source compatibility.
mapping(K => V)Deterministic storage-key derivationNo length, no enumeration, and no "set" marker.

Integer Behavior

NeoVM represents integers as arbitrary-precision BigInteger values. Solidity width and signedness are type-checked by the compiler, but NeoVM does not impose fixed-width overflow boundaries at runtime. Code that depends on wrapping should use explicit modulo arithmetic.

Mapping Keys

Mapping keys can be built-in value types, bytes, string, contracts, or enums. Complex key types such as structs, arrays, and mappings are not valid. Mapping values can be any supported value, including nested mappings, arrays, and structs.

More Detail

MIT Licensed