use revm::primitives::{Bytes, HashMap, StorageKey, StorageValue, U256};
use serde::Deserialize;

use crate::deserializer::deserialize_str_as_u64;

/// Account information
#[derive(Clone, Debug, PartialEq, Eq, Deserialize)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct AccountInfo {
    pub balance: U256,
    pub code: Bytes,
    #[serde(deserialize_with = "deserialize_str_as_u64")]
    pub nonce: u64,
    pub storage: HashMap<StorageKey, StorageValue>,
}
