1use thiserror::Error;
2
3pub use yevm_base::{Acc, Int};
4
5pub use crate::call::{Call, Head, Tx};
6pub use crate::evm::Fetch;
7
8pub mod cache;
9pub mod call;
10pub mod chain;
11pub mod eip7702;
12pub mod evm;
13pub mod exe;
14pub mod misc;
15pub mod ops;
16pub mod pre;
17pub mod rpc;
18pub mod state;
19pub mod trace;
20
21#[derive(Error, Debug)]
22pub enum Error {
23 #[error("Undefined chain id")]
24 UndefinedChainId,
25 #[error("Gas too low: have {have} but want {want}")]
26 GasTooLow { have: u64, want: u64 },
27 #[error("Insufficient account funds")]
28 InsufficientFunds,
29 #[error("Sender is not an EOA")]
30 SenderNotEOA,
31 #[error("Max fee per gas less than base fee")]
32 MaxFeeLessThanBaseFee,
33 #[error("Priority fee greater than max fee")]
34 PriorityGreaterThanMaxFee,
35 #[error("Gas limit exceeds block gas limit")]
36 GasAllowanceExceeded,
37 #[error("Gas limit times gas price overflow")]
38 GasLimitPriceProductOverflow,
39 #[error("Error: {0}")]
40 Generic(#[from] eyre::Report),
41}
42
43pub type Result<T> = std::result::Result<T, Error>;