diff --git a/precompile/staking/src/lib.rs b/precompile/staking/src/lib.rs index 8476f4ea3..6d70e1624 100644 --- a/precompile/staking/src/lib.rs +++ b/precompile/staking/src/lib.rs @@ -50,14 +50,14 @@ where ::RuntimeOrigin: From>, ::AccountId: From, <::RuntimeCall as Dispatchable>::RuntimeOrigin: OriginTrait, - <::Deposit as Stake>::Item: From, + <::Deposit as Stake>::Item: From, { #[precompile::public("stake(uint256,uint256,uint8[])")] fn stake( handle: &mut impl PrecompileHandle, ring_amount: U256, kton_amount: U256, - deposits: Vec, + deposits: Vec, ) -> EvmResult { let origin = handle.context().caller.into(); let deposits = deposits.into_iter().map(|i| i.into()).collect(); @@ -79,7 +79,7 @@ where handle: &mut impl PrecompileHandle, ring_amount: U256, kton_amount: U256, - deposits: Vec, + deposits: Vec, ) -> EvmResult { let origin = handle.context().caller.into(); let deposits = deposits.into_iter().map(|i| i.into()).collect(); diff --git a/tool/state-processor/src/staking/mod.rs b/tool/state-processor/src/staking/mod.rs index 672e1983f..bf2a09968 100644 --- a/tool/state-processor/src/staking/mod.rs +++ b/tool/state-processor/src/staking/mod.rs @@ -15,7 +15,9 @@ impl Processor { log::info!("take solo `Staking::Bonded`, `Staking::Ledger`, `Staking::RingPool`, `Staking::KtonPool` and `Staking::LivingTime`"); self.solo_state - .take_raw_map(&item_key(b"Staking", b"Bonded"), &mut bonded, get_identity_key) + .take_raw_map(&item_key(b"Staking", b"Bonded"), &mut bonded, |key, from| { + replace_first_match(key, from, &item_key(b"AccountMigration", b"Bonded")) + }) .take_map(b"Staking", b"Ledger", &mut ledgers, get_identity_key) .take_value(b"Staking", b"RingPool", "", &mut ring_pool_storage) .take_value(b"Staking", b"KtonPool", "", &mut kton_pool_storage) diff --git a/tool/state-processor/src/type_registry.rs b/tool/state-processor/src/type_registry.rs index ef2170053..9f0b7b6ee 100644 --- a/tool/state-processor/src/type_registry.rs +++ b/tool/state-processor/src/type_registry.rs @@ -91,8 +91,8 @@ pub struct Unbonding { pub struct Ledger { pub staked_ring: u128, pub staked_kton: u128, - pub staked_deposits: Vec, + pub staked_deposits: Vec, pub unstaking_ring: Vec<(u128, u32)>, pub unstaking_kton: Vec<(u128, u32)>, - pub unstaking_deposits: Vec<(u8, u32)>, + pub unstaking_deposits: Vec<(u16, u32)>, }