1mod call_handler;
2mod contract_call;
3pub mod receipt_parser;
4mod script_call;
5pub mod traits;
6pub mod utils;
7
8pub use call_handler::*;
9pub use contract_call::*;
10use fuel_types::BlockHeight;
11pub use script_call::*;
12
13#[derive(Debug, Clone)]
15pub struct Execution {
16 execution_type: ExecutionType,
17 at_height: Option<BlockHeight>,
18}
19
20impl Execution {
21 pub fn realistic() -> Self {
24 Self {
25 execution_type: ExecutionType::Realistic,
26 at_height: None,
27 }
28 }
29 pub fn state_read_only() -> Self {
32 Self {
33 execution_type: ExecutionType::StateReadOnly,
34 at_height: None,
35 }
36 }
37
38 pub fn at_height(mut self, height: impl Into<BlockHeight>) -> Self {
41 self.at_height = Some(height.into());
42 self
43 }
44}
45
46impl Default for Execution {
47 fn default() -> Self {
48 Self::realistic()
49 }
50}
51
52#[derive(Debug, Clone)]
53pub(crate) enum ExecutionType {
54 Realistic,
55 StateReadOnly,
56}