initia-appchain-dev

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Initia Appchain Dev

Initia应用链开发

Deliver practical guidance for full-stack Initia development: contracts, frontend integration, and appchain operations.
为全栈Initia开发提供实用指南:合约开发、前端集成与应用链运维。

Intake Questions (Ask First)

前置收集问题(首先询问)

Collect missing inputs before implementation:
  1. Which VM is required (
    evm
    ,
    move
    ,
    wasm
    )?
  2. Which network is targeted (
    testnet
    or
    mainnet
    )?
  3. Is this a fresh rollup launch or operation/debug on an existing rollup?
  4. For frontend work, is this an EVM JSON-RPC app or an InterwovenKit wallet/bridge app?
  5. What chain-specific values are known (
    chain_id
    , RPC URL, module address, denom)?
If critical values are missing, ask concise follow-up questions before generating final code/config.
If
chain_id
/endpoints/VM are missing, run the discovery flow in
runtime-discovery.md
before assuming defaults.
Then ask a context-specific confirmation:
  • Frontend task: "I found a local rollup config/runtime. Should I use this rollup for frontend integration?"
  • Non-frontend task: "I found local runtime values (VM, chain ID, endpoints). Should I use these for this task?"
在实施前收集缺失的信息:
  1. 需要使用哪种VM(
    evm
    move
    wasm
    )?
  2. 目标网络是哪个(
    testnet
    还是
    mainnet
    )?
  3. 这是全新的rollup启动,还是对现有rollup进行运维/调试?
  4. 针对前端工作,是EVM JSON-RPC应用还是InterwovenKit钱包/桥接应用?
  5. 已知哪些链特定参数(
    chain_id
    、RPC URL、模块地址、denom)?
如果关键信息缺失,在生成最终代码/配置前先提出简洁的跟进问题。
如果
chain_id
/端点/VM信息缺失,在假设默认值前先执行
runtime-discovery.md
中的发现流程。
然后询问上下文相关的确认问题:
  • 前端任务:“我找到了本地rollup配置/运行时环境。是否应该使用该rollup进行前端集成?”
  • 非前端任务:“我找到了本地运行时参数(VM、chain ID、端点)。是否应该将这些用于本次任务?”

Opinionated Defaults

预设默认值

AreaDefaultNotes
VM
evm
Use
move
/
wasm
only when requested
Network
testnet
Use
mainnet
only when explicitly requested
Frontend (EVM VM)wagmi + viem direct JSON-RPCDefault for pure EVM apps
Frontend (Move/Wasm or bridge wallet UX)
@initia/interwovenkit-react
Use when InterwovenKit features are required
Frontend wallet flow (InterwovenKit path)
requestTxBlock
Prefer confirmation UX
Frontend provider order (InterwovenKit path)Query -> Wagmi -> InterwovenKitBaseline path
Rollup DA
INITIA
Prefer Celestia only when explicitly needed
Rollup moniker
operator
Override for production naming
EVM denom
GAS
Typical test/internal default
Move/Wasm denom
umin
Typical default
领域默认值说明
VM
evm
仅在被要求时使用
move
/
wasm
网络
testnet
仅在明确要求时使用
mainnet
前端(EVM VM)wagmi + viem直接JSON-RPC纯EVM应用的默认方案
前端(Move/Wasm或桥接钱包UX)
@initia/interwovenkit-react
当需要InterwovenKit功能时使用
前端钱包流程(InterwovenKit路径)
requestTxBlock
优先选择确认式用户体验
前端提供商顺序(InterwovenKit路径)Query -> Wagmi -> InterwovenKit基准流程
Rollup数据可用性层
INITIA
仅在明确需要时优先选择Celestia
Rollup名称
operator
生产环境可覆盖该名称
EVM代币单位
GAS
典型测试/内部默认值
Move/Wasm代币单位
umin
典型默认值

Operating Procedure (How To Execute Tasks)

操作流程(任务执行方法)

When solving an Initia task:
  1. Classify the task layer:
  • Contract layer (Move/Wasm/EVM)
  • Frontend/wallet/provider layer
  • Appchain/Weave operations layer
  • Integration and transaction execution layer
  • Testing/CI and infra layer (RPC/LCD/indexer health)
  1. Resolve runtime context first:
  • If VM/
    chain_id
    /endpoint values are unknown, run
    scripts/verify-appchain.sh --gas-station
    .
  • If critical values are still missing, run
    runtime-discovery.md
    .
  • Confirm with user whether discovered local rollup should be used.
  1. Pick task-specific references from the Progressive Disclosure list below.
  2. Implement with Initia-specific correctness:
  • Be explicit about network (
    testnet
    /
    mainnet
    ), VM,
    chain_id
    , and endpoints (RPC/REST/JSON-RPC).
  • Keep denom and fee values aligned (
    l1_config.gas_prices
    ,
    l2_config.denom
    , funded genesis balances).
  • Ensure wallet/provider stack matches selected frontend path.
  • Ensure tx message
    typeUrl
    and payload shape match chain/VM expectations.
  • Keep address formats correct (
    init1...
    ,
    0x...
    ,
    celestia1...
    ) per config field requirements.
  1. Validate before handoff:
  • Run layer-specific checks (for example
    scripts/verify-appchain.sh --gas-station
    to check health and gas station balance).
  • Verify L2 balances for system accounts if the rollup is active.
  • Mark interactive commands clearly when the user must run them.
处理Initia任务时:
  1. 对任务层级进行分类:
  • 合约层(Move/Wasm/EVM)
  • 前端/钱包/提供商层
  • 应用链/Weave运维层
  • 集成与交易执行层
  • 测试/CI与基础设施层(RPC/LCD/索引器健康状态)
  1. 首先解析运行时上下文:
  • 如果VM/
    chain_id
    /端点参数未知,运行
    scripts/verify-appchain.sh --gas-station
  • 如果关键参数仍缺失,执行
    runtime-discovery.md
    中的流程。
  • 与用户确认是否使用发现的本地rollup。
  1. 从下方的渐进式参考文档列表中选择任务相关的参考资料。
  2. 按照Initia的规范实现:
  • 明确指定网络(
    testnet
    /
    mainnet
    )、VM、
    chain_id
    和端点(RPC/REST/JSON-RPC)。
  • 保持代币单位和手续费参数一致(
    l1_config.gas_prices
    l2_config.denom
    、预注资创世账户余额)。
  • 确保钱包/提供商栈与选定的前端方案匹配。
  • 确保交易消息的
    typeUrl
    和 payload 结构符合链/VM的要求。
  • 确保地址格式符合配置字段的要求(
    init1...
    0x...
    celestia1...
    )。
  1. 交付前验证:
  • 执行层级特定的检查(例如运行
    scripts/verify-appchain.sh --gas-station
    检查健康状态和加油站余额)。
  • 如果rollup已激活,验证系统账户的L2余额。
  • 明确标记需要用户自行执行的交互式命令。

Progressive Disclosure (Read When Needed)

渐进式参考文档(按需查阅)

  • Runtime discovery and local rollup detection:
    runtime-discovery.md
  • Contracts (Move/Wasm/EVM):
    contracts.md
  • Frontend (EVM direct JSON-RPC):
    frontend-evm-rpc.md
  • Frontend (InterwovenKit):
    frontend-interwovenkit.md
  • Weave command lookup:
    weave-commands.md
  • Launch config field reference:
    weave-config-schema.md
  • Failure diagnosis and recovery:
    troubleshooting.md
  • End-to-end workflows:
    e2e-recipes.md
  • 运行时发现与本地rollup检测:
    runtime-discovery.md
  • 合约开发(Move/Wasm/EVM):
    contracts.md
  • 前端(EVM直接JSON-RPC):
    frontend-evm-rpc.md
  • 前端(InterwovenKit):
    frontend-interwovenkit.md
  • Weave命令查询:
    weave-commands.md
  • 启动配置字段参考:
    weave-config-schema.md
  • 故障诊断与恢复:
    troubleshooting.md
  • 端到端工作流:
    e2e-recipes.md

Documentation Fallback

文档兜底方案

When uncertain about any Initia-specific behavior, prefer official docs:
  • Core docs:
    https://docs.initia.xyz
  • InterwovenKit docs:
    https://docs.initia.xyz/interwovenkit
Do not guess when an authoritative answer can be confirmed from docs.
当不确定任何Initia特定行为时,优先参考官方文档:
  • 核心文档:
    https://docs.initia.xyz
  • InterwovenKit文档:
    https://docs.initia.xyz/interwovenkit
当可从官方文档获取权威答案时,请勿猜测。

Script Usage

脚本使用说明

  • Contract scaffolding:
    scripts/scaffold-contract.sh
  • Frontend provider sanity check:
    scripts/check-provider-setup.sh
  • Appchain health verification:
    scripts/verify-appchain.sh
  • Address conversion (hex/bech32):
    scripts/convert-address.py
  • System key generation (
    bip_utils
    ; pass
    --vm <evm|move|wasm>
    for denom-aware defaults; mnemonics are redacted unless
    --include-mnemonics --output <file>
    ):
    scripts/generate-system-keys.py
  • 合约脚手架:
    scripts/scaffold-contract.sh
  • 前端提供商 sanity 检查:
    scripts/check-provider-setup.sh
  • 应用链健康验证:
    scripts/verify-appchain.sh
  • 地址转换(十六进制/bech32):
    scripts/convert-address.py
  • 系统密钥生成(
    bip_utils
    ;传递
    --vm <evm|move|wasm>
    获取适配代币单位的默认值;除非使用
    --include-mnemonics --output <file>
    ,否则助记词会被脱敏):
    scripts/generate-system-keys.py

Expected Deliverables

预期交付物

When implementing substantial changes, return:
  1. Exact files changed.
  2. Commands to run for setup/build/test.
  3. Verification steps and expected outputs.
  4. Short risk notes for signing, key material, fees, or production-impacting changes.
当实施重大变更时,需返回以下内容:
  1. 明确的修改文件列表。
  2. 用于搭建/构建/测试的执行命令。
  3. 验证步骤与预期输出。
  4. 关于签名、密钥材料、手续费或影响生产环境变更的简短风险说明。

Output Rules

输出规则

  • Keep examples internally consistent.
  • Include prerequisites for every command sequence.
  • Avoid unsafe fallback logic in key or signing workflows.
  • Never print raw mnemonics in chat output; if needed, write them to a protected local file.
  • If uncertain about Initia specifics, consult official Initia docs first.
  • 保持示例内部一致性。
  • 为每个命令序列添加前置条件说明。
  • 在密钥或签名工作流中避免不安全的回退逻辑。
  • 切勿在聊天输出中打印原始助记词;若需提供,写入受保护的本地文件。
  • 若不确定Initia的具体规范,先查阅官方Initia文档。