openzeppelin_relayer::domain

Trait SolanaRelayerTrait

Source
pub trait SolanaRelayerTrait {
    // Required methods
    fn get_balance<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rpc<'life0, 'async_trait>(
        &'life0 self,
        request: JsonRpcRequest<NetworkRpcRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse<NetworkRpcResult>, RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn initialize_relayer<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validate_min_balance<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Solana Relayer Trait Subset of methods for Solana relayer

Required Methods§

Source

fn get_balance<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, RelayerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves the current balance of the relayer.

§Returns

A Result containing a BalanceResponse on success, or a RelayerError on failure.

Source

fn rpc<'life0, 'async_trait>( &'life0 self, request: JsonRpcRequest<NetworkRpcRequest>, ) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse<NetworkRpcResult>, RelayerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Executes a JSON-RPC request.

§Arguments
  • request - The JSON-RPC request to be executed.
§Returns

A Result containing a JsonRpcResponse on success, or a RelayerError on failure.

Source

fn initialize_relayer<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Initializes the relayer.

§Returns

A Result indicating success, or a RelayerError on failure.

Source

fn validate_min_balance<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), RelayerError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Validates that the relayer’s balance meets the minimum required.

§Returns

A Result indicating success, or a RelayerError on failure.

Implementors§