Skip to main content

Build an Appchain with Your AI Agent

Welcome to the hackathon! This guide will walk you through building an appchain from scratch. You’ll go from a simple idea to a functioning appchain and frontend efficiently.

Step 1: Prepare Your Workspace

Before installing tools or initializing your appchain, create a dedicated directory for your project. This keeps your configuration files, VM binaries, and smart contracts organized in one place. Run the following commands in your terminal:
mkdir my-initia-project
cd my-initia-project

Step 2: Install Your AI Skill [Terminal]

Your AI agent needs the Initia Appchain Dev skill to help you manage your appchain, write smart contracts, and build your frontend. Run the following command in your terminal:
npx skills add initia-labs/agent-skills
To get the most out of this guide, we recommend having two terminal tabs or a split-screen setup:
  1. AI agent: For high-level tasks, contract generation, and troubleshooting.
  2. Standard Terminal: For interactive CLI commands (like weave init) and long-running builds.

Step 3: Choose Your Track & VM [Planning]

Before installing tools, decide what you want to build. This choice determines which Virtual Machine (VM) your AI agent will set up for you.
TrackRecommended VMWhy?
Gaming / ConsumerMoveBest for complex on-chain logic and object-oriented assets.
DeFi / InstitutionalEVM (Solidity)Best for leveraging existing Ethereum tooling and libraries.
Agents / ToolingWasm (Rust)Best for performance-critical logic and Rust ecosystem integration.

Step 4: Prerequisites Checklist

To ensure a smooth setup, verify you have the following system tools installed:
  • Docker Desktop: Required for running the bridge bots and relayer. Must be running.
  • Go (1.22+): Required to build the appchain binaries.
  • Track Specifics:
    • Move: No extra tools required.
    • EVM: Foundry (Forge) is recommended for contract development.
    • Wasm: Rust & Cargo are required for contract development.

Step 5: AI-Powered Initia Tool Setup and Verification

Now, ask your AI agent to handle the Initia-specific tools. It will install the core CLIs (weave, initiad, jq), build your chosen VM binary (minitiad), and then verify everything is accessible in your PATH. Replace <MOVE / EVM / WASM> with your selected track from Step 3 (Move, EVM, or Wasm). Prompt:
Using the `initia-appchain-dev` skill, please set up my environment for the <MOVE / EVM / WASM> track.

Verify Installation & PATH [AI Agent]

After setup completes, your AI agent can verify the tools are accessible from anywhere on your system. Prompt:
Using the `initia-appchain-dev` skill, please verify that `initiad`, `weave`, and `minitiad` are properly installed and accessible in my PATH.

Step 6: Initial Setup with weave init [Terminal]

Your AI agent is your partner in this hackathon, but the weave CLI requires an interactive setup flow to prepare your environment and launch your appchain. You can run it whenever you need to initialize or reconfigure your setup.
If you already ran weave init and want to create a new appchain, run the following commands first:
rm -rf ~/.weave ~/.initia ~/.minitia ~/.opinit
docker rm -f weave-relayer || true
Run the following command in your terminal:
weave init
Here’s a guide on how to navigate the interactive setup:
1

Foundation & Funding

Generate Gas Station Account

The Gas Station is an account on the Initia L1 that will fund your rollup’s infrastructure.Prompt:
How would you like to set up your Gas Station account?
Action: Select Generate new account (recommended).Result: You will see your new Gas Station Address. Copy this address.

Fund Your Gas Station Account

Action: Go to the Initia Testnet Faucet.Action: Paste your address and click Submit to receive testnet INIT tokens.Prompt:
Type `continue` to proceed.
Action: Type continue and press Enter.
2

Rollup Identity

Choose Your Action

Prompt:
What do you want to do?
Action: Select Launch a new rollup.
Switching VMs? Reinstall the correct minitiad binary first (Step 5). If you have existing rollup data, type confirm when prompted to clean it and proceed.

Select L1 Network

Prompt:
Select the Initia L1 network
Action: Select Testnet (initiation-2).

Select Virtual Machine (VM)

Prompt:
Select the Virtual Machine (VM)
Action: Select your desired VM (e.g., Move).

Specify Rollup Chain ID

Prompt:
Specify rollup chain ID
Action: Enter a unique ID (e.g., mygame-1).
Save your Chain ID! You’ll need this unique identifier for your final submission.

Specify Rollup Gas Denom

Prompt:
Specify rollup gas denom
Action: Press Tab for default (umin) or enter your own.

Specify Rollup Node Moniker

Prompt:
Specify rollup node moniker
Action: Press Tab for default (operator).
3

Network & Infrastructure

Submission Interval

Prompt:
Specify OP bridge config: Submission Interval
Action: Press Tab for default (1m).

Finalization Period

Prompt:
Specify OP bridge config: Output Finalization Period
Action: Press Tab for default (168h).

Data Availability

Prompt:
Where should the rollup blocks data be submitted?
Action: Select Initia L1.

Enable Oracle Price Feed

Prompt:
Would you like to enable oracle price feed from L1?
Action: Select Enable.
4

Security & Genesis

Setup Method for System Keys

Prompt:
Select a setup method for the system keys
Action: Select Generate new system keys.

System Accounts Funding Option

Prompt:
Select system accounts funding option
Action: Select Use the default preset.

Specify Fee Whitelist Addresses

Prompt:
Specify fee whitelist addresses
Action: Press Enter to leave empty.

Add Gas Station Account to Genesis

Prompt:
Would you like to add the Gas Station account to genesis accounts?
Action: Select Yes.

Specify Genesis Balance

Prompt:
Specify the genesis balance for the Gas Station account
Action: Enter 1000000000000000000000000 (10^24). This ensures you have plenty of tokens for testing, especially for EVM.
Move Track: Use 10000000000000000000 (10^19) to avoid u64 overflows.

Add Additional Genesis Accounts

Prompt:
Would you like to add genesis accounts?
Action: Select No.
5

Launch

Verify System Keys & Continue

Prompt:
Type 'continue' to proceed.
Action: Type continue and press Enter.

Confirm Transactions

Prompt:
Confirm to proceed with signing and broadcasting the following transactions? [y]:
Action: Type y and press Enter.Your appchain will now launch and start producing blocks!

Step 7: Setup Interwoven Bots [Terminal]

To enable the Optimistic bridge and cross-chain communication (IBC) between Initia L1 and your appchain, you need to start the OPinit Executor and the IBC Relayer. These bots manage the cross-chain connectivity of your chain.
Prerequisite: Your appchain must be running before configuring these bots. Because weave init runs your chain in the background, you can continue using the same terminal window.

7.1 Start the OPinit Executor

The executor handles the submission of rollup data and bridge operations. Run the following command:
weave opinit init executor
Follow the interactive guide:
1

Use Detected Keys

Prompt:
Existing keys in config.json detected. Would you like to add these to the keyring before proceeding?
Action: Select Yes, use detected keys.
2

System Key for Oracle

Prompt:
Please select an option for the system key for Oracle Bridge Executor
Action: Select Generate new system key.
3

Pre-fill Data

Prompt:
Existing config.json detected. Would you like to use the data in this file to pre-fill some fields?
Action: Select Yes, prefill.
4

Listen Address

Prompt:
Specify listen address of the bot
Action: Press Tab to use localhost:3000 (ensure nothing else is running on this port).
5

Finalize Configuration

Action: Press Enter for L1 RPC, Chain ID, and Gas Denom. For Rollup RPC, press Tab to use http://localhost:26657.
6

Start the Bot

Once initialized, start the bot in the background:
weave opinit start executor -d

7.2 Start the IBC Relayer

The relayer enables asset transfers (like INIT) between the L1 and your appchain.
Docker Desktop must be running to launch the relayer.
Run the following command:
weave relayer init
Follow the interactive guide:
1

Select Rollup

Prompt:
Select the type of Interwoven rollup you want to relay
Action: Select Local Rollup (<YOUR_APPCHAIN_ID>).
2

Endpoints

Action: Press Tab for both RPC (http://localhost:26657) and REST (http://localhost:1317) endpoints.
3

Channel Method

Prompt:
Select method to set up IBC channels for the relayer
Action: Select Subscribe to only transfer and nft-transfer IBC Channels (minimal setup).
4

Select Channels

Prompt:
Select the IBC channels you would like to relay
Action: Press Space to select all (transfer and nft-transfer), then press Enter.
5

Challenger Key

Prompt:
Do you want to set up relayer with the challenger key
Action: Select Yes (recommended).
6

Start Relayer

Start the relayer process:
weave relayer start -d
You can view relayer logs at any time by running weave relayer log in your terminal.
Persistence After Restart: If you shut down your computer, the Relayer will stay active (it’s managed by Docker), but you will need to manually restart your Rollup full node and Executor bot using these commands:
# Restart the rollup full node
weave rollup start -d

# Restart the OPinit executor bot
weave opinit start executor -d

Step 8: Final Key Setup [Terminal]

Why: The Gas Station account acts as your Universal Developer Key. Importing it allows you to sign transactions manually via the CLI, and it enables your AI co-pilot to deploy contracts and interact with your appchain. Action: Run these commands to import your account into both the L1 (initiad) and L2 (minitiad) keychains:
# Extract your mnemonic from the weave config
MNEMONIC=$(jq -r '.common.gas_station.mnemonic' ~/.weave/config.json)

# Import into initiad (L1)
initiad keys add gas-station --recover --keyring-backend test --coin-type 60 --key-type eth_secp256k1 --source <(echo -n "$MNEMONIC")

# Import into minitiad (L2)
minitiad keys add gas-station --recover --keyring-backend test --coin-type 60 --key-type eth_secp256k1 --source <(echo -n "$MNEMONIC")
Action: Verify the import by listing your keys to ensure gas-station appears in both:
# Verify L1 keys
initiad keys list --keyring-backend test

# Verify L2 keys
minitiad keys list --keyring-backend test
Production Security: This workflow is for rapid prototyping only.
  • Insecure Storage: config.json and --keyring-backend test are for convenience, not production.
  • Mainnet: Use secure keyrings (OS keychain, hardware wallet) and never store mnemonics in plaintext.
  • Best Practice: Use separate accounts for Gas Station, Validator, and Developer roles on Mainnet.

Step 9: Verifying Your Appchain [AI Agent]

After completing the infrastructure setup, verify that everything is healthy. Prompt:
Using the `initia-appchain-dev` skill, please verify that my appchain, executor bot, and relayer are running and that my Gas Station account has a balance.

Step 10: Next Steps: Master the Workflow

Congratulations! You have successfully launched your first appchain. Before diving into a specific blueprint, we recommend mastering the development workflow. The Builder Guide will teach you the Describe -> Build -> Test loop using your AI co-pilot, which is essential for building a winning hackathon entry. Go to the Builder Guide ->