Skip to content

Types

The Phantasma VM uses a small fixed set of runtime value types. These types appear in:

  • ABI signatures
  • register values
  • stack values
  • serialized VM objects
  • constructor-style interops such as Address(), Hash(), and Timestamp()

Runtime Types

TypeInternal ValueTypical UseNotes
None0empty / uninitialized valueEquivalent to a VM-level null or empty slot.
Struct1compound values, arrays, mapsUsed for dynamic object shapes and collection-like results.
Bytes2raw binary payloadsCommon for script bytes, ABI bytes, ROM, RAM, storage payloads, and serialized values.
Number3integer arithmeticBacked by big integers, not fixed-width contract integers.
String4text valuesUsed for symbols, contract names, field names, and method names.
Timestamp5date/time valuesExposed as a distinct VM type and also convertible through numeric paths.
Bool6true / falseUsed heavily in interop results and guard conditions.
Enum7enum-like valuesCommon for flags, trigger kinds, and typed control values.
Object8runtime-native objectsUsed for Address, Hash and execution-context values.

Developer Notes

Number

Number is the default arithmetic type. You should think of it as an arbitrary-size integer value, not a 32-bit or 64-bit integer.

Struct

Struct is the general-purpose compound container. The runtime also uses struct-shaped VM objects to return array-like and map-like results, for example from:

  • Runtime.GetOwnerships
  • Runtime.ReadToken
  • Runtime.ReadInfusions
  • Map.Keys

Object

Object deserves special attention.

For contract authors it is a runtime-native wrapper type, not a user-defined object model. The runtime uses it for:

  • addresses
  • hashes
  • execution contexts

That is why the constructor-style interops return object-backed values:

  • Address()
  • Hash()
  • Timestamp() does not return Object; it returns the typed timestamp value directly

In other words, Object exists, but developers should not build contract design around arbitrary host reflection or arbitrary native object serialization.

Default Or Missing Values

Some interops return typed default values when a storage slot is missing. For example:

  • Data.Get
  • Map.Get
  • List.Get

When that happens, the runtime uses the requested VM type to decide what default shape to return. This is why many storage getters ask for the expected type explicitly.