-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,820 additions
and
331 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// Copyright 2023-, Edge & Node, GraphOps, and Semiotic Labs. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use std::{net::SocketAddr, time::Duration}; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use thegraph_core::{Address, DeploymentId}; | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct DatabaseConfig { | ||
pub postgres_url: String, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct SubgraphConfig { | ||
#[serde(default)] | ||
pub serve_subgraph: bool, | ||
pub serve_auth_token: Option<String>, | ||
|
||
pub deployment: Option<DeploymentId>, | ||
pub query_url: String, | ||
pub query_auth_token: Option<String>, | ||
pub syncing_interval: u64, | ||
pub recently_closed_allocation_buffer_seconds: u64, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct ServerConfig { | ||
pub host_and_port: SocketAddr, | ||
pub metrics_host_and_port: SocketAddr, | ||
pub url_prefix: String, | ||
pub free_query_auth_token: Option<String>, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct IndexerServiceConfig { | ||
pub indexer: IndexerConfig, | ||
pub server: ServerConfig, | ||
pub database: DatabaseConfig, | ||
pub graph_node: Option<GraphNodeConfig>, | ||
pub network_subgraph: SubgraphConfig, | ||
pub escrow_subgraph: SubgraphConfig, | ||
pub graph_network: GraphNetworkConfig, | ||
pub tap: TapConfig, | ||
pub dips: IndexerDipsConfig, | ||
} | ||
|
||
#[derive(Debug, Deserialize, Serialize, Clone)] | ||
pub struct IndexerDipsConfig { | ||
pub allowed_payers: Vec<Address>, | ||
pub cancel_voucher_time_tolerance: Option<Duration>, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct GraphNodeConfig { | ||
pub status_url: String, | ||
pub query_base_url: String, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct GraphNetworkConfig { | ||
pub chain_id: u64, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct IndexerConfig { | ||
pub indexer_address: Address, | ||
pub operator_mnemonic: String, | ||
} | ||
|
||
#[derive(Clone, Debug, Deserialize, Serialize)] | ||
pub struct TapConfig { | ||
pub chain_id: u64, | ||
pub receipts_verifier_address: Address, | ||
pub timestamp_error_tolerance: u64, | ||
pub receipt_max_value: u128, | ||
} |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "indexer-dips" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
alloy.workspace = true | ||
thiserror.workspace = true | ||
anyhow.workspace = true | ||
alloy-sol-types = "=0.8.7" | ||
# alloy-signer = { version = "0.4", features = ["eip712"] } | ||
alloy-rlp = "0.3.8" | ||
thegraph-core.workspace = true | ||
|
||
# alloy-signer = "0.4.2" | ||
# alloy-rlp = "0.3.8" | ||
|
||
# [dev-dependencies] | ||
# alloy-signer-local = "=0.4.0" |
Oops, something went wrong.