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
#![cfg_attr(not(feature = "std"), no_std)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::try_err)]
// Wrong clippy convention; check
// https://rust-lang.github.io/api-guidelines/naming.html
#![allow(clippy::wrong_self_convention)]

// TODO Add docs

#[cfg(feature = "alloc")]
extern crate alloc;

pub mod consts;

pub use fuel_asm::{InstructionResult, PanicReason};
pub use fuel_types::{
    Address, AssetId, Bytes32, Bytes4, Bytes64, Bytes8, ContractId, MessageId, Salt, Word,
};

#[cfg(feature = "builder")]
mod builder;

#[cfg(feature = "alloc")]
mod contract;

#[cfg(feature = "alloc")]
mod receipt;

#[cfg(feature = "alloc")]
mod transaction;

#[cfg(feature = "std")]
mod checked_transaction;

#[cfg(feature = "builder")]
pub use builder::TransactionBuilder;

#[cfg(feature = "alloc")]
pub use receipt::{Receipt, ScriptExecutionResult};

#[cfg(feature = "alloc")]
pub use transaction::{
    ConsensusParameters, Input, InputRepr, Metadata, Output, OutputRepr, StorageSlot, Transaction,
    TransactionFee, TransactionRepr, TxId, TxPointer, UtxoId, ValidationError, Witness,
};

#[cfg(feature = "alloc")]
#[allow(deprecated)]
pub use transaction::consensus_parameters::default_parameters;

#[cfg(feature = "std")]
pub use checked_transaction::CheckedTransaction;

#[cfg(feature = "alloc")]
pub use contract::Contract;