initia-appchain-dev
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInitia 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:
- Which VM is required (,
evm,move)?wasm - Which network is targeted (or
testnet)?mainnet - Is this a fresh rollup launch or operation/debug on an existing rollup?
- For frontend work, is this an EVM JSON-RPC app or an InterwovenKit wallet/bridge app?
- What chain-specific values are known (, RPC URL, module address, denom)?
chain_id
If critical values are missing, ask concise follow-up questions before generating final code/config.
If /endpoints/VM are missing, run the discovery flow in before assuming defaults.
chain_idruntime-discovery.mdThen 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?"
在实施前收集缺失的信息:
- 需要使用哪种VM(、
evm、move)?wasm - 目标网络是哪个(还是
testnet)?mainnet - 这是全新的rollup启动,还是对现有rollup进行运维/调试?
- 针对前端工作,是EVM JSON-RPC应用还是InterwovenKit钱包/桥接应用?
- 已知哪些链特定参数(、RPC URL、模块地址、denom)?
chain_id
如果关键信息缺失,在生成最终代码/配置前先提出简洁的跟进问题。
如果/端点/VM信息缺失,在假设默认值前先执行中的发现流程。
chain_idruntime-discovery.md然后询问上下文相关的确认问题:
- 前端任务:“我找到了本地rollup配置/运行时环境。是否应该使用该rollup进行前端集成?”
- 非前端任务:“我找到了本地运行时参数(VM、chain ID、端点)。是否应该将这些用于本次任务?”
Opinionated Defaults
预设默认值
| Area | Default | Notes |
|---|---|---|
| VM | | Use |
| Network | | Use |
| Frontend (EVM VM) | wagmi + viem direct JSON-RPC | Default for pure EVM apps |
| Frontend (Move/Wasm or bridge wallet UX) | | Use when InterwovenKit features are required |
| Frontend wallet flow (InterwovenKit path) | | Prefer confirmation UX |
| Frontend provider order (InterwovenKit path) | Query -> Wagmi -> InterwovenKit | Baseline path |
| Rollup DA | | Prefer Celestia only when explicitly needed |
| Rollup moniker | | Override for production naming |
| EVM denom | | Typical test/internal default |
| Move/Wasm denom | | Typical default |
| 领域 | 默认值 | 说明 |
|---|---|---|
| VM | | 仅在被要求时使用 |
| 网络 | | 仅在明确要求时使用 |
| 前端(EVM VM) | wagmi + viem直接JSON-RPC | 纯EVM应用的默认方案 |
| 前端(Move/Wasm或桥接钱包UX) | | 当需要InterwovenKit功能时使用 |
| 前端钱包流程(InterwovenKit路径) | | 优先选择确认式用户体验 |
| 前端提供商顺序(InterwovenKit路径) | Query -> Wagmi -> InterwovenKit | 基准流程 |
| Rollup数据可用性层 | | 仅在明确需要时优先选择Celestia |
| Rollup名称 | | 生产环境可覆盖该名称 |
| EVM代币单位 | | 典型测试/内部默认值 |
| Move/Wasm代币单位 | | 典型默认值 |
Operating Procedure (How To Execute Tasks)
操作流程(任务执行方法)
When solving an Initia task:
- 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)
- Resolve runtime context first:
- If VM//endpoint values are unknown, run
chain_id.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.
- Pick task-specific references from the Progressive Disclosure list below.
- Implement with Initia-specific correctness:
- Be explicit about network (/
testnet), VM,mainnet, and endpoints (RPC/REST/JSON-RPC).chain_id - Keep denom and fee values aligned (,
l1_config.gas_prices, funded genesis balances).l2_config.denom - Ensure wallet/provider stack matches selected frontend path.
- Ensure tx message and payload shape match chain/VM expectations.
typeUrl - Keep address formats correct (,
init1...,0x...) per config field requirements.celestia1...
- Validate before handoff:
- Run layer-specific checks (for example to check health and gas station balance).
scripts/verify-appchain.sh --gas-station - Verify L2 balances for system accounts if the rollup is active.
- Mark interactive commands clearly when the user must run them.
处理Initia任务时:
- 对任务层级进行分类:
- 合约层(Move/Wasm/EVM)
- 前端/钱包/提供商层
- 应用链/Weave运维层
- 集成与交易执行层
- 测试/CI与基础设施层(RPC/LCD/索引器健康状态)
- 首先解析运行时上下文:
- 如果VM//端点参数未知,运行
chain_id。scripts/verify-appchain.sh --gas-station - 如果关键参数仍缺失,执行中的流程。
runtime-discovery.md - 与用户确认是否使用发现的本地rollup。
- 从下方的渐进式参考文档列表中选择任务相关的参考资料。
- 按照Initia的规范实现:
- 明确指定网络(/
testnet)、VM、mainnet和端点(RPC/REST/JSON-RPC)。chain_id - 保持代币单位和手续费参数一致(、
l1_config.gas_prices、预注资创世账户余额)。l2_config.denom - 确保钱包/提供商栈与选定的前端方案匹配。
- 确保交易消息的和 payload 结构符合链/VM的要求。
typeUrl - 确保地址格式符合配置字段的要求(、
init1...、0x...)。celestia1...
- 交付前验证:
- 执行层级特定的检查(例如运行检查健康状态和加油站余额)。
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 (; pass
bip_utilsfor denom-aware defaults; mnemonics are redacted unless--vm <evm|move|wasm>):--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:
- Exact files changed.
- Commands to run for setup/build/test.
- Verification steps and expected outputs.
- Short risk notes for signing, key material, fees, or production-impacting changes.
当实施重大变更时,需返回以下内容:
- 明确的修改文件列表。
- 用于搭建/构建/测试的执行命令。
- 验证步骤与预期输出。
- 关于签名、密钥材料、手续费或影响生产环境变更的简短风险说明。
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文档。