deploy-contracts

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Deploy Contracts Skill

合约部署技能

Overview

概述

This skill guides safe deployment of Move contracts to Aptos networks. Always deploy to testnet before mainnet.
本技能指导你将Move合约安全部署到Aptos网络。部署到mainnet之前请务必先部署到testnet。

Pre-Deployment Checklist

部署前检查清单

Before deploying, verify ALL items:
部署前,请确认所有检查项均已完成:

Security Audit ⭐ CRITICAL - See SECURITY.md

安全审计 ⭐ 关键项 - 参考 SECURITY.md

  • Security audit completed (use
    security-audit
    skill)
  • All critical vulnerabilities fixed
  • All security patterns verified (arithmetic safety, storage scoping, reference safety, business logic)
  • Access control verified (signer checks, object ownership)
  • Input validation implemented (minimum thresholds, fee validation)
  • No unbounded iterations (per-user storage, not global vectors)
  • Atomic operations (no front-running opportunities)
  • Randomness security (if applicable - entry functions, gas balanced)
  • 已完成安全审计(使用
    security-audit
    技能)
  • 所有高危漏洞已修复
  • 所有安全模式已验证(算术安全、存储范围、引用安全、业务逻辑)
  • 访问控制已验证(签名者检查、对象所有权)
  • 已实现输入校验(最低阈值、手续费校验)
  • 无无限迭代逻辑(使用按用户存储,而非全局向量)
  • 原子操作(无前端运行风险)
  • 随机性安全(如适用:入口函数、gas平衡)

Testing

测试

  • 100% test coverage achieved:
    aptos move test --coverage
  • All tests passing:
    aptos move test
  • Coverage report shows 100.0%
  • Edge cases tested
  • 已实现100%测试覆盖率:
    aptos move test --coverage
  • 所有测试用例通过:
    aptos move test
  • 覆盖率报告显示100.0%
  • 已测试边缘场景

Code Quality

代码质量

  • Code compiles without errors:
    aptos move compile
  • No hardcoded addresses (use named addresses)
  • Error codes clearly defined
  • Functions properly documented
  • 代码编译无错误:
    aptos move compile
  • 无硬编码地址(使用命名地址)
  • 错误码定义清晰
  • 函数有完善的文档说明

Configuration

配置

  • Move.toml configured correctly
  • Named addresses set up:
    my_addr = "_"
  • Dependencies specified with correct versions
  • Network URLs configured
  • Move.toml配置正确
  • 命名地址已设置:
    my_addr = "_"
  • 依赖指定了正确的版本
  • 网络URL已配置

Object Deployment (Modern Pattern)

对象部署(现代模式)

CRITICAL: Use Correct Deployment Command

关键:使用正确的部署命令

There are TWO ways to deploy contracts. For modern object-based contracts, use
deploy-object
:
✅ CORRECT: Object Deployment (Modern Pattern)
bash
aptos move deploy-object \
    --address-name my_addr \
    --profile devnet \
    --assume-yes
What this does:
  1. Creates an object to host your contract code
  2. Deploys the package to that object's address
  3. Returns the object address (deterministic, based on deployer + package name)
  4. Object address becomes your contract address
❌ WRONG: Using Regular Publish for Object Contracts
bash
undefined
部署合约有两种方式。对于现代基于对象的合约,请使用
deploy-object
✅ 正确:对象部署(现代模式)
bash
aptos move deploy-object \
    --address-name my_addr \
    --profile devnet \
    --assume-yes
命令执行逻辑:
  1. 创建一个对象来承载你的合约代码
  2. 将包部署到该对象的地址
  3. 返回对象地址(基于部署者+包名生成,地址确定性)
  4. 该对象地址即为你的合约地址
❌ 错误:对对象合约使用常规发布命令
bash
undefined

❌ Don't use this for object-based contracts

❌ 基于对象的合约请勿使用该命令

aptos move publish
--named-addresses my_addr=<address>

**When to use each:**

- `deploy-object`: Modern contracts using objects (RECOMMENDED)
- `publish`: Legacy account-based deployment (older pattern)

**How to tell if you need object deployment:**

- Your contract creates named objects in `init_module`
- Your contract uses `object::create_named_object()`
- You want a deterministic contract address
- Documentation says "deploy as object"
aptos move publish
--named-addresses my_addr=<address>

**适用场景说明:**

- `deploy-object`:使用对象的现代合约(推荐)
- `publish`:传统基于账户的部署(旧模式)

**判断是否需要对象部署的方法:**

- 你的合约在`init_module`中创建了命名对象
- 你的合约使用了`object::create_named_object()`
- 你需要确定性的合约地址
- 文档说明需"作为对象部署"

Alternative Object Deployment Commands

备选对象部署命令

Option 1:
deploy-object
(Recommended - Simplest)
bash
aptos move deploy-object --address-name my_addr --profile devnet
  • Automatically creates object and deploys code
  • Object address is deterministic
  • Best for most use cases
Option 2:
create-object-and-publish-package
(Advanced)
bash
aptos move create-object-and-publish-package \
    --address-name my_addr \
    --named-addresses my_addr=default
  • More complex command with more options
  • Use only if you need specific object configuration
  • Generally not needed
Recommendation: Always use
deploy-object
unless you have a specific reason to use the alternative.
选项1:
deploy-object
(推荐-最简便)
bash
aptos move deploy-object --address-name my_addr --profile devnet
  • 自动创建对象并部署代码
  • 对象地址具有确定性
  • 适合绝大多数场景
选项2:
create-object-and-publish-package
(高级)
bash
aptos move create-object-and-publish-package \
    --address-name my_addr \
    --named-addresses my_addr=default
  • 更复杂的命令,支持更多配置选项
  • 仅当你需要特定对象配置时使用
  • 通常不需要使用
建议:除非你有特殊理由使用备选命令,否则始终使用
deploy-object

Deployment Workflow

部署工作流

Step 1: Test Locally

步骤1:本地测试

bash
undefined
bash
undefined

Ensure all tests pass

Ensure all tests pass

aptos move test
aptos move test

Verify 100% coverage

Verify 100% coverage

aptos move test --coverage aptos move coverage summary
aptos move test --coverage aptos move coverage summary

Expected output: "coverage: 100.0%"

Expected output: "coverage: 100.0%"

undefined
undefined

Step 2: Compile

步骤2:编译

bash
undefined
bash
undefined

Compile contract

Compile contract

aptos move compile --named-addresses my_addr=<your_address>
aptos move compile --named-addresses my_addr=<your_address>

Verify compilation succeeds

Verify compilation succeeds

echo $?
echo $?

Expected: 0 (success)

Expected: 0 (success)

undefined
undefined

Step 3: Deploy to Devnet (Optional)

步骤3:部署到Devnet(可选)

Devnet is for quick testing and experimentation.
bash
undefined
Devnet用于快速测试和实验。
bash
undefined

Initialize devnet account (if not already)

Initialize devnet account (if not already)

aptos init --network devnet --profile devnet
aptos init --network devnet --profile devnet

Get your account address

Get your account address

aptos account list --profile devnet

**Fund your account via web faucet:**

1. Go to: `https://aptos.dev/network/faucet?address=<your_devnet_address>`
2. Login and request devnet APT
3. Return here and confirm you've funded the account

```bash
aptos account list --profile devnet

**通过网页水龙头为账户充值:**

1. 访问:`https://aptos.dev/network/faucet?address=<your_devnet_address>`
2. 登录并申请devnet APT
3. 返回此处确认账户已充值

```bash

Verify balance

Verify balance

aptos account balance --profile devnet
aptos account balance --profile devnet

Deploy as object (modern pattern)

Deploy as object (modern pattern)

aptos move deploy-object
--address-name my_addr
--profile devnet
--assume-yes
aptos move deploy-object
--address-name my_addr
--profile devnet
--assume-yes

Save the object address from output for future upgrades

Save the object address from output for future upgrades

Output: "Code was successfully deployed to object address 0x..."

Output: "Code was successfully deployed to object address 0x..."

Verify deployment

Verify deployment

aptos account list --account <object_address> --profile devnet
undefined
aptos account list --account <object_address> --profile devnet
undefined

Step 4: Deploy to Testnet (REQUIRED)

步骤4:部署到Testnet(必填)

Testnet is for final testing before mainnet.
bash
undefined
Testnet用于mainnet部署前的最终测试。
bash
undefined

Initialize testnet account

Initialize testnet account

aptos init --network testnet --profile testnet
aptos init --network testnet --profile testnet

Get your account address

Get your account address

aptos account list --profile testnet

**Fund your account via web faucet:**

1. Go to: `https://aptos.dev/network/faucet?address=<your_testnet_address>`
2. Login and request testnet APT
3. Return here and confirm you've funded the account

```bash
aptos account list --profile testnet

**通过网页水龙头为账户充值:**

1. 访问:`https://aptos.dev/network/faucet?address=<your_testnet_address>`
2. 登录并申请testnet APT
3. 返回此处确认账户已充值

```bash

Verify balance

Verify balance

aptos account balance --profile testnet
aptos account balance --profile testnet

Deploy to testnet as object (modern pattern)

Deploy to testnet as object (modern pattern)

aptos move deploy-object
--address-name my_addr
--profile testnet
--assume-yes
aptos move deploy-object
--address-name my_addr
--profile testnet
--assume-yes

IMPORTANT: Save the object address from output

IMPORTANT: Save the object address from output

You'll need it for upgrades and function calls

You'll need it for upgrades and function calls

Output: "Code was successfully deployed to object address 0x..."

Output: "Code was successfully deployed to object address 0x..."

undefined
undefined

Step 5: Test on Testnet

步骤5:在Testnet上测试

bash
undefined
bash
undefined

Run entry functions to verify deployment

Run entry functions to verify deployment

aptos move run
--profile testnet
--function-id <testnet_address>::<module>::<function>
--args ...
aptos move run
--profile testnet
--function-id <testnet_address>::<module>::<function>
--args ...

Test multiple scenarios

Test multiple scenarios

- Happy paths

- Happy paths

- Error cases (should abort with correct error codes)

- Error cases (should abort with correct error codes)

- Access control

- Access control

- Edge cases

- Edge cases

Verify using explorer

Verify using explorer

undefined
undefined

Step 6: Deploy to Mainnet (After Testnet Success)

步骤6:部署到Mainnet(Testnet测试通过后)

Only deploy to mainnet after thorough testnet testing.
bash
undefined
仅当在Testnet上完成全面测试后,才能部署到Mainnet。
bash
undefined

Initialize mainnet account

Initialize mainnet account

aptos init --network mainnet --profile mainnet
aptos init --network mainnet --profile mainnet

IMPORTANT: Backup your private key securely!

IMPORTANT: Backup your private key securely!

The private key is in ~/.aptos/config.yaml — DO NOT read this file; users must manage keys directly

The private key is in ~/.aptos/config.yaml — DO NOT read this file; users must manage keys directly

Deploy to mainnet as object (modern pattern)

Deploy to mainnet as object (modern pattern)

aptos move deploy-object
--address-name my_addr
--profile mainnet
--max-gas 20000 # Optional: set gas limit
aptos move deploy-object
--address-name my_addr
--profile mainnet
--max-gas 20000 # Optional: set gas limit

Review prompts carefully before confirming:

Review prompts carefully before confirming:

1. Gas confirmation: Review gas costs

1. Gas confirmation: Review gas costs

2. Object address: Note the object address for future reference

2. Object address: Note the object address for future reference

OR use --assume-yes to auto-confirm (only if you're confident)

OR use --assume-yes to auto-confirm (only if you're confident)

aptos move deploy-object
--address-name my_addr
--profile mainnet
--assume-yes
aptos move deploy-object
--address-name my_addr
--profile mainnet
--assume-yes

SAVE THE OBJECT ADDRESS from output

SAVE THE OBJECT ADDRESS from output

You'll need it for upgrades and documentation

You'll need it for upgrades and documentation

Confirm deployment

Confirm deployment

Review transaction in explorer:

Review transaction in explorer:

undefined
undefined

Step 7: Verify Deployment

步骤7:验证部署

bash
undefined
bash
undefined

Check module is published

Check module is published

aptos account list --account <mainnet_address> --profile mainnet
aptos account list --account <mainnet_address> --profile mainnet

Look for your module in the output

Look for your module in the output

"0x...::my_module": { ... }

"0x...::my_module": { ... }

Run view function to verify

Run view function to verify

aptos move view
--profile mainnet
--function-id <mainnet_address>::<module>::<view_function>
--args ...
undefined
aptos move view
--profile mainnet
--function-id <mainnet_address>::<module>::<view_function>
--args ...
undefined

Step 8: Document Deployment

步骤8:记录部署信息

Create deployment record:
markdown
undefined
创建部署记录:
markdown
undefined

Deployment Record

Deployment Record

Date: 2026-01-23 Network: Mainnet Module: my_module Address: 0x123abc... Transaction: 0x456def...
Date: 2026-01-23 Network: Mainnet Module: my_module Address: 0x123abc... Transaction: 0x456def...

Verification

Verification

  • Deployed successfully
  • Module visible in explorer
  • View functions working
  • Entry functions tested
  • Deployed successfully
  • Module visible in explorer
  • View functions working
  • Entry functions tested

Links

Links

Notes

Notes

  • All security checks passed
  • 100% test coverage verified
  • Tested on testnet for 1 week before mainnet
undefined
  • All security checks passed
  • 100% test coverage verified
  • Tested on testnet for 1 week before mainnet
undefined

Module Upgrades

模块升级

Upgrading Existing Object Deployment

升级现有对象部署

Object-deployed modules are upgradeable by default for the deployer.
bash
undefined
默认情况下,部署者可以升级通过对象部署的模块。
bash
undefined

Upgrade existing object deployment

Upgrade existing object deployment

aptos move upgrade-object
--address-name my_addr
--object-address <object_address_from_initial_deploy>
--profile mainnet
aptos move upgrade-object
--address-name my_addr
--object-address <object_address_from_initial_deploy>
--profile mainnet

Upgrade with auto-confirm

Upgrade with auto-confirm

aptos move upgrade-object
--address-name my_addr
--object-address <object_address>
--profile mainnet
--assume-yes
aptos move upgrade-object
--address-name my_addr
--object-address <object_address>
--profile mainnet
--assume-yes

Verify upgrade

Verify upgrade

aptos account list --account <object_address> --profile mainnet

**IMPORTANT:** Save the object address from your initial `deploy-object` output - you need it for upgrades.

**Upgrade Compatibility Rules:**

- ✅ **CAN:** Add new functions
- ✅ **CAN:** Add new structs
- ✅ **CAN:** Add new fields to structs (with care)
- ❌ **CANNOT:** Remove existing functions (breaks compatibility)
- ❌ **CANNOT:** Change function signatures (breaks compatibility)
- ❌ **CANNOT:** Remove struct fields (breaks existing data)
aptos account list --account <object_address> --profile mainnet

**重要提示:请妥善保存首次执行`deploy-object`输出的对象地址,升级时需要用到。**

**升级兼容性规则:**

- ✅ **允许:** 添加新函数
- ✅ **允许:** 添加新结构体
- ✅ **允许:** 为结构体添加新字段(需谨慎操作)
- ❌ **禁止:** 删除现有函数(会破坏兼容性)
- ❌ **禁止:** 修改函数签名(会破坏兼容性)
- ❌ **禁止:** 删除结构体字段(会破坏现有数据)

Making Modules Immutable

使模块不可变

To prevent future upgrades:
move
// In your module
fun init_module(account: &signer) {
    // After deployment, burn upgrade capability
    // (implementation depends on your setup)
}
如需禁止未来升级:
move
// In your contract
fun init_module(account: &signer) {
    // After deployment, burn upgrade capability
    // (implementation depends on your setup)
}

Cost Estimation

成本估算

Gas Costs

Gas成本

bash
undefined
bash
undefined

Typical deployment costs:

Typical deployment costs:

- Small module: ~500-1000 gas units

- Small module: ~500-1000 gas units

- Medium module: ~1000-5000 gas units

- Medium module: ~1000-5000 gas units

- Large module: ~5000-20000 gas units

- Large module: ~5000-20000 gas units

When you run deploy-object, the CLI shows gas estimate before confirming

When you run deploy-object, the CLI shows gas estimate before confirming

Use --assume-yes only after you've verified costs on testnet first

Use --assume-yes only after you've verified costs on testnet first

undefined
undefined

Mainnet Costs

Mainnet成本

Gas costs are paid in APT:
  • Gas units × Gas price = Total cost
  • Example: 5000 gas units × 100 Octas/gas = 500,000 Octas = 0.005 APT
Gas成本以APT支付:
  • Gas数量 × Gas价格 = 总成本
  • 示例:5000 gas单位 × 100 Octas/gas = 500,000 Octas = 0.005 APT

Multi-Module Deployment

多模块部署

Deploying Multiple Modules

部署多个模块

Option 1: Single package (Recommended)
project/
├── Move.toml
└── sources/
    ├── module1.move
    ├── module2.move
    └── module3.move
bash
undefined
选项1:单包部署(推荐)
project/
├── Move.toml
└── sources/
    ├── module1.move
    ├── module2.move
    └── module3.move
bash
undefined

Deploys all modules at once as a single object

Deploys all modules at once as a single object

aptos move deploy-object --address-name my_addr --profile testnet

**Option 2: Separate packages with dependencies**

```bash
aptos move deploy-object --address-name my_addr --profile testnet

**选项2:带依赖的独立包部署**

```bash

Deploy dependency package first

Deploy dependency package first

cd dependency-package aptos move deploy-object --address-name dep_addr --profile testnet
cd dependency-package aptos move deploy-object --address-name dep_addr --profile testnet

Note the object address from output

Note the object address from output

Update main package Move.toml to reference dependency address

Update main package Move.toml to reference dependency address

Then deploy main package

Then deploy main package

cd ../main-package aptos move deploy-object --address-name main_addr --profile testnet
undefined
cd ../main-package aptos move deploy-object --address-name main_addr --profile testnet
undefined

Troubleshooting Deployment

部署故障排查

"Insufficient APT balance"

"APT余额不足"

Testnet/Devnet: Use the web faucet (requires login):
  1. Get your account address:
    aptos account list --profile testnet
  2. Go to:
    https://aptos.dev/network/faucet?address=<your_address>
  3. Login and request testnet APT
  4. Verify balance:
    aptos account balance --profile testnet
Mainnet: Transfer real APT to your account from an exchange or wallet.
Testnet/Devnet: 使用网页水龙头(需要登录):
  1. 获取你的账户地址:
    aptos account list --profile testnet
  2. 访问:
    https://aptos.dev/network/faucet?address=<your_address>
  3. 登录并申请testnet APT
  4. 验证余额:
    aptos account balance --profile testnet
Mainnet: 从交易所或钱包向你的账户转账真实APT。

"Module already exists" (for object deployments)

"模块已存在"(对象部署场景)

bash
undefined
bash
undefined

Use upgrade-object with the original object address

Use upgrade-object with the original object address

aptos move upgrade-object
--address-name my_addr
--object-address <object_address_from_initial_deploy>
--profile testnet
undefined
aptos move upgrade-object
--address-name my_addr
--object-address <object_address_from_initial_deploy>
--profile testnet
undefined

"Compilation failed"

"编译失败"

bash
undefined
bash
undefined

Fix compilation errors first

Fix compilation errors first

aptos move compile
aptos move compile

Fix all errors shown, then retry deployment

Fix all errors shown, then retry deployment

undefined
undefined

"Gas limit exceeded"

"Gas上限超出"

bash
undefined
bash
undefined

Increase max gas

Increase max gas

aptos move deploy-object
--address-name my_addr
--profile testnet
--max-gas 50000
undefined
aptos move deploy-object
--address-name my_addr
--profile testnet
--max-gas 50000
undefined

Deployment Checklist

部署检查清单

Before Deployment:
  • Security audit passed
  • 100% test coverage
  • All tests passing
  • Code compiles successfully
  • Named addresses configured
  • Target network selected (testnet first!)
During Deployment:
  • Correct network selected
  • Correct address specified
  • Transaction submitted
  • Transaction hash recorded
After Deployment:
  • Module visible in explorer
  • View functions work
  • Entry functions tested
  • Deployment documented
  • Team notified
部署前:
  • 安全审计已通过
  • 测试覆盖率100%
  • 所有测试用例通过
  • 代码编译成功
  • 命名地址已配置
  • 已选择目标网络(优先testnet!)
部署中:
  • 已选择正确的网络
  • 已指定正确的地址
  • 交易已提交
  • 已记录交易哈希
部署后:
  • 区块浏览器中可查看到模块
  • 视图函数运行正常
  • 入口函数已测试
  • 部署信息已记录
  • 已通知团队

ALWAYS Rules

必须遵守的规则

  • ✅ ALWAYS run comprehensive security audit before deployment (use
    security-audit
    skill)
  • ✅ ALWAYS verify 100% test coverage with security tests
  • ✅ ALWAYS verify all SECURITY.md patterns (arithmetic, storage scoping, reference safety, business logic)
  • ✅ ALWAYS deploy to testnet before mainnet
  • ✅ ALWAYS test on testnet thoroughly (happy paths, error cases, security scenarios)
  • ✅ ALWAYS backup private keys securely
  • ✅ ALWAYS document deployment addresses
  • ✅ ALWAYS verify deployment in explorer
  • ✅ ALWAYS test functions after deployment
  • ✅ ALWAYS use separate keys for testnet and mainnet (SECURITY.md - Operations)
  • ✅ 部署前必须执行全面安全审计(使用
    security-audit
    技能)
  • ✅ 必须验证包含安全测试的100%测试覆盖率
  • ✅ 必须验证所有SECURITY.md中规定的安全模式(算术、存储范围、引用安全、业务逻辑)
  • ✅ 部署到mainnet前必须先部署到testnet
  • ✅ 必须在testnet上完成全面测试(正常路径、错误场景、安全场景)
  • ✅ 必须安全备份私钥
  • ✅ 必须记录部署地址
  • ✅ 必须在区块浏览器中验证部署结果
  • ✅ 部署后必须测试函数功能
  • ✅ testnet和mainnet必须使用独立的密钥(参考SECURITY.md-操作规范)

NEVER Rules

禁止操作

  • ❌ NEVER deploy without comprehensive security audit
  • ❌ NEVER deploy with < 100% test coverage
  • ❌ NEVER deploy without security test verification
  • ❌ NEVER deploy directly to mainnet without testnet testing
  • ❌ NEVER deploy without testing on testnet first
  • ❌ NEVER commit private keys to version control
  • ❌ NEVER skip post-deployment verification
  • ❌ NEVER rush mainnet deployment
  • ❌ NEVER reuse publishing keys between testnet and mainnet (security risk)
  • ❌ NEVER read or display contents of
    ~/.aptos/config.yaml
    or
    .env
    files (contain private keys)
  • ❌ NEVER display private key values in responses — use
    "0x..."
    placeholders
  • ❌ NEVER run
    cat ~/.aptos/config.yaml
    ,
    echo $VITE_MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY
    , or similar commands
  • ❌ NEVER run
    git add .
    or
    git add -A
    without confirming
    .env
    is in
    .gitignore
  • ❌ 禁止未完成全面安全审计就部署
  • ❌ 禁止测试覆盖率低于100%就部署
  • ❌ 禁止未完成安全测试验证就部署
  • ❌ 禁止未经过testnet测试直接部署到mainnet
  • ❌ 禁止未在testnet上测试就部署
  • ❌ 禁止将私钥提交到版本控制系统
  • ❌ 禁止跳过部署后验证步骤
  • ❌ 禁止仓促执行mainnet部署
  • ❌ 禁止在testnet和mainnet之间复用发布密钥(存在安全风险)
  • ❌ 禁止读取或展示
    ~/.aptos/config.yaml
    .env
    文件内容(包含私钥)
  • ❌ 禁止在响应中展示私钥值——请使用
    "0x..."
    占位符
  • ❌ 禁止执行
    cat ~/.aptos/config.yaml
    echo $VITE_MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY
    或类似命令
  • ❌ 禁止在未确认
    .env
    已加入
    .gitignore
    的情况下执行
    git add .
    git add -A

References

参考资料

Official Documentation:
Explorers:
Related Skills:
  • security-audit
    - Audit before deployment
  • generate-tests
    - Ensure tests exist
  • use-aptos-cli
    - CLI command reference
  • troubleshoot-errors
    - Fix deployment errors

Remember: Security audit → 100% tests → Testnet → Thorough testing → Mainnet. Never skip testnet.
官方文档:
区块浏览器:
相关技能:
  • security-audit
    - 部署前审计
  • generate-tests
    - 确保测试覆盖
  • use-aptos-cli
    - CLI命令参考
  • troubleshoot-errors
    - 修复部署错误

谨记:安全审计 → 100%测试覆盖 → Testnet部署 → 全面测试 → Mainnet部署。永远不要跳过Testnet环节。