This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: basic lib indexer structure [ci skip]
- Loading branch information
Showing
2 changed files
with
53 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,43 @@ | ||
use async_trait::async_trait; | ||
use bitcoin::{BlockHash, Network}; | ||
|
||
use crate::{ | ||
traits::{BitcoinIndexerOpt, BitcoinRpc}, | ||
types::{BitcoinClientResult, BitcoinInscriptionIndexerResult}, | ||
}; | ||
|
||
#[allow(unused)] | ||
pub struct BitcoinInscriptionIndexer { | ||
pub rpc: Box<dyn BitcoinRpc>, | ||
network: Network, | ||
} | ||
|
||
#[async_trait] | ||
impl BitcoinIndexerOpt for BitcoinInscriptionIndexer { | ||
async fn new() -> BitcoinClientResult<Self> | ||
where | ||
Self: Sized, | ||
{ | ||
todo!() | ||
} | ||
|
||
async fn process_blocks( | ||
&self, | ||
starting_block: u128, | ||
ending_block: u128, | ||
) -> BitcoinInscriptionIndexerResult<Vec<&str>> { | ||
todo!() | ||
} | ||
|
||
async fn process_block(&self, block: u128) -> BitcoinInscriptionIndexerResult<Vec<&str>> { | ||
todo!() | ||
} | ||
|
||
async fn are_blocks_connected( | ||
&self, | ||
parent_hash: &BlockHash, | ||
child_hash: &BlockHash, | ||
) -> BitcoinInscriptionIndexerResult<bool> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters