nyxd-scraper-shared 1.20.4

Common crate for the sqlite and psql Nyxd blockchain scrapers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0

use crate::block_processor::types::ParsedTransactionResponse;
use crate::error::ScraperError;
use crate::storage::NyxdScraperTransaction;
use async_trait::async_trait;

#[async_trait]
pub trait TxModule {
    async fn handle_tx(
        &mut self,
        tx: &ParsedTransactionResponse,
        storage_tx: &mut dyn NyxdScraperTransaction,
    ) -> Result<(), ScraperError>;
}