-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8be3a1f
commit ff9689c
Showing
6 changed files
with
48 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,41 @@ | ||
use thiserror::Error; | ||
use url::ParseError; | ||
use ethers::contract::ContractError; | ||
use ethers::middleware::signer::SignerMiddlewareError; | ||
use ethers::providers::ProviderError; | ||
use ethers::providers::{Http, Provider}; | ||
use rustc_hex::FromHexError; | ||
use ethers::middleware::signer::SignerMiddlewareError; | ||
use ethers::signers::Ledger; | ||
|
||
use rustc_hex::FromHexError; | ||
use thiserror::Error; | ||
use url::ParseError; | ||
|
||
/// RainOrderbookError | ||
/// Enum representing errors thrown by the crate | ||
#[derive(Error, Debug)] | ||
pub enum RainOrderbookError{ | ||
#[derive(Error, Debug)] | ||
pub enum RainOrderbookError { | ||
#[error("Invalid RPC URL")] | ||
InvalidRPC{ | ||
InvalidRPC { | ||
#[from] | ||
source: ParseError | ||
source: ParseError, | ||
}, | ||
#[error("Invalid Contract Function Call")] | ||
InvalidContractFunctionCall{ | ||
InvalidContractFunctionCall { | ||
#[from] | ||
source: ContractError<Provider<Http>> | ||
source: ContractError<Provider<Http>>, | ||
}, | ||
#[error("Invalid Address")] | ||
InvalidAddress{ | ||
InvalidAddress { | ||
#[from] | ||
source: FromHexError | ||
source: FromHexError, | ||
}, | ||
#[error("Failed to confirm transaction")] | ||
TransactionConfirmationError{ | ||
TransactionConfirmationError { | ||
#[from] | ||
source: ProviderError | ||
source: ProviderError, | ||
}, | ||
#[error("Error in Transaction")] | ||
TransactionError{ | ||
TransactionError { | ||
#[from] | ||
source: SignerMiddlewareError<Provider<Http>, Ledger> | ||
source: SignerMiddlewareError<Provider<Http>, Ledger>, | ||
}, | ||
#[error("Failed to fetch Transaction Receipt")] | ||
TransactionReceiptError, | ||
|
||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
pub mod errors; | ||
pub mod gasoracle; | ||
pub mod interpreter; | ||
pub mod orderbook; | ||
pub mod registry; | ||
pub mod transaction; | ||
pub mod errors; |
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