1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use postage::broadcast;

use client_pangolin::client::PangolinClient;
use component_ethereum::ethereum::client::EthereumClient;
use subquery::Subquery;

use crate::bridge::ToExtrinsicsMessage;

pub struct ScanDataWrapper {
    /// Page from
    pub from: u64,
    /// Page limit
    pub limit: u32,
    /// Sender message to extrinsics
    pub sender_to_extrinsics: broadcast::Sender<ToExtrinsicsMessage>,
    /// Subquery client
    pub subquery: Subquery,
    /// Ethereum client
    pub ethereum: EthereumClient,
    /// Pangolin client
    pub pangolin: PangolinClient,
}

impl ScanDataWrapper {
    pub fn sender_to_extrinsics_mut(&mut self) -> &mut broadcast::Sender<ToExtrinsicsMessage> {
        &mut self.sender_to_extrinsics
    }
}