forked from matter-labs/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.rs
46 lines (38 loc) · 1.31 KB
/
error.rs
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pub use jsonrpc_core::types::response::Failure as RpcFailure;
use thiserror::Error;
use zksync_eth_signer::error::SignerError;
#[derive(Debug, Error, PartialEq)]
pub enum ClientError {
#[error("Network '{0}' is not supported")]
NetworkNotSupported(String),
#[error("Unable to decode server response: {0}")]
MalformedResponse(String),
#[error("RPC error: {0:?}")]
RpcError(RpcFailure),
#[error("Network error: {0}")]
NetworkError(String),
#[error("Provided account credentials are incorrect")]
IncorrectCredentials,
#[error("Seed too short, must be at least 32 bytes long")]
SeedTooShort,
#[error("Token is not supported by zkSync")]
UnknownToken,
#[error("Incorrect address")]
IncorrectAddress,
#[error("Operation timeout")]
OperationTimeout,
#[error("Polling interval is too small")]
PollingIntervalIsTooSmall,
#[error("Signing error: {0}")]
SigningError(SignerError),
#[error("Missing required field for a transaction: {0}")]
MissingRequiredField(String),
#[error("Ethereum private key was not provided for this wallet")]
NoEthereumPrivateKey,
#[error("Provided value is not packable")]
NotPackableValue,
#[error("Provided function arguments are incorrect")]
IncorrectInput,
#[error("Other")]
Other,
}