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
use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("address must begin with 0x")]
BadAddressPrefix,
#[error(transparent)]
TryFromSlice(#[from] std::array::TryFromSliceError),
#[cfg(feature = "ethereum")]
#[error(transparent)]
Ecdsa(#[from] k256::ecdsa::Error),
#[cfg(feature = "ethereum")]
#[error(transparent)]
Elliptic(#[from] k256::elliptic_curve::Error),
#[cfg(feature = "ethereum")]
#[error(transparent)]
Hex(#[from] hex::FromHexError),
}