time_primitives::gmp

Trait IConnector

Source
pub trait IConnector:
    Send
    + Sync
    + 'static {
    // Required methods
    fn chain(&self) -> &dyn IChain;
    fn finalized_block<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn read_events<'life0, 'async_trait>(
        &'life0 self,
        gateway: Address32,
        blocks: Range<u64>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<GmpEvent>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn submit_commands<'life0, 'async_trait>(
        &'life0 self,
        gateway: Address32,
        batch: BatchId,
        msg: GatewayMessage,
        gas_price: u128,
        signer: TssPublicKey,
        sig: TssSignature,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn gas_price<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<u128>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn chain(&self) -> &dyn IChain

Returns an IChain implementation.

Source

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

Returns the last finalized block.

Source

fn read_events<'life0, 'async_trait>( &'life0 self, gateway: Address32, blocks: Range<u64>, ) -> Pin<Box<dyn Future<Output = Result<Vec<GmpEvent>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reads gmp messages from the target chain.

Source

fn submit_commands<'life0, 'async_trait>( &'life0 self, gateway: Address32, batch: BatchId, msg: GatewayMessage, gas_price: u128, signer: TssPublicKey, sig: TssSignature, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Submits a gmp message to the target chain.

Source

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

Get EIP1559 max_fee_per_gas estimate for a chain.

Implementors§