Cycle

The Scriptorium

Smart Assembly code templates and tools for on-chain development in Eve Frontier.

SA Fundamentals
BeginnerChapter 5 of 515 min read

Deploying Your Assembly

You've written systems, defined tables, and built a frontend. Now it's time to deploy your Smart Assembly to Eve Frontier.

Local Testing First

Before deploying to the live chain, always test locally:

bash
# Start a local chain
pnpm mud dev

# In another terminal, run your tests
pnpm mud test

The mud dev command starts a local Anvil chain and deploys your World automatically. Changes are hot-reloaded.

Deploying to Eve Frontier

1. Configure the Target Chain

Update your foundry.toml with the Eve Frontier RPC endpoint:

toml
[profile.eve-frontier]
eth_rpc_url = "https://rpc.evefrontier.com"
chain_id = 4242

2. Set Up Your Wallet

You'll need a wallet with gas tokens on the Eve Frontier chain:

bash
# Set your private key (never commit this!)
export PRIVATE_KEY=0x...

3. Deploy

bash
pnpm mud deploy --profile eve-frontier

MUD handles the deployment of your World, systems, and tables in a single transaction batch.

Registering With a Smart Assembly

After deploying, you need to register your systems with a specific Smart Assembly:

solidity
// Register your VisitorSystem on Smart Assembly #1234
world.registerSystem(
  smartObjectId: 1234,
  systemId: "VisitorSystem",
  systemAddress: deployedAddress
);

Verifying Your Deployment

Check that your tables are properly set up:

typescript
import { createClient } from "@latticexyz/store-sync";

const client = createClient({ / config / });

// Verify the table exists and is readable
const data = client.tables.VisitorCount.get({
  smartObjectId: BigInt(1234),
});

console.log("Deployment verified:", data !== null);

Best Practices

  • Always test locally first — Chain deployments cost gas
  • Use a separate deployment wallet — Don't use your main game wallet
  • Version your systems — Use namespaces to manage upgrades
  • Monitor after deploy — Watch for unexpected errors or reverts
  • Document your tables — Other builders may want to interact with your assembly
  • Congratulations!

    You've completed the SA Fundamentals tutorial. You now understand:

    • What Smart Assemblies are and how they work
    • The MUD framework architecture
    • Writing systems and tables
    • Reading on-chain data from JavaScript
    • Deploying to Eve Frontier

    Next, try the Building Your First Gate tutorial to put these skills to work on a practical project.

    Sign in to track your progress.