pindexer/
indexer_ext.rs

1pub trait IndexerExt: Sized {
2    fn with_default_penumbra_app_views(self, options: &crate::Options) -> Self;
3}
4
5impl IndexerExt for cometindex::Indexer {
6    fn with_default_penumbra_app_views(self, options: &crate::Options) -> Self {
7        self.with_index(Box::new(crate::block::Block {}))
8            .with_index(Box::new(crate::stake::ValidatorSet {}))
9            .with_index(Box::new(crate::stake::Slashings {}))
10            .with_index(Box::new(crate::stake::DelegationTxs {}))
11            .with_index(Box::new(crate::stake::UndelegationTxs {}))
12            .with_index(Box::new(crate::governance::GovernanceProposals {}))
13            .with_index(Box::new(crate::dex_ex::Component::new(
14                options.indexing_denom,
15                options.dex_ex_min_liquidity as f64,
16            )))
17            .with_index(Box::new(crate::supply::Component::new()))
18            .with_index(Box::new(crate::ibc::Component::new()))
19            .with_index(Box::new(crate::insights::Component::new(Some(
20                options.indexing_denom,
21            ))))
22    }
23}