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:
# Start a local chain
pnpm mud dev
# In another terminal, run your tests
pnpm mud testThe 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:
[profile.eve-frontier]
eth_rpc_url = "https://rpc.evefrontier.com"
chain_id = 42422. Set Up Your Wallet
You'll need a wallet with gas tokens on the Eve Frontier chain:
# Set your private key (never commit this!)
export PRIVATE_KEY=0x...3. Deploy
pnpm mud deploy --profile eve-frontierMUD 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:
// 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:
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
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.