Smart Assemblies Overview
Some EVE Frontier smart assemblies are programmable — you can customize their behavior in-game by deploying custom Move contracts.
Getting Started
Prerequisites to customize a smart assembly:
- Create a Character — your on-chain identity that owns all your assemblies. See
character.move. - Build a Network Node — anchor a network node at a Lagrange point. This is the power source for your base. See
network_node.move. - Deposit Fuel and Go Online — deposit fuel into the network node and bring it online to start generating energy.
- Anchor a Smart Assembly — create a smart assembly (e.g., Storage Unit, Gate, Turret) in your base. It automatically connects to the network node for energy.
- Bring the Assembly Online — the assembly reserves energy from the network node and becomes operational.
Tip
For local development and testing, all the above steps can be simulated using scripts. Refer to builder-scaffold so you have everything you need to directly write custom logic for your smart assembly.
efctl can automate
local environment setup, world deployment, and gate creation
with a single command:
efctl env up
Programmable Assemblies
Each assembly type has its own extension pattern. The world contracts provide the core functionality, and builders extend behavior through the typed witness pattern:
Smart Gate
Custom rules for space travel (e.g., toll gates, tribe-only access). The gate owner deploys a custom contract that issues JumpPermits based on arbitrary logic.
- Code reference:
gate.move - Extension examples:
gate.move(extension),tribe_permit.move
Smart Storage Unit
Custom rules for item deposits and withdrawals (e.g., vending machines, trade hubs). The owner deploys a custom contract that controls deposit_item and withdraw_item operations.
- Code reference:
storage_unit.move
Smart Turret
Custom targeting logic for defense structures. Turrets evaluate ships and NPCs entering their engagement range and maintain an on-chain priority queue for target ranking. Builders control two behaviors — InProximity (ships entering range) and Aggression (hostile actions such as starting or stopping an attack on the base) — and can inject custom logic through extension contracts. When the game detects a proximity or aggression event, it sends the turret the full target list along with an AffectedTarget vector describing what changed, and receives back a prioritized ReturnTargetPriorityList with (target_item_id, priority_weight) pairs.
- Code reference:
turret.move(pre-release — PR #95) - Extension example:
turret.move(extension)
Extension Pattern
All programmable assemblies use the same typed witness authorization pattern:
sequenceDiagram
participant Owner
participant Assembly
participant Extension as Custom Extension
Owner->>Assembly: authorize_extension of Auth
Note over Assembly: Auth TypeName added to allowlist
participant Player
Player->>Extension: call custom logic
Extension->>Extension: create Auth{} witness
Extension->>Assembly: call with Auth witness
Assembly->>Assembly: verify Auth registered
Assembly-->>Player: operation succeeds
- The owner registers the extension’s witness type on the assembly
- The extension creates instances of its witness type to call assembly functions
- The assembly verifies the witness type is registered before allowing the operation
For complete extension examples, see the Extension Examples section.
Related Resources
- EVE Frontier World Explainer — Three-layer architecture overview
- Ownership Model — Borrow-use-return pattern for
OwnerCap - builder-scaffold — Project template for building and testing extensions