revm_statetest_types/
test.rs

1use revm::primitives::{Address, Bytes, HashMap, B256};
2use serde::Deserialize;
3
4use crate::{transaction::TxPartIndices, AccountInfo};
5
6/// State test indexed state result deserialization.
7#[derive(Debug, PartialEq, Eq, Deserialize)]
8#[serde(rename_all = "camelCase", deny_unknown_fields)]
9pub struct Test {
10    /// Expected exception for this test case, if any.
11    ///
12    /// This field contains an optional string describing an expected error or exception
13    /// that should occur during the execution of this state test. If present, the test
14    /// is expected to fail with this specific error message or exception type.
15    pub expect_exception: Option<String>,
16
17    /// Indexes
18    pub indexes: TxPartIndices,
19    /// Post state hash
20    pub hash: B256,
21    /// Post state
22    #[serde(default)]
23    pub post_state: HashMap<Address, AccountInfo>,
24
25    /// Logs root
26    pub logs: B256,
27
28    /// Output state.
29    ///
30    /// Note: Not used.
31    #[serde(default)]
32    state: HashMap<Address, AccountInfo>,
33
34    /// Tx bytes
35    pub txbytes: Option<Bytes>,
36}