1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! FuelVM implementation

#![warn(missing_docs)]

pub mod backtrace;
pub mod call;
pub mod consts;
pub mod context;
pub mod crypto;
pub mod error;
pub mod gas;
pub mod interpreter;
pub mod memory_client;
pub mod predicate;
pub mod state;
pub mod storage;
pub mod transactor;
pub mod util;

#[cfg(feature = "profile-any")]
pub mod profiler;

// Fully re-export fuel dependencies
#[doc(no_inline)]
pub use fuel_asm;
#[doc(no_inline)]
pub use fuel_crypto;
#[doc(no_inline)]
pub use fuel_merkle;
#[doc(no_inline)]
pub use fuel_storage;
#[doc(no_inline)]
pub use fuel_tx;
#[doc(no_inline)]
pub use fuel_types;

pub mod prelude {
    //! Required implementations for full functionality
    #[doc(no_inline)]
    pub use fuel_asm::{GMArgs, GTFArgs, Instruction, InstructionResult, Opcode, OpcodeRepr, PanicReason};
    #[doc(no_inline)]
    pub use fuel_crypto::{Hasher, Message, PublicKey, SecretKey, Signature};
    #[doc(no_inline)]
    pub use fuel_storage::{MerkleRoot, MerkleStorage, Storage};
    #[doc(no_inline)]
    pub use fuel_tx::{
        CheckedTransaction, ConsensusParameters, Contract, Input, InputRepr, Output, OutputRepr, Receipt,
        ScriptExecutionResult, Transaction, TransactionFee, TransactionRepr, TxPointer, UtxoId, ValidationError,
        Witness,
    };
    #[doc(no_inline)]
    pub use fuel_types::{
        bytes::{Deserializable, SerializableVec, SizedBytes},
        Address, AssetId, Bytes32, Bytes4, Bytes64, Bytes8, ContractId, Immediate06, Immediate12, Immediate18,
        Immediate24, RegisterId, Salt, Word,
    };

    pub use crate::backtrace::Backtrace;
    pub use crate::call::{Call, CallFrame};
    pub use crate::context::Context;
    pub use crate::error::{Bug, BugId, BugVariant, Infallible, InterpreterError, RuntimeError};
    pub use crate::interpreter::{Interpreter, MemoryRange};
    pub use crate::memory_client::MemoryClient;
    pub use crate::predicate::RuntimePredicate;
    pub use crate::state::{Debugger, ProgramState, StateTransition, StateTransitionRef};
    pub use crate::storage::{InterpreterStorage, MemoryStorage, PredicateStorage};
    pub use crate::transactor::Transactor;

    #[cfg(feature = "debug")]
    pub use crate::state::{Breakpoint, DebugEval};

    #[cfg(any(test, feature = "test-helpers"))]
    pub use crate::util::test_helpers::TestBuilder;

    #[cfg(all(feature = "profile-gas", any(test, feature = "test-helpers")))]
    pub use crate::util::gas_profiling::GasProfiler;

    #[cfg(feature = "profile-any")]
    pub use crate::profiler::{
        CoverageProfilingData, GasProfilingData, InstructionLocation, PerLocationIter, PerLocationKeys,
        PerLocationValues, ProfileReceiver, Profiler, ProfilingData, StderrReceiver,
    };
}