Virtual Machine
The current Carbon validator includes a live Phantasma VM implementation. It executes:
standalone custom contracts deployed with
Runtime.DeployContract(...)token-backed contracts created with
Nexus.CreateToken(...)or attached later withNexus.AttachTokenContract(...)trigger code such as
onMint,onBurn,onSend,onReceive,onSeries,onAttach, andonUpgradetransaction scripts and read-only scripts executed through the VM entry context
This section documents the current validator behavior. It is meant to help developers understand what the VM can do today, how it is wired into Carbon, and which interop surfaces are available right now.
What To Read First
how execution contexts, registers, stack, interop, gas, and triggers fit together
the VM value model used by scripts, ABIs, and interop calls
the core instruction set and base opcode gas costs
the native bridge from VM code into token, NFT, storage, and contract lifecycle operations
Practical Scope
For most contract authors, the most important parts are:
custom contract lifecycle through
Runtime.DeployContract(...)andRuntime.UpgradeContract(...)token-backed lifecycle through
Nexus.CreateToken(...),Nexus.AttachTokenContract(...), andRuntime.UpgradeContract(...)token and NFT interops such as
Runtime.MintTokens,Runtime.MintToken,Runtime.TransferTokens,Runtime.TransferToken,Runtime.ReadToken, andNexus.CreateTokenSeriesstorage helpers
Data.*,Map.*, andList.*
If you are deploying contracts rather than writing raw scripts, the most developer-friendly entry points are still the higher-level tools:
Last updated