diff --git a/runtime/pangolin/src/lib.rs b/runtime/pangolin/src/lib.rs index 8dfa46d6..b74f68d6 100644 --- a/runtime/pangolin/src/lib.rs +++ b/runtime/pangolin/src/lib.rs @@ -89,6 +89,7 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, + pallet_assets::migration::v1::MigrateToV1, >; /// Darwinia proposal base fee. diff --git a/tool/state-processor/src/system/mod.rs b/tool/state-processor/src/system/mod.rs index 64fe8b15..b74824c0 100644 --- a/tool/state-processor/src/system/mod.rs +++ b/tool/state-processor/src/system/mod.rs @@ -96,7 +96,7 @@ where sufficients: Default::default(), accounts: Default::default(), approvals: Default::default(), - is_frozen: false, + status: Default::default(), }; log::info!("increase `EVM::AccountCodes`'s `sufficients` and set `Assets::Account`, `System::Account`, `AccountMigration::KtonAccounts` and `AccountMigration::Accounts`"); diff --git a/tool/state-processor/src/tests.rs b/tool/state-processor/src/tests.rs index 075b4b3a..52cfa243 100644 --- a/tool/state-processor/src/tests.rs +++ b/tool/state-processor/src/tests.rs @@ -359,10 +359,15 @@ fn asset_creation() { &blake2_128_concat_to_string(KTON_ID.encode()), &mut details, ); - assert!(details.accounts > 0); + assert_eq!(details.owner, ROOT); assert!(details.supply != 0); + assert_eq!(details.deposit, 0); assert_eq!(details.min_balance, 1); + assert_eq!(details.is_sufficient, true); assert_eq!(details.sufficients, details.accounts); + assert!(details.accounts > 0); + assert_eq!(details.approvals, 0); + assert_eq!(details.status, AssetStatus::Live); }); } diff --git a/tool/state-processor/src/type_registry.rs b/tool/state-processor/src/type_registry.rs index b0517ebb..8bba8a9a 100644 --- a/tool/state-processor/src/type_registry.rs +++ b/tool/state-processor/src/type_registry.rs @@ -62,7 +62,20 @@ pub struct AssetDetails { pub accounts: u32, pub sufficients: u32, pub approvals: u32, - pub is_frozen: bool, + pub status: AssetStatus, +} + +// https://github.com/paritytech/substrate/blob/polkadot-v0.9.36/frame/assets/src/types.rs#L35 +#[derive(Debug, Encode, Decode, PartialEq)] +pub enum AssetStatus { + Live, + Frozen, + Destroying, +} +impl Default for AssetStatus { + fn default() -> Self { + AssetStatus::Live + } } // https://github.dev/paritytech/substrate/blob/polkadot-v0.9.30/frame/assets/src/types.rs#L115