External Calls
Script Builder reaches native chain functionality through VM interop calls. In bytecode terms this is the same EXTCALL mechanism documented in the VM section, but from a developer point of view it is easier to think of these as named external methods such as:
Runtime.TransferTokensRuntime.MintTokenNexus.CreateTokenData.GetMap.Set
The authoritative behavior is documented in the VM interop reference:
This page focuses on how to use that surface from script-building code.
How External Calls Work
At a high level, a script:
- pushes arguments to the VM stack
- pushes the interop method name
- executes
EXTCALL
If you are using a helper library or Script Builder abstraction, it usually hides the raw stack manipulation and gives you a direct helper such as CallInterop("Runtime.TransferTokens", ...).
Interop Namespaces You Can Rely On Today
The node serves these namespaces:
Runtime.*- context helpers, logging, token operations, NFT operations, contract deploy and upgrade
Nexus.*- token-backed create, token-backed attach, token series creation
Data.*- scalar contract storage
Map.*- map-like contract storage
List.*- list-like contract storage
Account.Name- governance name lookup
- constructors
Address(),Hash(),Timestamp()
Important Working Flows
Standalone custom contract lifecycle
Runtime.DeployContract(from, contractName, script, abi)Runtime.UpgradeContract(from, contractName, script, abi)
Use lowercase custom contract names for these flows.
Token-backed contract lifecycle
Nexus.CreateToken(from, script, abi)Nexus.AttachTokenContract(from, symbol, script, abi)Runtime.UpgradeContract(from, contractName, script, abi)
Use these for uppercase token symbols. Do not try to deploy an uppercase token-backed contract through Runtime.DeployContract.
Fungible token operations
Runtime.GetBalanceRuntime.TransferTokensRuntime.TransferBalanceRuntime.MintTokensRuntime.BurnTokens
NFT operations
Runtime.GetOwnershipsRuntime.GetOwnershipsBySeriesRuntime.TransferTokenRuntime.MintTokenRuntime.BurnTokenRuntime.InfuseTokenRuntime.ReadTokenRuntime.ReadTokenROMRuntime.ReadTokenRAMRuntime.ReadInfusionsRuntime.WriteTokenNexus.CreateTokenSeries
Contract storage
Data.Get,Data.Set,Data.DeleteMap.Has,Map.Get,Map.Set,Map.Remove,Map.Count,Map.Clear,Map.KeysList.Get,List.Add,List.Replace,List.RemoveAt,List.Count,List.Clear
Names The Node Rejects
Do not build scripts around these names:
Runtime.KillContractRuntime.SwapTokensRuntime.AESDecryptRuntime.AESEncryptOrganization.*Oracle.*Task.*- several older
Nexus.*names such asCreateChainandCreateOrganization
Practical Advice
- Use the VM interop reference for exact current behavior.
- If you are building deployment tooling, prefer
pha-deployor the Token Deployment UI instead of hand-authoring raw lifecycle scripts unless you actually need low-level control. - When you do write raw scripts, separate standalone contract flows from token-backed flows in your own code and documentation. They are different validator paths on purpose.