Skip to content

Commit

Permalink
feat: add scalar options to indexer service base config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannis committed Dec 1, 2023
1 parent 7316827 commit 760df33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions common/src/indexer_service/http/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub struct IndexerServiceConfig {
pub network_subgraph: SubgraphConfig,
pub escrow_subgraph: SubgraphConfig,
pub graph_network: GraphNetworkConfig,
pub scalar: ScalarConfig,
}

#[derive(Clone, Debug, Deserialize, Serialize)]
Expand All @@ -54,3 +55,9 @@ pub struct IndexerConfig {
pub indexer_address: Address,
pub operator_mnemonic: String,
}

#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ScalarConfig {
pub chain_id: u64,
pub receipts_verifier_address: Address,
}
4 changes: 2 additions & 2 deletions common/src/indexer_service/http/indexer_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ impl IndexerService {
database,
allocations,
escrow_accounts,
// TODO: arguments for eip712_domain should be a config
eip712_domain! {
name: "TapManager",
version: "1",
verifying_contract: options.config.indexer.indexer_address,
chain_id: options.config.scalar.chain_id,
verifying_contract: options.config.scalar.receipts_verifier_address,
},
);

Expand Down

0 comments on commit 760df33

Please sign in to comment.