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
use ethers::prelude::{AbiError, ContractError};
use ethers::providers::{JsonRpcClient, Provider, ProviderError};
use ethers::types::H160;
use thiserror::Error;
use tokio::task::JoinError;
use uniswap_v3_math::error::UniswapV3MathError;
#[derive(Error, Debug)]
pub enum CFFMError<P>
where
P: JsonRpcClient,
{
#[error("Provider error")]
ProviderError(#[from] ProviderError),
#[error("Contract error")]
ContractError(#[from] ContractError<Provider<P>>),
#[error("ABI Codec error")]
ABICodecError(#[from] AbiError),
#[error("Eth ABI error")]
EthABIError(#[from] ethers::abi::Error),
#[error("Join error")]
JoinError(#[from] JoinError),
#[error("Uniswap V3 math error")]
UniswapV3MathError(#[from] UniswapV3MathError),
#[error("Pair for token_a/token_b does not exist in provided dexes")]
PairDoesNotExistInDexes(H160, H160),
}