Skip to content

Commit

Permalink
chore(exe/map): fix felt mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-melnychuk committed Oct 31, 2024
1 parent 97b18b1 commit ef0f85c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/exe/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ impl StorageCache for LRU {
contract_address: &ContractAddress,
storage_key: &StorageKey,
) -> Option<StarkFelt> {
get(&key(block_hash, contract_address, storage_key))
.map(|value| StarkFelt::from_raw(value.0))
get(&key(block_hash, contract_address, storage_key)).map(|value| {
let mut bytes = [0u8; 32];
value.to_big_endian(&mut bytes);
StarkFelt::from_bytes_be(&bytes)
})
}

fn insert(
Expand Down

0 comments on commit ef0f85c

Please sign in to comment.