use super::RevertToSlot;
use bytecode::Bytecode;
use primitives::{Address, StorageKey, StorageValue, B256};
use state::AccountInfo;
use std::vec::Vec;
#[derive(Clone, Debug, Default)]
pub struct StateChangeset {
pub accounts: Vec<(Address, Option<AccountInfo>)>,
pub storage: Vec<PlainStorageChangeset>,
pub contracts: Vec<(B256, Bytecode)>,
}
#[derive(Clone, Debug, PartialEq, Eq, Default)]
pub struct PlainStorageChangeset {
pub address: Address,
pub wipe_storage: bool,
pub storage: Vec<(StorageKey, StorageValue)>,
}
#[derive(Clone, Debug, PartialEq, Eq, Default)]
pub struct PlainStorageRevert {
pub address: Address,
pub wiped: bool,
pub storage_revert: Vec<(StorageKey, RevertToSlot)>,
}
#[derive(Clone, Debug, Default)]
pub struct PlainStateReverts {
pub accounts: Vec<Vec<(Address, Option<AccountInfo>)>>,
pub storage: Vec<Vec<PlainStorageRevert>>,
}
impl PlainStateReverts {
pub fn with_capacity(capacity: usize) -> Self {
Self {
accounts: Vec::with_capacity(capacity),
storage: Vec::with_capacity(capacity),
}
}
}
pub type StorageRevert = Vec<Vec<(Address, bool, Vec<(StorageKey, RevertToSlot)>)>>;