From ab4dd52e391053c7c3d3017ef62f773b16fefbdc Mon Sep 17 00:00:00 2001 From: Gregory Hill Date: Tue, 16 Mar 2021 19:14:56 +0000 Subject: [PATCH] fix: redefine account info Signed-off-by: Gregory Hill --- runtime/src/pallets/frame_system.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/runtime/src/pallets/frame_system.rs b/runtime/src/pallets/frame_system.rs index 6082e036e..a2b5da659 100644 --- a/runtime/src/pallets/frame_system.rs +++ b/runtime/src/pallets/frame_system.rs @@ -1,14 +1,24 @@ use super::Core; use core::marker::PhantomData; -use frame_system::AccountInfo; pub use module_bitcoin::types::H256Le; -use parity_scale_codec::Encode; +use parity_scale_codec::{Decode, Encode}; use std::fmt::Debug; use substrate_subxt_proc_macro::{module, Store}; #[module] pub trait System: Core {} +pub type RefCount = u32; + +/// Information of an account. +#[derive(Clone, Debug, Eq, PartialEq, Default, Decode, Encode)] +pub struct AccountInfo { + pub nonce: Index, + pub consumers: RefCount, + pub providers: RefCount, + pub data: AccountData, +} + #[derive(Clone, Debug, Eq, PartialEq, Store, Encode)] pub struct AccountStore { #[store(returns = AccountInfo)]