Skip to main content

ChainWriteSafeOperations

Trait ChainWriteSafeOperations 

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

    // Required method
    fn deploy_safe<'a, 'async_trait>(
        &'a self,
        balance: Balance<WxHOPR>,
    ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, Self::Error>> + Send + 'a>>, Self::Error>> + Send + 'async_trait>>
       where 'a: 'async_trait,
             Self: 'async_trait;
}
Expand description

Operations for writing Safe information.

Required Associated Types§

type Error: Error + Send + Sync + 'static

Required Methods§

fn deploy_safe<'a, 'async_trait>( &'a self, balance: Balance<WxHOPR>, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, Self::Error>> + Send + 'a>>, Self::Error>> + Send + 'async_trait>>
where 'a: 'async_trait, Self: 'async_trait,

Deploys Safe with the given balance of wxHOPR tokens.

The admin of the deployed Safe is always only the Connector’s own signer. Only one Safe can be deployed per signer.

Implementations on Foreign Types§

§

impl<'b, T> ChainWriteSafeOperations for &'b T

§

type Error = <T as ChainWriteSafeOperations>::Error

§

fn deploy_safe<'a, 'async_trait>( &'a self, balance: Balance<WxHOPR>, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <&'b T as ChainWriteSafeOperations>::Error>> + Send + 'a>>, <&'b T as ChainWriteSafeOperations>::Error>> + Send + 'async_trait>>
where 'a: 'async_trait, &'b T: 'async_trait,

§

impl<T> ChainWriteSafeOperations for Box<T>

§

type Error = <T as ChainWriteSafeOperations>::Error

§

fn deploy_safe<'a, 'async_trait>( &'a self, balance: Balance<WxHOPR>, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <Box<T> as ChainWriteSafeOperations>::Error>> + Send + 'a>>, <Box<T> as ChainWriteSafeOperations>::Error>> + Send + 'async_trait>>
where 'a: 'async_trait, Box<T>: 'async_trait,

§

impl<T> ChainWriteSafeOperations for Arc<T>

§

type Error = <T as ChainWriteSafeOperations>::Error

§

fn deploy_safe<'a, 'async_trait>( &'a self, balance: Balance<WxHOPR>, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Future<Output = Result<HashBase<CoreWrapper<Keccak256Core>>, <Arc<T> as ChainWriteSafeOperations>::Error>> + Send + 'a>>, <Arc<T> as ChainWriteSafeOperations>::Error>> + Send + 'async_trait>>
where 'a: 'async_trait, Arc<T>: 'async_trait,

Implementors§

Source§

impl<B, C, P> ChainWriteSafeOperations for HoprBlockchainConnector<C, B, P, P::TxRequest>
where B: Send + Sync + 'static, C: BlokliQueryClient + BlokliTransactionClient + Send + Sync + 'static, P: PayloadGenerator + Send + Sync + 'static, P::TxRequest: Send + Sync + 'static,