ethereum-optimism / smock

[Optimism] Solidity mock contracts in JavaScript
73 stars 15 forks source link

fix: Make smoddit work for bytesN map keys #36

Closed smartcontracts closed 3 years ago

smartcontracts commented 3 years ago

Description Fixes smoddit so that it'll work for bytesN keys. Underlying bug was that all values were being treated like uint and were being right-aligned (padding the start with zeros). Solidity handles bytesN where N < 32 by padding the end with zeros (left-aligned). Also adds a regression test.

Metadata