Skip to content

Commit

Permalink
feat(theoros_remove_db): Last nit 💀
Browse files Browse the repository at this point in the history
  • Loading branch information
akhercha committed Aug 27, 2024
1 parent 07a7238 commit db4d587
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion rust/pragma-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ bollard = { workspace = true }
clap = { workspace = true }
dirs = { workspace = true }
env_logger = { workspace = true }
# TODO: alloy
alloy = { workspace = true }
eyre = { workspace = true }
futures-util = { workspace = true }
Expand Down
7 changes: 5 additions & 2 deletions rust/theoros/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,18 @@ async fn main() -> Result<()> {

let metrics_service = MetricsService::new(false, METRICS_PORT)?;

let event_storage = EventStorage::new(EVENTS_MEM_SIZE);
// TODO: state should contains the rpc_client to interact with a Madara node
let state = AppState { event_storage: Arc::new(event_storage), metrics_registry: metrics_service.registry() };
let state = AppState {
event_storage: Arc::new(EventStorage::new(EVENTS_MEM_SIZE)),
metrics_registry: metrics_service.registry(),
};

// TODO: Should be Pragma X DNA url - see with Apibara team + should be in config
let apibara_uri = "https://mainnet.starknet.a5a.ch";
// TODO: key in config / .env (...)
let apibara_api_key = std::env::var("APIBARA_API_KEY")?;
let indexer_service = IndexerService::new(state.clone(), apibara_uri, apibara_api_key)?;

let api_service = ApiService::new(state.clone(), config.server_host(), config.server_port());

let theoros = ServiceGroup::default().with(metrics_service).with(indexer_service).with(api_service);
Expand Down

0 comments on commit db4d587

Please sign in to comment.