NAC_Blockchain/nac-wallet-cli/src/upgrade.rs

15 lines
467 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! 模块升级实现
use nac_upgrade_framework::{
traits::Upgradeable, UpgradeData, UpgradeRecord, Version, Result, UpgradeError,
};
// 注意:需要在主结构体中添加以下字段:
// - version: Version
// - upgrade_history: Vec<UpgradeRecord>
//
// 并实现 do_upgrade 方法来执行实际的升级逻辑
// 使用宏快速实现Upgradeable trait
// nac_upgrade_framework::impl_upgradeable!(YourStruct, "module-name", Version::new(1, 0, 0));