Skip to content

Commit 2bab115

Browse files
authored
refactor: use alloy::primitives::Address for all instances (#383)
1 parent 1bde9b4 commit 2bab115

File tree

13 files changed

+13
-14
lines changed

13 files changed

+13
-14
lines changed

common/src/attestations/dispute_manager.rs

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

44
use std::time::Duration;
55

6+
use alloy::primitives::Address;
67
use eventuals::{timer, Eventual, EventualExt};
78
use graphql_client::GraphQLQuery;
8-
use thegraph_core::Address;
99
use tokio::time::sleep;
1010
use tracing::warn;
1111

common/src/escrow_accounts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ use std::{
77
time::Duration,
88
};
99

10-
use alloy::primitives::U256;
10+
use alloy::primitives::{Address, U256};
1111
use anyhow::{anyhow, Result};
1212
use eventuals::{timer, Eventual, EventualExt};
1313
use graphql_client::GraphQLQuery;
14-
use thegraph_core::Address;
1514
use thiserror::Error;
1615
use tokio::time::sleep;
1716
use tracing::{error, warn};

common/src/indexer_service/http/tap_receipt_header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ impl Header for TapReceipt {
6767
mod test {
6868
use std::str::FromStr;
6969

70+
use alloy::primitives::Address;
7071
use axum::http::HeaderValue;
7172
use axum_extra::headers::Header;
72-
use thegraph_core::Address;
7373

7474
use crate::test_vectors::create_signed_receipt;
7575

common/src/tap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ use crate::tap::checks::sender_balance_check::SenderBalanceCheck;
88
use crate::tap::checks::timestamp_check::TimestampCheck;
99
use crate::{escrow_accounts::EscrowAccounts, prelude::Allocation};
1010
use alloy::dyn_abi::Eip712Domain;
11+
use alloy::primitives::Address;
1112
use eventuals::Eventual;
1213
use receipt_store::{DatabaseReceipt, InnerContext};
1314
use sqlx::PgPool;
1415
use std::fmt::Debug;
1516
use std::time::Duration;
1617
use std::{collections::HashMap, sync::Arc};
1718
use tap_core::receipt::checks::ReceiptCheck;
18-
use thegraph_core::Address;
1919
use tokio::sync::mpsc::{self, Sender};
2020
use tokio_util::sync::CancellationToken;
2121
use tracing::error;

common/src/tap/checks/deny_list_check.rs

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

44
use crate::escrow_accounts::EscrowAccounts;
55
use alloy::dyn_abi::Eip712Domain;
6+
use alloy::primitives::Address;
67
use eventuals::Eventual;
78
use sqlx::postgres::PgListener;
89
use sqlx::PgPool;
@@ -15,7 +16,6 @@ use tap_core::receipt::{
1516
state::Checking,
1617
ReceiptWithState,
1718
};
18-
use thegraph_core::Address;
1919
use tracing::error;
2020

2121
pub struct DenyListCheck {

tap-agent/src/agent/sender_account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ use std::time::Duration;
1313
use tokio::task::JoinHandle;
1414

1515
use alloy::dyn_abi::Eip712Domain;
16+
use alloy::primitives::Address;
1617
use anyhow::Result;
1718
use eventuals::{Eventual, EventualExt, PipeHandle};
1819
use indexer_common::{escrow_accounts::EscrowAccounts, prelude::SubgraphClient};
1920
use ractor::{call, Actor, ActorProcessingErr, ActorRef, MessagingErr, SupervisionEvent};
2021
use sqlx::PgPool;
2122
use tap_core::rav::SignedRAV;
22-
use thegraph_core::Address;
2323
use tracing::{error, Level};
2424

2525
use super::sender_allocation::{SenderAllocation, SenderAllocationArgs};

tap-agent/src/agent/sender_accounts_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::{collections::HashMap, str::FromStr};
88
use crate::agent::sender_allocation::SenderAllocationMessage;
99
use crate::lazy_static;
1010
use alloy::dyn_abi::Eip712Domain;
11+
use alloy::primitives::Address;
1112
use anyhow::Result;
1213
use anyhow::{anyhow, bail};
1314
use eventuals::{Eventual, EventualExt, PipeHandle};
@@ -16,7 +17,6 @@ use indexer_common::prelude::{Allocation, SubgraphClient};
1617
use ractor::{Actor, ActorCell, ActorProcessingErr, ActorRef, SupervisionEvent};
1718
use serde::Deserialize;
1819
use sqlx::{postgres::PgListener, PgPool};
19-
use thegraph_core::Address;
2020
use tokio::select;
2121
use tracing::{error, warn};
2222

tap-agent/src/agent/sender_allocation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::{
66
time::{Duration, Instant},
77
};
88

9+
use alloy::primitives::Address;
910
use alloy::{dyn_abi::Eip712Domain, hex::ToHexExt};
1011
use anyhow::{anyhow, ensure, Result};
1112
use bigdecimal::num_bigint::BigInt;
@@ -26,7 +27,6 @@ use tap_core::{
2627
},
2728
signed_message::EIP712SignedMessage,
2829
};
29-
use thegraph_core::Address;
3030
use tracing::{debug, error, warn};
3131

3232
use crate::{agent::sender_account::ReceiptFees, lazy_static};

tap-agent/src/tap/context/escrow.rs

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

4+
use alloy::primitives::Address;
45
use async_trait::async_trait;
56
use tap_core::manager::adapters::EscrowHandler as EscrowAdapterTrait;
6-
use thegraph_core::Address;
77

88
use super::{error::AdapterError, TapAgentContext};
99

tap-agent/src/tap/context/receipt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ use std::{
88
};
99

1010
use alloy::hex::ToHexExt;
11+
use alloy::primitives::Address;
1112
use bigdecimal::{num_bigint::ToBigInt, ToPrimitive};
1213
use sqlx::{postgres::types::PgRange, types::BigDecimal};
1314
use tap_core::{
1415
manager::adapters::{safe_truncate_receipts, ReceiptDelete, ReceiptRead},
1516
receipt::{state::Checking, Receipt, ReceiptWithState, SignedReceipt},
1617
};
17-
use thegraph_core::Address;
1818

1919
use crate::tap::signers_trimmed;
2020

0 commit comments

Comments
 (0)