openzeppelin_relayer/domain/relayer/solana/rpc/
mod.rs1mod methods;
4pub use methods::*;
5
6mod handler;
7pub use handler::*;
8
9use log::error;
10use thiserror::Error;
11
12use crate::{
13 models::{SignerError, SolanaEncodingError},
14 services::SolanaProviderError,
15};
16
17use super::TokenError;
18
19#[derive(Debug, Error)]
20#[allow(dead_code)]
21pub enum SolanaRpcError {
22 #[error("Unsupported method: {0}")]
23 UnsupportedMethod(String),
24 #[error("BadRequest: {0}")]
25 BadRequest(String),
26 #[error("Feature fetch error: {0}")]
27 FeatureFetch(String),
28 #[error("Invalid params: {0}")]
29 InvalidParams(String),
30 #[error("Unsupported Fee token error: {0}")]
31 UnsupportedFeeToken(String),
32 #[error("Estimation Error: {0}")]
33 Estimation(String),
34 #[error("Insufficient funds: {0}")]
35 InsufficientFunds(String),
36 #[error("Transaction preparation error: {0}")]
37 TransactionPreparation(String),
38 #[error("Preparation error: {0}")]
39 Preparation(String),
40 #[error("Signature error: {0}")]
41 Signature(String),
42 #[error("Token fetch error: {0}")]
43 TokenFetch(String),
44 #[error("Token Account error: {0}")]
45 TokenAccount(String),
46 #[error("Send error: {0}")]
47 Send(String),
48 #[error("Transaction validation error: {0}")]
49 SolanaTransactionValidation(#[from] SolanaTransactionValidationError),
50 #[error("Signing error: {0}")]
51 Signing(#[from] SignerError),
52 #[error("Encoding error: {0}")]
53 Encoding(#[from] SolanaEncodingError),
54 #[error("Provider error: {0}")]
55 Provider(#[from] SolanaProviderError),
56 #[error("Token error: {0}")]
57 Token(#[from] TokenError),
58 #[error("Internal error: {0}")]
59 Internal(String),
60}