@@ -121,7 +121,7 @@ pub async fn get_account<N: NetworkSpec, R: ExecutionRpc<N>>(
121121 block,
122122 } ) : Query < AccountProofQuery > ,
123123 State ( ApiState { execution_client } ) : State < ApiState < N , R > > ,
124- ) -> Response < GetAccountResponse > {
124+ ) -> Response < AccountResponse > {
125125 // Ensure that BlockId is of block number variant
126126 let block = block. unwrap_or ( BlockId :: latest ( ) ) ;
127127 let block_num = match block {
@@ -161,7 +161,7 @@ pub async fn get_account<N: NetworkSpec, R: ExecutionRpc<N>>(
161161 . await
162162 . map_err ( map_server_err) ?;
163163
164- Ok ( Json ( GetAccountResponse {
164+ Ok ( Json ( AccountResponse {
165165 account : Account {
166166 balance : proof. balance ,
167167 nonce : proof. nonce ,
@@ -183,7 +183,7 @@ pub async fn get_storage_at<N: NetworkSpec, R: ExecutionRpc<N>>(
183183 Path ( ( address, key) ) : Path < ( Address , U256 ) > ,
184184 Query ( BlockQuery { block } ) : Query < BlockQuery > ,
185185 State ( ApiState { execution_client } ) : State < ApiState < N , R > > ,
186- ) -> Response < GetStorageAtResponse > {
186+ ) -> Response < StorageAtResponse > {
187187 let block = block. unwrap_or ( BlockId :: latest ( ) ) ;
188188
189189 let storage_slot = execution_client
@@ -208,7 +208,7 @@ pub async fn get_storage_at<N: NetworkSpec, R: ExecutionRpc<N>>(
208208 }
209209 } ;
210210
211- Ok ( Json ( GetStorageAtResponse {
211+ Ok ( Json ( StorageAtResponse {
212212 storage,
213213 account : Account {
214214 balance : proof. balance ,
@@ -226,7 +226,7 @@ pub async fn get_storage_at<N: NetworkSpec, R: ExecutionRpc<N>>(
226226pub async fn get_block_receipts < N : NetworkSpec , R : ExecutionRpc < N > > (
227227 Path ( block) : Path < BlockId > ,
228228 State ( ApiState { execution_client } ) : State < ApiState < N , R > > ,
229- ) -> Response < GetBlockReceiptsResponse < N > > {
229+ ) -> Response < BlockReceiptsResponse < N > > {
230230 let receipts = execution_client
231231 . rpc
232232 . get_block_receipts ( block)
@@ -243,7 +243,7 @@ pub async fn get_block_receipts<N: NetworkSpec, R: ExecutionRpc<N>>(
243243pub async fn get_transaction_receipt < N : NetworkSpec , R : ExecutionRpc < N > > (
244244 Path ( tx_hash) : Path < B256 > ,
245245 State ( ApiState { execution_client } ) : State < ApiState < N , R > > ,
246- ) -> Response < GetTransactionReceiptResponse < N > > {
246+ ) -> Response < TransactionReceiptResponse < N > > {
247247 let receipt = execution_client
248248 . rpc
249249 . get_transaction_receipt ( tx_hash)
@@ -271,7 +271,7 @@ pub async fn get_transaction_receipt<N: NetworkSpec, R: ExecutionRpc<N>>(
271271 let receipt_proof =
272272 create_receipt_proof :: < N > ( receipts, receipt. transaction_index ( ) . unwrap ( ) as usize ) ;
273273
274- Ok ( Json ( GetTransactionReceiptResponse {
274+ Ok ( Json ( TransactionReceiptResponse {
275275 receipt,
276276 receipt_proof,
277277 } ) )
@@ -284,7 +284,7 @@ pub async fn get_transaction_receipt<N: NetworkSpec, R: ExecutionRpc<N>>(
284284pub async fn get_logs < N : NetworkSpec , R : ExecutionRpc < N > > (
285285 Query ( logs_filter_query) : Query < LogsQuery > ,
286286 State ( ApiState { execution_client } ) : State < ApiState < N , R > > ,
287- ) -> Response < GetLogsResponse < N > > {
287+ ) -> Response < LogsResponse < N > > {
288288 let filter: Filter = logs_filter_query. try_into ( ) . map_err ( map_server_err) ?;
289289
290290 // Fetch the filter logs from RPC
@@ -299,7 +299,7 @@ pub async fn get_logs<N: NetworkSpec, R: ExecutionRpc<N>>(
299299 . await
300300 . map_err ( map_server_err) ?;
301301
302- Ok ( Json ( GetLogsResponse {
302+ Ok ( Json ( LogsResponse {
303303 logs,
304304 receipt_proofs,
305305 } ) )
@@ -312,7 +312,7 @@ pub async fn get_logs<N: NetworkSpec, R: ExecutionRpc<N>>(
312312pub async fn get_filter_logs < N : NetworkSpec , R : ExecutionRpc < N > > (
313313 Path ( filter_id) : Path < U256 > ,
314314 State ( ApiState { execution_client } ) : State < ApiState < N , R > > ,
315- ) -> Response < GetFilterLogsResponse < N > > {
315+ ) -> Response < FilterLogsResponse < N > > {
316316 // Fetch the filter logs from RPC
317317 let logs = execution_client
318318 . rpc
@@ -325,7 +325,7 @@ pub async fn get_filter_logs<N: NetworkSpec, R: ExecutionRpc<N>>(
325325 . await
326326 . map_err ( map_server_err) ?;
327327
328- Ok ( Json ( GetFilterLogsResponse {
328+ Ok ( Json ( FilterLogsResponse {
329329 logs,
330330 receipt_proofs,
331331 } ) )
@@ -339,7 +339,7 @@ pub async fn get_filter_logs<N: NetworkSpec, R: ExecutionRpc<N>>(
339339pub async fn get_filter_changes < N : NetworkSpec , R : ExecutionRpc < N > > (
340340 Path ( filter_id) : Path < U256 > ,
341341 State ( ApiState { execution_client } ) : State < ApiState < N , R > > ,
342- ) -> Response < GetFilterChangesResponse < N > > {
342+ ) -> Response < FilterChangesResponse < N > > {
343343 let filter_changes = execution_client
344344 . rpc
345345 . get_filter_changes ( filter_id)
@@ -353,14 +353,14 @@ pub async fn get_filter_changes<N: NetworkSpec, R: ExecutionRpc<N>>(
353353 . await
354354 . map_err ( map_server_err) ?;
355355
356- GetFilterChangesResponse :: Logs ( GetFilterLogsResponse {
356+ FilterChangesResponse :: Logs ( FilterLogsResponse {
357357 logs,
358358 receipt_proofs,
359359 } )
360360 }
361- FilterChanges :: Hashes ( hashes) => GetFilterChangesResponse :: Hashes ( hashes) ,
362- FilterChanges :: Empty => GetFilterChangesResponse :: Hashes ( vec ! [ ] ) ,
363- FilterChanges :: Transactions ( txs) => GetFilterChangesResponse :: Hashes (
361+ FilterChanges :: Hashes ( hashes) => FilterChangesResponse :: Hashes ( hashes) ,
362+ FilterChanges :: Empty => FilterChangesResponse :: Hashes ( vec ! [ ] ) ,
363+ FilterChanges :: Transactions ( txs) => FilterChangesResponse :: Hashes (
364364 txs. into_iter ( ) . map ( |t| t. inner . tx_hash ( ) . clone ( ) ) . collect ( ) ,
365365 ) ,
366366 } ) )
@@ -369,7 +369,7 @@ pub async fn get_filter_changes<N: NetworkSpec, R: ExecutionRpc<N>>(
369369async fn create_receipt_proofs_for_logs < N : NetworkSpec , R : ExecutionRpc < N > > (
370370 logs : & [ Log ] ,
371371 execution_client : Arc < ExecutionClient < N , R > > ,
372- ) -> Result < HashMap < B256 , GetTransactionReceiptResponse < N > > > {
372+ ) -> Result < HashMap < B256 , TransactionReceiptResponse < N > > > {
373373 // Collect all (unique) block numbers
374374 let block_nums = logs
375375 . iter ( )
@@ -391,7 +391,7 @@ async fn create_receipt_proofs_for_logs<N: NetworkSpec, R: ExecutionRpc<N>>(
391391 let blocks_receipts = blocks_receipts. into_iter ( ) . collect :: < HashMap < _ , _ > > ( ) ;
392392
393393 // Create a map of transaction hashes to their receipt and proof
394- let mut receipt_proofs: HashMap < B256 , GetTransactionReceiptResponse < N > > = HashMap :: new ( ) ;
394+ let mut receipt_proofs: HashMap < B256 , TransactionReceiptResponse < N > > = HashMap :: new ( ) ;
395395
396396 for log in logs {
397397 let tx_hash = log. transaction_hash . unwrap ( ) ;
@@ -412,7 +412,7 @@ async fn create_receipt_proofs_for_logs<N: NetworkSpec, R: ExecutionRpc<N>>(
412412
413413 receipt_proofs. insert (
414414 tx_hash,
415- GetTransactionReceiptResponse {
415+ TransactionReceiptResponse {
416416 receipt : receipt. clone ( ) ,
417417 receipt_proof,
418418 } ,
0 commit comments