ChainReadSafeOperations

Trait ChainReadSafeOperations 

Source
pub trait ChainReadSafeOperations {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn safe_allowance<'life0, 'async_trait, C, A>(
        &'life0 self,
        safe_address: A,
    ) -> Pin<Box<dyn Future<Output = Result<Balance<C>, Self::Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             C: 'async_trait + Currency,
             A: 'async_trait + Into<Address> + Send,
             Self: 'async_trait;
    fn safe_info<'life0, 'async_trait>(
        &'life0 self,
        selector: SafeSelector,
    ) -> Pin<Box<dyn Future<Output = Result<Option<DeployedSafe>, Self::Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn await_safe_deployment<'life0, 'async_trait>(
        &'life0 self,
        selector: SafeSelector,
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<DeployedSafe, Self::Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn predict_module_address<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        nonce: u64,
        owner: &'life1 Address,
        safe_address: &'life2 Address,
    ) -> Pin<Box<dyn Future<Output = Result<Address, Self::Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
}
Expand description

Operations for reading Safe information.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn safe_allowance<'life0, 'async_trait, C, A>( &'life0 self, safe_address: A, ) -> Pin<Box<dyn Future<Output = Result<Balance<C>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, C: 'async_trait + Currency, A: 'async_trait + Into<Address> + Send, Self: 'async_trait,

Returns the native or token currency Safe allowance.

Source

fn safe_info<'life0, 'async_trait>( &'life0 self, selector: SafeSelector, ) -> Pin<Box<dyn Future<Output = Result<Option<DeployedSafe>, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Retrieves DeployedSafe information using the given selector.

Returns None if no deployed Safe matched the given selector.

Source

fn await_safe_deployment<'life0, 'async_trait>( &'life0 self, selector: SafeSelector, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<DeployedSafe, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Waits for a Safe matching the given selector to be deployed up to the given timeout.

Returns immediately if the matching Safe is already deployed.

Source

fn predict_module_address<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, nonce: u64, owner: &'life1 Address, safe_address: &'life2 Address, ) -> Pin<Box<dyn Future<Output = Result<Address, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Predicts the Module address based on the given nonce, owner and safe_address of the Safe.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, T> ChainReadSafeOperations for &'a T
where T: 'a + ChainReadSafeOperations + ?Sized,

Source§

type Error = <T as ChainReadSafeOperations>::Error

Source§

fn safe_allowance<'life0, 'async_trait, C, A>( &'life0 self, safe_address: A, ) -> Pin<Box<dyn Future<Output = Result<Balance<C>, <&'a T as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, C: 'async_trait + Currency, A: 'async_trait + Into<Address> + Send, &'a T: 'async_trait,

Source§

fn safe_info<'life0, 'async_trait>( &'life0 self, selector: SafeSelector, ) -> Pin<Box<dyn Future<Output = Result<Option<DeployedSafe>, <&'a T as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, &'a T: 'async_trait,

Source§

fn await_safe_deployment<'life0, 'async_trait>( &'life0 self, selector: SafeSelector, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<DeployedSafe, <&'a T as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, &'a T: 'async_trait,

Source§

fn predict_module_address<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, nonce: u64, owner: &'life1 Address, safe_address: &'life2 Address, ) -> Pin<Box<dyn Future<Output = Result<Address, <&'a T as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, &'a T: 'async_trait,

Source§

impl<T> ChainReadSafeOperations for Box<T>

Source§

type Error = <T as ChainReadSafeOperations>::Error

Source§

fn safe_allowance<'life0, 'async_trait, C, A>( &'life0 self, safe_address: A, ) -> Pin<Box<dyn Future<Output = Result<Balance<C>, <Box<T> as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, C: 'async_trait + Currency, A: 'async_trait + Into<Address> + Send, Box<T>: 'async_trait,

Source§

fn safe_info<'life0, 'async_trait>( &'life0 self, selector: SafeSelector, ) -> Pin<Box<dyn Future<Output = Result<Option<DeployedSafe>, <Box<T> as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

Source§

fn await_safe_deployment<'life0, 'async_trait>( &'life0 self, selector: SafeSelector, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<DeployedSafe, <Box<T> as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Box<T>: 'async_trait,

Source§

fn predict_module_address<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, nonce: u64, owner: &'life1 Address, safe_address: &'life2 Address, ) -> Pin<Box<dyn Future<Output = Result<Address, <Box<T> as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Box<T>: 'async_trait,

Source§

impl<T> ChainReadSafeOperations for Arc<T>

Source§

type Error = <T as ChainReadSafeOperations>::Error

Source§

fn safe_allowance<'life0, 'async_trait, C, A>( &'life0 self, safe_address: A, ) -> Pin<Box<dyn Future<Output = Result<Balance<C>, <Arc<T> as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, C: 'async_trait + Currency, A: 'async_trait + Into<Address> + Send, Arc<T>: 'async_trait,

Source§

fn safe_info<'life0, 'async_trait>( &'life0 self, selector: SafeSelector, ) -> Pin<Box<dyn Future<Output = Result<Option<DeployedSafe>, <Arc<T> as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Arc<T>: 'async_trait,

Source§

fn await_safe_deployment<'life0, 'async_trait>( &'life0 self, selector: SafeSelector, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<DeployedSafe, <Arc<T> as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Arc<T>: 'async_trait,

Source§

fn predict_module_address<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, nonce: u64, owner: &'life1 Address, safe_address: &'life2 Address, ) -> Pin<Box<dyn Future<Output = Result<Address, <Arc<T> as ChainReadSafeOperations>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Arc<T>: 'async_trait,

Implementors§