|
1 |
| -use std::str::FromStr; |
2 |
| - |
3 | 1 | pub trait IndexerExt: Sized {
|
4 |
| - fn with_default_penumbra_app_views(self) -> Self; |
| 2 | + fn with_default_penumbra_app_views(self, options: &crate::Options) -> Self; |
5 | 3 | }
|
6 | 4 |
|
7 | 5 | impl IndexerExt for cometindex::Indexer {
|
8 |
| - fn with_default_penumbra_app_views(self) -> Self { |
| 6 | + fn with_default_penumbra_app_views(self, options: &crate::Options) -> Self { |
9 | 7 | self.with_index(Box::new(crate::block::Block {}))
|
10 | 8 | .with_index(Box::new(crate::stake::ValidatorSet {}))
|
11 | 9 | .with_index(Box::new(crate::stake::Slashings {}))
|
12 | 10 | .with_index(Box::new(crate::stake::DelegationTxs {}))
|
13 | 11 | .with_index(Box::new(crate::stake::UndelegationTxs {}))
|
14 | 12 | .with_index(Box::new(crate::governance::GovernanceProposals {}))
|
15 | 13 | .with_index(Box::new(crate::dex_ex::Component::new(
|
16 |
| - penumbra_sdk_asset::asset::Id::from_str( |
17 |
| - // USDC |
18 |
| - "passet1w6e7fvgxsy6ccy3m8q0eqcuyw6mh3yzqu3uq9h58nu8m8mku359spvulf6", |
19 |
| - ) |
20 |
| - .expect("should be able to parse passet"), |
21 |
| - 1000.0 * 1_000_000.0, |
| 14 | + options.indexing_denom, |
| 15 | + options.dex_ex_min_liquidity as f64, |
22 | 16 | )))
|
23 | 17 | .with_index(Box::new(crate::supply::Component::new()))
|
24 | 18 | .with_index(Box::new(crate::ibc::Component::new()))
|
25 |
| - .with_index(Box::new(crate::insights::Component::new( |
26 |
| - penumbra_sdk_asset::asset::Id::from_str( |
27 |
| - // USDC |
28 |
| - "passet1w6e7fvgxsy6ccy3m8q0eqcuyw6mh3yzqu3uq9h58nu8m8mku359spvulf6", |
29 |
| - ) |
30 |
| - .ok(), |
31 |
| - ))) |
| 19 | + .with_index(Box::new(crate::insights::Component::new(Some( |
| 20 | + options.indexing_denom, |
| 21 | + )))) |
32 | 22 | }
|
33 | 23 | }
|
0 commit comments