diff --git a/src/domain/eth/mod.rs b/src/domain/eth/mod.rs index dbd4539..29e2c9b 100644 --- a/src/domain/eth/mod.rs +++ b/src/domain/eth/mod.rs @@ -4,7 +4,7 @@ mod chain; pub use { self::chain::ChainId, - ethereum_types::{H160, H256, U256}, + ethereum_types::{H160, U256}, }; /// A contract address. diff --git a/src/domain/mod.rs b/src/domain/mod.rs index 414298a..85cfd70 100644 --- a/src/domain/mod.rs +++ b/src/domain/mod.rs @@ -4,7 +4,6 @@ pub mod auction; pub mod dex; pub mod eth; pub mod liquidity; -pub mod notification; pub mod order; pub mod solution; pub mod solver; diff --git a/src/domain/notification.rs b/src/domain/notification.rs deleted file mode 100644 index a04c554..0000000 --- a/src/domain/notification.rs +++ /dev/null @@ -1,59 +0,0 @@ -use { - super::{ - auction, - eth::{self, Ether, TokenAddress}, - solution::{self}, - }, - std::collections::BTreeSet, -}; - -type RequiredEther = Ether; -type TokensUsed = BTreeSet; -type TransactionHash = eth::H256; -type Transaction = eth::Tx; -type BlockNo = u64; -pub type SimulationSucceededAtLeastOnce = bool; - -/// The notification about important events happened in driver, that solvers -/// need to know about. -#[derive(Debug)] -pub struct Notification { - pub auction_id: auction::Id, - pub solution_id: Option, - pub kind: Kind, -} - -#[derive(Debug, Clone)] -pub enum Id { - Single(solution::Id), - Merged(Vec), -} - -/// All types of notifications solvers can be informed about. -#[derive(Debug)] -pub enum Kind { - Timeout, - EmptySolution, - DuplicatedSolutionId, - SimulationFailed(BlockNo, Transaction, SimulationSucceededAtLeastOnce), - ScoringFailed(ScoreKind), - NonBufferableTokensUsed(TokensUsed), - SolverAccountInsufficientBalance(RequiredEther), - Settled(Settlement), - DriverError(String), - PostprocessingTimedOut, -} - -/// The result of winning solver trying to settle the transaction onchain. -#[derive(Debug)] -pub enum Settlement { - Success(TransactionHash), - Revert(TransactionHash), - SimulationRevert, - Fail, -} - -#[derive(Debug)] -pub enum ScoreKind { - InvalidClearingPrices, -}