Skip to content

Commit cffef46

Browse files
committed
refactor: use alloy imports instead
Signed-off-by: Lorenzo Delgado <[email protected]>
1 parent 7330b90 commit cffef46

File tree

18 files changed

+38
-34
lines changed

18 files changed

+38
-34
lines changed

crates/allocation/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
use std::str::FromStr;
55

6-
use alloy::primitives::U256;
6+
use alloy::primitives::{Address, U256};
77
use indexer_query::allocations_query;
88
use serde::{Deserialize, Deserializer};
9-
use thegraph_core::{Address, DeploymentId};
9+
use thegraph_core::DeploymentId;
1010

1111
#[derive(Clone, Debug, PartialEq, Eq)]
1212
pub struct Allocation {

crates/attestation/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use alloy::{
5-
dyn_abi::Eip712Domain,
5+
primitives::{Address, ChainId},
66
signers::{
77
k256,
88
local::{coins_bip39::English, MnemonicBuilder, PrivateKeySigner},
99
},
10+
sol_types::Eip712Domain,
1011
};
1112
use indexer_allocation::Allocation;
12-
use thegraph_core::{attestation, Address, Attestation, ChainId, DeploymentId};
13+
use thegraph_core::{attestation, Attestation, DeploymentId};
1314

1415
pub fn derive_key_pair(
1516
indexer_mnemonic: &str,

crates/config/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ pub struct RavRequestConfig {
424424
mod tests {
425425
use std::{env, fs, path::PathBuf, str::FromStr};
426426

427-
use alloy::primitives::FixedBytes;
427+
use alloy::primitives::{Address, FixedBytes};
428428
use figment::value::Uncased;
429429
use sealed_test::prelude::*;
430430
use tracing_test::traced_test;
@@ -450,7 +450,7 @@ mod tests {
450450
)
451451
.unwrap();
452452
max_config.dips = Some(crate::DipsConfig {
453-
allowed_payers: vec![thegraph_core::Address(
453+
allowed_payers: vec![Address(
454454
FixedBytes::<20>::from_str("0x3333333333333333333333333333333333333333").unwrap(),
455455
)],
456456
cancellation_time_tolerance: None,

crates/dips/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ use alloy::{
1212
primitives::PrimitiveSignature as Signature,
1313
rlp::{RlpDecodable, RlpEncodable},
1414
signers::SignerSync,
15+
sol_types::{sol, Eip712Domain, SolStruct},
1516
};
1617
pub use alloy_rlp;
1718
use alloy_rlp::Encodable;
18-
use thegraph_core::alloy_sol_types::{sol, Eip712Domain, SolStruct};
1919
use thiserror::Error;
2020

2121
sol! {

crates/monitor/src/attestation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ use std::{
66
sync::{Arc, Mutex},
77
};
88

9+
use alloy::primitives::{Address, ChainId};
910
use bip39::Mnemonic;
1011
use indexer_allocation::Allocation;
1112
use indexer_attestation::AttestationSigner;
1213
use indexer_watcher::join_and_map_watcher;
13-
use thegraph_core::{Address, ChainId};
1414
use tokio::sync::watch::Receiver;
1515
use tracing::warn;
1616

@@ -51,7 +51,7 @@ fn modify_sigers(
5151
attestation_signers_map: &'static Mutex<HashMap<Address, AttestationSigner>>,
5252
allocations: &HashMap<Address, Allocation>,
5353
dispute_manager: &Address,
54-
) -> HashMap<thegraph_core::Address, AttestationSigner> {
54+
) -> HashMap<Address, AttestationSigner> {
5555
let mut signers = attestation_signers_map.lock().unwrap();
5656
// Remove signers for allocations that are no longer active or recently closed
5757
signers.retain(|id, _| allocations.contains_key(id));

crates/monitor/src/deployment_to_allocation.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
use std::collections::HashMap;
55

6+
use alloy::primitives::Address;
67
use indexer_watcher::map_watcher;
7-
use thegraph_core::{Address, DeploymentId};
8+
use thegraph_core::DeploymentId;
89
use tokio::sync::watch::Receiver;
910

1011
use crate::AllocationWatcher;

crates/service/src/middleware/sender.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2023-, Edge & Node, GraphOps, and Semiotic Labs.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use alloy::{dyn_abi::Eip712Domain, primitives::Address};
4+
use alloy::{primitives::Address, sol_types::Eip712Domain};
55
use axum::{
66
extract::{Request, State},
77
middleware::Next,

crates/service/src/routes/dips.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use async_graphql::{Context, EmptySubscription, FieldResult, Object, Schema, Sim
88
use base64::{engine::general_purpose::STANDARD, Engine};
99
use indexer_config::{BlockchainConfig, DipsConfig};
1010
use indexer_dips::{
11-
alloy::{core::primitives::Address, dyn_abi::Eip712Domain},
11+
alloy::{core::primitives::Address, sol_types::Eip712Domain},
1212
alloy_rlp::Decodable,
1313
SignedCancellationRequest, SignedIndexingAgreementVoucher, SubgraphIndexingVoucherMetadata,
1414
};

crates/service/src/service/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use std::{sync::Arc, time::Duration};
55

6-
use alloy::dyn_abi::Eip712Domain;
6+
use alloy::sol_types::Eip712Domain;
77
use async_graphql_axum::GraphQL;
88
use axum::{
99
extract::MatchedPath,

crates/service/src/tap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use std::{collections::HashMap, fmt::Debug, sync::Arc, time::Duration};
55

6-
use alloy::{dyn_abi::Eip712Domain, primitives::Address};
6+
use alloy::{primitives::Address, sol_types::Eip712Domain};
77
use indexer_allocation::Allocation;
88
use indexer_monitor::EscrowAccounts;
99
use receipt_store::{DatabaseReceipt, InnerContext};

0 commit comments

Comments
 (0)