Skip to content

Commit

Permalink
chore(deps): use latest thegraph-core crate version
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Delgado <[email protected]>
  • Loading branch information
LNSD committed Dec 20, 2024
1 parent 85ad049 commit 3b58d56
Show file tree
Hide file tree
Showing 54 changed files with 278 additions and 228 deletions.
213 changes: 133 additions & 80 deletions Cargo.lock

Large diffs are not rendered by default.

25 changes: 12 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ resolver = "2"
opt-level = 3

[workspace.dependencies]
alloy = { version = "=0.5.4", features = [
"kzg",
"signer-mnemonic",
"dyn-abi",
"sol-types",
"signer-local",
"eip712",
"rlp",
"signers",
], default-features = false }
clap = "4.4.3"
lazy_static = "1.4.0"
axum = { version = "0.7.9", default-features = false, features = [
Expand Down Expand Up @@ -62,14 +52,23 @@ uuid = { version = "1.11.0", features = ["v7"] }
tracing = { version = "0.1.40", default-features = false }
bigdecimal = "0.4.3"
build-info = "0.0.39"
tap_core = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "61b47b3", default-features = false }
tap_aggregator = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "61b47b3", default-features = false }
tap_core = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "1c6e29f", default-features = false }
tap_aggregator = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "1c6e29f", default-features = false }
tracing-subscriber = { version = "0.3", features = [
"json",
"env-filter",
"ansi",
], default-features = false }
thegraph-core = { git = "https://github.com/edgeandnode/toolshed", rev = "1663534fc1738e2db1b11cb54b5bb478ee970d40" }
thegraph-core = { version = "0.9.6", features = [
"attestation",
"alloy-eip712",
"alloy-sol-types",
"alloy-rlp",
"alloy-signers",
"alloy-signer-local",
"alloy-signer-mnemonic",
"serde"
] }
thegraph-graphql-http = { version = "0.3.2", features = ["reqwest"] }
graphql_client = { version = "0.14.0", features = ["reqwest-rustls"] }
bip39 = "2.0.0"
Expand Down
1 change: 0 additions & 1 deletion crates/allocation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ edition = "2021"
[dependencies]
indexer-query = { path = "../query" }
serde = { workspace = true, features = ["derive"] }
alloy.workspace = true
thegraph-core.workspace = true
anyhow.workspace = true
6 changes: 4 additions & 2 deletions crates/allocation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

use std::str::FromStr;

use alloy::primitives::{Address, U256};
use indexer_query::allocations_query;
use serde::{Deserialize, Deserializer};
use thegraph_core::DeploymentId;
use thegraph_core::{
alloy::primitives::{Address, U256},
DeploymentId,
};

#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Allocation {
Expand Down
1 change: 0 additions & 1 deletion crates/attestation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition = "2021"

[dependencies]
indexer-allocation = { path = "../allocation" }
alloy.workspace = true
thegraph-core.workspace = true
anyhow.workspace = true

Expand Down
22 changes: 13 additions & 9 deletions crates/attestation/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
// Copyright 2023-, Edge & Node, GraphOps, and Semiotic Labs.
// SPDX-License-Identifier: Apache-2.0

use alloy::{
primitives::{Address, ChainId},
signers::{
k256,
local::{coins_bip39::English, MnemonicBuilder, PrivateKeySigner},
use indexer_allocation::Allocation;
use thegraph_core::{
alloy::{
primitives::{Address, ChainId},
signers::{
k256,
local::{coins_bip39::English, MnemonicBuilder, PrivateKeySigner},
},
sol_types::Eip712Domain,
},
sol_types::Eip712Domain,
attestation,
attestation::Attestation,
DeploymentId,
};
use indexer_allocation::Allocation;
use thegraph_core::{attestation, Attestation, DeploymentId};

pub fn derive_key_pair(
indexer_mnemonic: &str,
Expand Down Expand Up @@ -119,10 +123,10 @@ fn wallet_for_allocation(
mod tests {
use std::str::FromStr;

use alloy::primitives::{address, U256};
use indexer_allocation::{Allocation, AllocationStatus, SubgraphDeployment};
use test_assets::DISPUTE_MANAGER_ADDRESS;
use test_log::test;
use thegraph_core::alloy::primitives::{address, U256};

use super::*;

Expand Down
1 change: 0 additions & 1 deletion crates/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "1.2.2"
edition = "2021"

[dependencies]
alloy.workspace = true
serde.workspace = true
thegraph-core.workspace = true
tracing.workspace = true
Expand Down
5 changes: 2 additions & 3 deletions crates/config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use std::{
time::Duration,
};

use alloy::primitives::Address;
use bigdecimal::{BigDecimal, FromPrimitive, ToPrimitive};
use bip39::Mnemonic;
use figment::{
Expand All @@ -21,7 +20,7 @@ use regex::Regex;
use serde::Deserialize;
use serde_repr::Deserialize_repr;
use serde_with::{serde_as, DurationSecondsWithFrac};
use thegraph_core::DeploymentId;
use thegraph_core::{alloy::primitives::Address, DeploymentId};
use url::Url;

use crate::NonZeroGRT;
Expand Down Expand Up @@ -423,9 +422,9 @@ pub struct RavRequestConfig {
mod tests {
use std::{env, fs, path::PathBuf, str::FromStr};

use alloy::primitives::{Address, FixedBytes};
use figment::value::Uncased;
use sealed_test::prelude::*;
use thegraph_core::alloy::primitives::{Address, FixedBytes};
use tracing_test::traced_test;

use super::{DatabaseConfig, SHARED_PREFIX};
Expand Down
4 changes: 1 addition & 3 deletions crates/dips/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
alloy.workspace = true
thiserror.workspace = true
anyhow.workspace = true
alloy-sol-types = "=0.8.15"
alloy-rlp = "0.3.9"
alloy-rlp = "0.3.10"
thegraph-core.workspace = true
22 changes: 11 additions & 11 deletions crates/dips/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ use std::{
time::{Duration, SystemTime, UNIX_EPOCH},
};

pub use alloy;
use alloy::{
use thegraph_core::alloy::{
core::primitives::Address,
primitives::PrimitiveSignature as Signature,
rlp::{RlpDecodable, RlpEncodable},
rlp::{Encodable, RlpDecodable, RlpEncodable},
signers::SignerSync,
sol_types::{sol, Eip712Domain, SolStruct},
sol,
sol_types::{Eip712Domain, SolStruct},
};
pub use alloy_rlp;
use alloy_rlp::Encodable;
use thiserror::Error;

sol! {
Expand Down Expand Up @@ -216,12 +214,14 @@ impl SignedCancellationRequest {
mod test {
use std::time::{Duration, SystemTime, UNIX_EPOCH};

use alloy::{
primitives::{Address, FixedBytes, U256},
signers::local::PrivateKeySigner,
sol_types::SolStruct,
use thegraph_core::{
alloy::{
primitives::{Address, FixedBytes, U256},
signers::local::PrivateKeySigner,
sol_types::SolStruct,
},
attestation::eip712_domain,
};
use thegraph_core::attestation::eip712_domain;

use crate::{
AgreementVoucherValidationError, CancellationRequest, CancellationRequestValidationError,
Expand Down
1 change: 0 additions & 1 deletion crates/monitor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ indexer-allocation = { path = "../allocation" }
indexer-attestation = { path = "../attestation" }
indexer-watcher = { path = "../watcher" }
thiserror.workspace = true
alloy.workspace = true
anyhow.workspace = true
reqwest = { workspace = true, features = ["json"] }
tracing.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions crates/monitor/src/allocations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use std::{
time::{Duration, SystemTime, UNIX_EPOCH},
};

use alloy::primitives::{Address, TxHash};
use indexer_allocation::Allocation;
use indexer_query::allocations_query::{self, AllocationsQuery};
use indexer_watcher::new_watcher;
use thegraph_core::alloy::primitives::{Address, TxHash};
use tokio::sync::watch::Receiver;

use crate::client::SubgraphClient;
Expand Down Expand Up @@ -93,7 +93,7 @@ mod test {
const NETWORK_SUBGRAPH_URL: &str =
"https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum";

use alloy::primitives::address;
use thegraph_core::alloy::primitives::address;

use super::*;
use crate::client::{DeploymentDetails, SubgraphClient};
Expand Down
2 changes: 1 addition & 1 deletion crates/monitor/src/attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ use std::{
sync::{Arc, Mutex},
};

use alloy::primitives::{Address, ChainId};
use bip39::Mnemonic;
use indexer_allocation::Allocation;
use indexer_attestation::AttestationSigner;
use indexer_watcher::join_and_map_watcher;
use thegraph_core::alloy::primitives::{Address, ChainId};
use tokio::sync::watch::Receiver;

use crate::{AllocationWatcher, DisputeManagerWatcher};
Expand Down
3 changes: 1 addition & 2 deletions crates/monitor/src/deployment_to_allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

use std::collections::HashMap;

use alloy::primitives::Address;
use indexer_watcher::map_watcher;
use thegraph_core::DeploymentId;
use thegraph_core::{alloy::primitives::Address, DeploymentId};
use tokio::sync::watch::Receiver;

use crate::AllocationWatcher;
Expand Down
2 changes: 1 addition & 1 deletion crates/monitor/src/dispute_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

use std::time::Duration;

use alloy::primitives::Address;
use anyhow::Error;
use indexer_query::dispute_manager::{self, DisputeManager};
use indexer_watcher::new_watcher;
use thegraph_core::alloy::primitives::Address;
use tokio::sync::watch::Receiver;

use crate::client::SubgraphClient;
Expand Down
2 changes: 1 addition & 1 deletion crates/monitor/src/escrow_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use std::{
time::Duration,
};

use alloy::primitives::{Address, U256};
use anyhow::anyhow;
use indexer_query::escrow_account::{self, EscrowAccountQuery};
use thegraph_core::alloy::primitives::{Address, U256};
use thiserror::Error;
use tokio::sync::watch::Receiver;

Expand Down
1 change: 0 additions & 1 deletion crates/query/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ edition = "2021"
graphql_client.workspace = true
thegraph-core.workspace = true
serde.workspace = true
alloy.workspace = true
anyhow.workspace = true
4 changes: 2 additions & 2 deletions crates/query/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use graphql_client::GraphQLQuery;

pub mod dispute_manager {
use alloy::primitives::Address;
use graphql_client::GraphQLQuery;
use thegraph_core::alloy::primitives::Address;
type Bytes = Address;

#[derive(GraphQLQuery)]
Expand Down Expand Up @@ -37,8 +37,8 @@ pub mod escrow_account {
}

pub mod allocations_query {
use alloy::primitives::{B256, U256};
use graphql_client::GraphQLQuery;
use thegraph_core::alloy::primitives::{B256, U256};
type BigInt = U256;
type Bytes = B256;

Expand Down
11 changes: 5 additions & 6 deletions crates/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,18 @@ base64.workspace = true
graphql = { git = "https://github.com/edgeandnode/toolshed", tag = "graphql-v0.3.0" }
tap_core.workspace = true
uuid.workspace = true
alloy.workspace = true
typed-builder.workspace = true
tower_governor = { version = "0.5.0", features = ["axum"] }
governor = "0.8.0"
tower-http = { version = "0.6.2", features = [
"auth",
"cors",
"normalize-path",
"trace",
"auth",
"cors",
"normalize-path",
"trace",
] }
autometrics = { version = "1.0.1", features = ["prometheus-exporter"] }
axum-extra = { version = "0.9.3", features = [
"typed-header",
"typed-header",
], default-features = false }
tokio-util = "0.7.10"
cost-model = { git = "https://github.com/graphprotocol/agora", rev = "3ed34ca" }
Expand Down
2 changes: 1 addition & 1 deletion crates/service/src/database/dips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

use std::collections::HashMap;

use alloy::rlp::Decodable;
use anyhow::bail;
use axum::async_trait;
use build_info::chrono::Utc;
use indexer_dips::{SignedCancellationRequest, SignedIndexingAgreementVoucher};
use sqlx::PgPool;
use thegraph_core::alloy::rlp::Decodable;
use uuid::Uuid;

#[async_trait]
Expand Down
5 changes: 2 additions & 3 deletions crates/service/src/middleware/allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

use std::collections::HashMap;

use alloy::primitives::Address;
use axum::{
extract::{Request, State},
middleware::Next,
response::Response,
};
use tap_core::receipt::SignedReceipt;
use thegraph_core::DeploymentId;
use thegraph_core::{alloy::primitives::Address, DeploymentId};
use tokio::sync::watch;

/// The current query Allocation Id address
Expand Down Expand Up @@ -58,7 +57,6 @@ pub async fn allocation_middleware(

#[cfg(test)]
mod tests {
use alloy::primitives::Address;
use axum::{
body::Body,
http::{Extensions, Request},
Expand All @@ -68,6 +66,7 @@ mod tests {
};
use reqwest::StatusCode;
use test_assets::{create_signed_receipt, SignedReceiptRequest, ESCROW_SUBGRAPH_DEPLOYMENT};
use thegraph_core::alloy::primitives::Address;
use tokio::sync::watch;
use tower::ServiceExt;

Expand Down
Loading

0 comments on commit 3b58d56

Please sign in to comment.