Interfacing with the EVE Frontier World
Overview
Writing to the World Contracts
Example: Bring Assembly Online
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],
});Example: Sponsored Transactions
Reading from the World Contracts
GraphQL
Query character by wallet address
gRPC
Events
Reading from the World
Last updated

