-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor error handling and add new error types
- Introduced `ExecutionError` enum to encapsulate different error types, including `TransactionExecutionError` and `CustomError`. - Added `SimulationError` enum to handle specific simulation-related errors such as `OutOfGas` and `ExecutionError`. - Implemented `fmt::Display` and `From` traits for `ExecutionError` and `SimulationError` to provide meaningful error messages and conversions. - Replaced the use of `anyhow::anyhow!` with structured error handling using the new error types. - Updated `execute_transaction` to use the new `ExecutionError` type. - Refactored `is_l2_gas_accounting_enabled`, `get_gas_vector_computation_mode`, `simulate_execution`, `set_l2_gas_limit`, and `extract_l2_gas_limit` functions to handle errors using the new error types.
- Loading branch information
1 parent
840f791
commit 64b55f8
Showing
2 changed files
with
108 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters