Skip to content

Commit

Permalink
Convert revert error to string in state dump
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Jan 24, 2025
1 parent 003941f commit 8f63c3e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions replay/src/state_dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ use blockifier::{
cached_state::{CachedState, StateMaps, StorageEntry},
state_api::StateReader,
},
transaction::{
errors::TransactionExecutionError,
objects::{RevertError, TransactionExecutionInfo},
},
transaction::{errors::TransactionExecutionError, objects::TransactionExecutionInfo},
};
use serde::{Deserialize, Serialize};
use serde_with::serde_as;
Expand Down Expand Up @@ -117,7 +114,7 @@ struct SerializableExecutionInfo {
validate_call_info: Option<SerializableCallInfo>,
execute_call_info: Option<SerializableCallInfo>,
fee_transfer_call_info: Option<SerializableCallInfo>,
revert_error: Option<RevertError>,
revert_error: Option<String>,
receipt: TransactionReceipt,
}

Expand All @@ -135,7 +132,7 @@ impl SerializableExecutionInfo {
validate_call_info: validate_call_info.clone().map(From::<CallInfo>::from),
execute_call_info: execute_call_info.clone().map(From::<CallInfo>::from),
fee_transfer_call_info: fee_transfer_call_info.clone().map(From::<CallInfo>::from),
revert_error,
revert_error: revert_error.map(|x| x.to_string()),
receipt,
}
}
Expand Down

0 comments on commit 8f63c3e

Please sign in to comment.