@@ -25,7 +25,7 @@ use graph::futures03::{
2525use graph:: prelude:: {
2626 alloy:: {
2727 self ,
28- network:: { AnyNetwork , TransactionResponse } ,
28+ network:: TransactionResponse ,
2929 primitives:: { Address , B256 } ,
3030 providers:: {
3131 ext:: TraceApi ,
@@ -86,8 +86,8 @@ type AlloyProvider = FillProvider<
8686 Identity ,
8787 JoinFill < GasFiller , JoinFill < BlobGasFiller , JoinFill < NonceFiller , ChainIdFiller > > > ,
8888 > ,
89- RootProvider < AnyNetwork > ,
90- AnyNetwork ,
89+ RootProvider < AnyNetworkBare > ,
90+ AnyNetworkBare ,
9191> ;
9292
9393#[ derive( Clone ) ]
@@ -167,22 +167,22 @@ impl EthereumAdapter {
167167 ) -> Self {
168168 let alloy = match & transport {
169169 Transport :: RPC ( client) => Arc :: new (
170- alloy:: providers:: ProviderBuilder :: < _ , _ , AnyNetwork > :: default ( )
171- . network :: < AnyNetwork > ( )
170+ alloy:: providers:: ProviderBuilder :: < _ , _ , AnyNetworkBare > :: default ( )
171+ . network :: < AnyNetworkBare > ( )
172172 . with_recommended_fillers ( )
173173 . connect_client ( client. clone ( ) ) ,
174174 ) ,
175175 Transport :: IPC ( ipc_connect) => Arc :: new (
176- alloy:: providers:: ProviderBuilder :: < _ , _ , AnyNetwork > :: default ( )
177- . network :: < AnyNetwork > ( )
176+ alloy:: providers:: ProviderBuilder :: < _ , _ , AnyNetworkBare > :: default ( )
177+ . network :: < AnyNetworkBare > ( )
178178 . with_recommended_fillers ( )
179179 . connect_ipc ( ipc_connect. clone ( ) )
180180 . await
181181 . expect ( "Failed to connect to Ethereum IPC" ) ,
182182 ) ,
183183 Transport :: WS ( ws_connect) => Arc :: new (
184- alloy:: providers:: ProviderBuilder :: < _ , _ , AnyNetwork > :: default ( )
185- . network :: < AnyNetwork > ( )
184+ alloy:: providers:: ProviderBuilder :: < _ , _ , AnyNetworkBare > :: default ( )
185+ . network :: < AnyNetworkBare > ( )
186186 . with_recommended_fillers ( )
187187 . connect_ws ( ws_connect. clone ( ) )
188188 . await
@@ -2062,7 +2062,7 @@ pub(crate) fn parse_block_triggers(
20622062async fn fetch_receipt_from_ethereum_client (
20632063 eth : & EthereumAdapter ,
20642064 transaction_hash : B256 ,
2065- ) -> anyhow:: Result < alloy :: network :: AnyTransactionReceipt > {
2065+ ) -> anyhow:: Result < AnyTransactionReceiptBare > {
20662066 match eth. alloy . get_transaction_receipt ( transaction_hash) . await {
20672067 Ok ( Some ( receipt) ) => Ok ( receipt) ,
20682068 Ok ( None ) => bail ! ( "Could not find transaction receipt" ) ,
@@ -2215,7 +2215,7 @@ async fn fetch_transaction_receipts_in_batch_with_retry(
22152215 hashes : Vec < B256 > ,
22162216 block_hash : B256 ,
22172217 logger : ProviderLogger ,
2218- ) -> Result < Vec < Arc < alloy :: network :: AnyTransactionReceipt > > , IngestorError > {
2218+ ) -> Result < Vec < Arc < AnyTransactionReceiptBare > > , IngestorError > {
22192219 let retry_log_message = format ! (
22202220 "batch eth_getTransactionReceipt RPC call for block {:?}" ,
22212221 block_hash
@@ -2241,7 +2241,7 @@ async fn fetch_transaction_receipts_in_batch(
22412241 hashes : Vec < B256 > ,
22422242 block_hash : B256 ,
22432243 logger : ProviderLogger ,
2244- ) -> Result < Vec < Arc < alloy :: network :: AnyTransactionReceipt > > , IngestorError > {
2244+ ) -> Result < Vec < Arc < AnyTransactionReceiptBare > > , IngestorError > {
22452245 // Use the batch method to get all receipts at once
22462246 let receipts = batch_get_transaction_receipts ( alloy, hashes. clone ( ) )
22472247 . await
@@ -2270,17 +2270,16 @@ async fn fetch_transaction_receipts_in_batch(
22702270async fn batch_get_transaction_receipts (
22712271 provider : Arc < AlloyProvider > ,
22722272 tx_hashes : Vec < B256 > ,
2273- ) -> Result < Vec < Option < alloy :: network :: AnyTransactionReceipt > > , Box < dyn std:: error:: Error > > {
2273+ ) -> Result < Vec < Option < AnyTransactionReceiptBare > > , Box < dyn std:: error:: Error > > {
22742274 let mut batch = alloy:: rpc:: client:: BatchRequest :: new ( provider. client ( ) ) ;
22752275 let mut receipt_futures = Vec :: new ( ) ;
22762276
22772277 // Add all receipt requests to batch
22782278 for tx_hash in & tx_hashes {
2279- let receipt_future = batch
2280- . add_call :: < ( B256 , ) , Option < alloy:: network:: AnyTransactionReceipt > > (
2281- "eth_getTransactionReceipt" ,
2282- & ( * tx_hash, ) ,
2283- ) ?;
2279+ let receipt_future = batch. add_call :: < ( B256 , ) , Option < AnyTransactionReceiptBare > > (
2280+ "eth_getTransactionReceipt" ,
2281+ & ( * tx_hash, ) ,
2282+ ) ?;
22842283 receipt_futures. push ( receipt_future) ;
22852284 }
22862285
@@ -2332,7 +2331,7 @@ async fn fetch_receipts_with_retry(
23322331 block_hash : B256 ,
23332332 logger : ProviderLogger ,
23342333 supports_block_receipts : bool ,
2335- ) -> Result < Vec < Arc < alloy :: network :: AnyTransactionReceipt > > , IngestorError > {
2334+ ) -> Result < Vec < Arc < AnyTransactionReceiptBare > > , IngestorError > {
23362335 if supports_block_receipts {
23372336 return fetch_block_receipts_with_retry ( alloy, hashes, block_hash, logger) . await ;
23382337 }
@@ -2345,7 +2344,7 @@ async fn fetch_individual_receipts_with_retry(
23452344 hashes : Vec < B256 > ,
23462345 block_hash : B256 ,
23472346 logger : ProviderLogger ,
2348- ) -> Result < Vec < Arc < alloy :: network :: AnyTransactionReceipt > > , IngestorError > {
2347+ ) -> Result < Vec < Arc < AnyTransactionReceiptBare > > , IngestorError > {
23492348 if ENV_VARS . fetch_receipts_in_batches {
23502349 return fetch_transaction_receipts_in_batch_with_retry ( alloy, hashes, block_hash, logger)
23512350 . await ;
@@ -2364,9 +2363,9 @@ async fn fetch_individual_receipts_with_retry(
23642363 } )
23652364 . buffered ( ENV_VARS . block_ingestor_max_concurrent_json_rpc_calls ) ;
23662365
2367- tokio_stream:: StreamExt :: collect :: <
2368- Result < Vec < Arc < alloy :: network :: AnyTransactionReceipt > > , IngestorError > ,
2369- > ( receipt_stream )
2366+ tokio_stream:: StreamExt :: collect :: < Result < Vec < Arc < AnyTransactionReceiptBare > > , IngestorError > > (
2367+ receipt_stream ,
2368+ )
23702369 . await
23712370}
23722371
@@ -2376,7 +2375,7 @@ async fn fetch_block_receipts_with_retry(
23762375 hashes : Vec < B256 > ,
23772376 block_hash : B256 ,
23782377 logger : ProviderLogger ,
2379- ) -> Result < Vec < Arc < alloy :: network :: AnyTransactionReceipt > > , IngestorError > {
2378+ ) -> Result < Vec < Arc < AnyTransactionReceiptBare > > , IngestorError > {
23802379 use graph:: prelude:: alloy:: rpc:: types:: BlockId ;
23812380 let retry_log_message = format ! ( "eth_getBlockReceipts RPC call for block {:?}" , block_hash) ;
23822381
@@ -2420,7 +2419,7 @@ async fn fetch_transaction_receipt_with_retry(
24202419 transaction_hash : B256 ,
24212420 block_hash : B256 ,
24222421 logger : ProviderLogger ,
2423- ) -> Result < Arc < alloy :: network :: AnyTransactionReceipt > , IngestorError > {
2422+ ) -> Result < Arc < AnyTransactionReceiptBare > , IngestorError > {
24242423 let retry_log_message = format ! (
24252424 "eth_getTransactionReceipt RPC call for transaction {:?}" ,
24262425 transaction_hash
@@ -2443,11 +2442,11 @@ async fn fetch_transaction_receipt_with_retry(
24432442}
24442443
24452444fn resolve_transaction_receipt (
2446- transaction_receipt : Option < alloy :: network :: AnyTransactionReceipt > ,
2445+ transaction_receipt : Option < AnyTransactionReceiptBare > ,
24472446 transaction_hash : B256 ,
24482447 block_hash : B256 ,
24492448 logger : ProviderLogger ,
2450- ) -> Result < alloy :: network :: AnyTransactionReceipt , IngestorError > {
2449+ ) -> Result < AnyTransactionReceiptBare , IngestorError > {
24512450 match transaction_receipt {
24522451 // A receipt might be missing because the block was uncled, and the transaction never
24532452 // made it back into the main chain.
@@ -2580,11 +2579,10 @@ async fn get_transaction_receipts_for_transaction_hashes(
25802579 transaction_hashes_by_block : & HashMap < B256 , HashSet < B256 > > ,
25812580 subgraph_metrics : Arc < SubgraphEthRpcMetrics > ,
25822581 logger : ProviderLogger ,
2583- ) -> Result < HashMap < B256 , Arc < alloy :: network :: AnyTransactionReceipt > > , anyhow:: Error > {
2582+ ) -> Result < HashMap < B256 , Arc < AnyTransactionReceiptBare > > , anyhow:: Error > {
25842583 use std:: collections:: hash_map:: Entry :: Vacant ;
25852584
2586- let mut receipts_by_hash: HashMap < B256 , Arc < alloy:: network:: AnyTransactionReceipt > > =
2587- HashMap :: new ( ) ;
2585+ let mut receipts_by_hash: HashMap < B256 , Arc < AnyTransactionReceiptBare > > = HashMap :: new ( ) ;
25882586
25892587 // Return early if input set is empty
25902588 if transaction_hashes_by_block. is_empty ( ) {
@@ -2665,8 +2663,7 @@ mod tests {
26652663 EthereumBlockWithCalls ,
26662664 } ;
26672665 use graph:: blockchain:: BlockPtr ;
2668- use graph:: components:: ethereum:: AnyBlock ;
2669- use graph:: prelude:: alloy:: network:: AnyNetwork ;
2666+ use graph:: components:: ethereum:: AnyNetworkBare ;
26702667 use graph:: prelude:: alloy:: primitives:: { Address , Bytes , B256 } ;
26712668 use graph:: prelude:: alloy:: providers:: mock:: Asserter ;
26722669 use graph:: prelude:: alloy:: providers:: ProviderBuilder ;
@@ -2682,7 +2679,7 @@ mod tests {
26822679
26832680 let block = EthereumBlockWithCalls {
26842681 ethereum_block : EthereumBlock {
2685- block : Arc :: new ( LightEthereumBlock :: new ( AnyBlock :: from ( block) ) ) ,
2682+ block : Arc :: new ( LightEthereumBlock :: new ( block) ) ,
26862683 ..Default :: default ( )
26872684 } ,
26882685 calls : Some ( vec ! [ EthereumCall {
@@ -2743,8 +2740,8 @@ mod tests {
27432740 let json_value: Value = serde_json:: from_str ( json_response) . unwrap ( ) ;
27442741
27452742 let asserter = Asserter :: new ( ) ;
2746- let provider = ProviderBuilder :: < _ , _ , AnyNetwork > :: default ( )
2747- . network :: < AnyNetwork > ( )
2743+ let provider = ProviderBuilder :: < _ , _ , AnyNetworkBare > :: default ( )
2744+ . network :: < AnyNetworkBare > ( )
27482745 . with_recommended_fillers ( )
27492746 . connect_mocked_client ( asserter. clone ( ) ) ;
27502747
@@ -2827,7 +2824,7 @@ mod tests {
28272824 #[ allow( unreachable_code) ]
28282825 let block = EthereumBlockWithCalls {
28292826 ethereum_block : EthereumBlock {
2830- block : Arc :: new ( LightEthereumBlock :: new ( AnyBlock :: from ( block) ) ) ,
2827+ block : Arc :: new ( LightEthereumBlock :: new ( block) ) ,
28312828 ..Default :: default ( )
28322829 } ,
28332830 calls : Some ( vec ! [ EthereumCall {
@@ -2858,7 +2855,7 @@ mod tests {
28582855 #[ allow( unreachable_code) ]
28592856 let block = EthereumBlockWithCalls {
28602857 ethereum_block : EthereumBlock {
2861- block : Arc :: new ( LightEthereumBlock :: new ( AnyBlock :: from ( block) ) ) ,
2858+ block : Arc :: new ( LightEthereumBlock :: new ( block) ) ,
28622859 ..Default :: default ( )
28632860 } ,
28642861 calls : Some ( vec ! [ EthereumCall {
0 commit comments