Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdud007 committed Oct 28, 2024
1 parent 1dcdbd2 commit f5d5d16
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions hdp/src/cairo_runner/dry_run.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::constant::DRY_CAIRO_RUN_OUTPUT_FILE;
use crate::primitives::processed_types::uint256::Uint256;
use crate::provider::key::{
EvmAccountKey, EvmFetchKeyEnvelope, EvmHeaderKey, EvmStorageKey, EvmBlockTxKey,
EvmBlockReceiptKey,
EvmAccountKey, EvmBlockReceiptKey, EvmBlockTxKey, EvmFetchKeyEnvelope, EvmHeaderKey,
EvmStorageKey,
};
use serde::{Deserialize, Serialize};
use serde_with::serde_as;
Expand Down
10 changes: 6 additions & 4 deletions hdp/src/provider/evm/from_keys.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use super::provider::EvmProvider;
use crate::primitives::processed_types::account::ProcessedAccount;
use crate::primitives::processed_types::block_proofs::{convert_to_mmr_with_headers, ProcessedBlockProofs};
use crate::primitives::processed_types::block_proofs::{
convert_to_mmr_with_headers, ProcessedBlockProofs,
};
use crate::primitives::processed_types::header::ProcessedHeader;
use crate::primitives::processed_types::mmr::MMRMeta;
use crate::primitives::processed_types::mpt::ProcessedMPTProof;
Expand All @@ -9,8 +11,8 @@ use crate::primitives::processed_types::storage::ProcessedStorage;
use crate::primitives::processed_types::transaction::ProcessedTransaction;
use crate::provider::error::ProviderError;
use crate::provider::key::{
EvmAccountKey, CategorizedFetchKeys, EvmHeaderKey, EvmStorageKey,
EvmBlockTxKey, EvmBlockReceiptKey,
CategorizedFetchKeys, EvmAccountKey, EvmBlockReceiptKey, EvmBlockTxKey, EvmHeaderKey,
EvmStorageKey,
};
use alloy::primitives::{Address, BlockNumber, Bytes, TxIndex, B256};
use alloy::transports::{RpcError, TransportErrorKind};
Expand Down Expand Up @@ -483,7 +485,7 @@ mod tests {
let (chain_id, fetched_keys) = categorize_fetch_keys(keys).into_iter().next().unwrap();
assert_eq!(chain_id, target_chain_id);
let proofs = provider.fetch_proofs_from_keys(fetched_keys).await.unwrap();
assert_eq!(proofs.headers.len(), 2);
assert_eq!(proofs.mmr_with_headers[0].headers.len(), 2);
assert_eq!(proofs.transactions.len(), 3);
}
}
8 changes: 3 additions & 5 deletions hdp/src/provider/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ pub fn categorize_fetch_keys(
EvmFetchKeyEnvelope::Tx(tx_key) => {
target_categorized_fetch_keys
.headers
.insert(EvmHeaderKey::new(
tx_key.chain_id,
tx_key.block_number,
));
.insert(EvmHeaderKey::new(tx_key.chain_id, tx_key.block_number));
target_categorized_fetch_keys.block_txs.insert(tx_key);
}
EvmFetchKeyEnvelope::TxReceipt(tx_receipt_key) => {
Expand Down Expand Up @@ -522,7 +519,8 @@ mod tests {

#[test]
fn test_parse_json_tx_key() {
let json = r#"{"type": "EvmBlockTxKey", "key": {"chain_id": 1, "block_number": 100, "index": 1}}"#;
let json =
r#"{"type": "EvmBlockTxKey", "key": {"chain_id": 1, "block_number": 100, "index": 1}}"#;
let parsed: EvmFetchKeyEnvelope = serde_json::from_str(json).unwrap();
assert_eq!(
parsed,
Expand Down

0 comments on commit f5d5d16

Please sign in to comment.