Skip to content

Commit

Permalink
fix(storage): keys in ls bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Nov 3, 2024
1 parent 52aa316 commit cf03aed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zink/codegen/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl Storage {

let mut seed = [0; 64];
seed[..32].copy_from_slice(&key.bytes32());
seed[60..].copy_from_slice(&Self::STORAGE_SLOT.bytes32());
seed[32..].copy_from_slice(&Self::STORAGE_SLOT.bytes32());
zink::keccak256(&seed)
}
}
Expand Down Expand Up @@ -140,7 +140,7 @@ impl Storage {

let mut seed = [0; 64];
seed[..32].copy_from_slice(&key1.bytes32());
seed[60..].copy_from_slice(&Self::STORAGE_SLOT.bytes32());
seed[32..].copy_from_slice(&Self::STORAGE_SLOT.bytes32());
let skey1 = zink::keccak256(&seed);
seed[..32].copy_from_slice(&skey1);
seed[32..].copy_from_slice(&key2.bytes32());
Expand Down

0 comments on commit cf03aed

Please sign in to comment.