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
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("Std io error: {0}")]
StdIo(#[from] std::io::Error),
#[error("Json error: {0}")]
Json(#[from] serde_json::Error),
#[error("hex error: {0}")]
Hex(#[from] hex::FromHexError),
#[error("parity-scale-codec error: {0}")]
ParityScaleCodec(#[from] codec::Error),
#[error("Call API incompatible with connected chain: {0}")]
IncompatibleCall(String),
#[error("Schema failed to parse: {0}")]
SchemaParseFailed(String),
#[error("RpcClient: {0}")]
RpcClient(String),
#[error("Signing transaction failed: {0}")]
SigningTransactionFailed(String),
#[error("Jsonrpsee error: {0}")]
Jsonrpsee(#[from] jsonrpsee::core::Error),
}
pub type Result<T, E = Error> = std::result::Result<T, E>;