world.move
The world.move module is the root entry point of the EVE Frontier world contracts package. It is responsible for bootstrapping the entire access control hierarchy by creating the GovernorCap during package initialization.
Core Component
classDiagram
class GovernorCap {
+UID id
+address governor
}
GovernorCap
The GovernorCap is the top-level authority in the EVE Frontier access control hierarchy. It is created once during the package init function and transferred to the deployer’s address.
- Singleton — Only one
GovernorCapexists per deployment. - Owned object — Transferred to the deployer, not shared.
- Root authority — Required to create
AdminACL,ServerAddressRegistry, and manage the entire access hierarchy.
Initialization Flow
sequenceDiagram
participant Deployer
participant init()
participant Sui Runtime
Deployer->>init(): Package published
init()->>Sui Runtime: object::new(ctx) → UID
init()->>Sui Runtime: Create GovernorCap{id, governor: sender}
init()->>Sui Runtime: transfer::transfer(gov_cap, sender)
Note over Deployer: GovernorCap now owned by deployer
The init function is called exactly once when the package is published. It:
- Creates a new
GovernorCapwith the deployer as thegovernoraddress. - Transfers the cap to the deployer via
transfer::transfer.
Role in the Access Hierarchy
flowchart TD
Gov[GovernorCap] --> AdminACL[AdminACL - Shared Object]
Gov --> ServerReg[ServerAddressRegistry]
AdminACL --> OwnerCap[OwnerCap of T]
OwnerCap --> Objects[Characters, Assemblies, Network Nodes]
The GovernorCap sits at the apex of the capability hierarchy defined in access_control.move. It is the only capability that can:
- Add or remove authorized sponsors in the
AdminACLshared object - Manage the
ServerAddressRegistryfor off-chain proof validation - Bootstrap the entire permission system for the world
Important
Loss of the GovernorCap would mean loss of administrative control over the entire world contract deployment. In practice, this capability is held by the game operator.
Tip
Use the menu on the left hand side to find the article you are looking for. You can also use search at the top to search for specific terms.