nyxd_scraper_shared/modules/
tx_module.rs

1// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
2// SPDX-License-Identifier: Apache-2.0
3
4use crate::block_processor::types::ParsedTransactionResponse;
5use crate::error::ScraperError;
6use crate::storage::NyxdScraperTransaction;
7use async_trait::async_trait;
8
9#[async_trait]
10pub trait TxModule {
11    async fn handle_tx(
12        &mut self,
13        tx: &ParsedTransactionResponse,
14        storage_tx: &mut dyn NyxdScraperTransaction,
15    ) -> Result<(), ScraperError>;
16}