Interfacing with the EVE Frontier World

Overview

You interact with the EVE Frontier world in two ways:

  • Write path — Submit transactions to Move public functions to mutate on-chain state (create assemblies, bring them online, deposit items, etc.).

  • Read path — Query on-chain state and events via GraphQLarrow-up-right, gRPCarrow-up-right, or custom indexers.


Writing to the World Contracts

Write operations use the Sui TypeScript SDKarrow-up-right to build and submit transactions. The world-contracts ts-scriptsarrow-up-right provide examples on how to interact with the EVE Frontier world. You can also use other SDKs (e.g., Rustarrow-up-right or community Go SDKarrow-up-right) based on your tech stack.

Example: Bring Assembly Online

This script borrows OwnerCap from a character, calls the assembly online function, then returns the cap:

import { Transaction } from "@mysten/sui/transactions";

// 1. Borrow OwnerCap from character
const [ownerCap] = tx.moveCall({
  target: `${config.packageId}::character::borrow_owner_cap`,
  typeArguments: [`${config.packageId}::assembly::Assembly`],
  arguments: [tx.object(characterId), tx.object(ownerCapId)],
});

// 2. Bring assembly online
tx.moveCall({
  target: `${config.packageId}::assembly::online`,
  arguments: [
    tx.object(assemblyId),
    tx.object(networkNodeId),
    tx.object(config.energyConfig),
    ownerCap,
  ],
});

// 3. Return OwnerCap to character
tx.moveCall({
  target: `${config.packageId}::character::return_owner_cap`,
  typeArguments: [`${config.packageId}::assembly::Assembly`],
  arguments: [tx.object(characterId), ownerCap],
});

See ts-scripts/assembly/online.tsarrow-up-right for the full script.

Example: Sponsored Transactions

Many world operations require server-side validation (e.g., proximity checks). These use sponsored transactions — the player signs the intent, and an authorized sponsor (e.g., EVE Frontier) pays gas and submits:

See ts-scripts/storage-unit/deposit-to-ephemeral-inventory.tsarrow-up-right for a full example.


Reading from the World Contracts

SuiClient is the main entry point for read operations in the TypeScript SDKarrow-up-right. It connects to a Sui full node and exposes methods for querying objects, events, and transactions without submitting any transaction. Use it when you need to read state programmatically — for example, fetching an assembly's current config or checking ownership before building a transaction.

GraphQL

Use Sui's GraphQL RPCarrow-up-right to query objects by type, owner, or filters.

Example: Get objects by type

Try it: GraphQL Testnet IDEarrow-up-right. Pass variables in the IDE's Variables panel, e.g.:

gRPC

For higher throughput and streaming (e.g., checkpoints), use gRPCarrow-up-right—Sui's preferred read path. Requires a gRPC-enabled Sui full node.

Events

State changes emit events on transactions. Use suix_queryEventsarrow-up-right to filter by module, type, or sender:

World events include JumpEvent (gate traversal), inventory updates, and deployment changes. Store and subscribe to events off-chain for dashboards, analytics, or game services.


References

Last updated