Skip to content

Commit

Permalink
Merge pull request sphinx-labs#577 from chugsplash/pate/chu-166-inclu…
Browse files Browse the repository at this point in the history
…de-bytes320-storage-slot-value-for

fix(core): Add bytes32(0) set storage action for mappings
  • Loading branch information
sam-goldman authored Mar 29, 2023
2 parents d9cc733 + 0183153 commit 0a3bbfd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/languages/solidity/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,13 @@ export const encodeMapping: VariableHandler<
} = props

// Iterate over every key/value in the mapping to get the storage slot pair for each one.
let slots: Array<StorageSlotSegment> = []
let slots: Array<StorageSlotSegment> = [
{
key: slotKey,
offset: 0,
val: ethers.constants.HashZero,
},
]
for (const [mappingKey, mappingVal] of Object.entries(variable)) {
const mappingValStorageObj = buildMappingStorageObj(
storageTypes,
Expand Down

0 comments on commit 0a3bbfd

Please sign in to comment.