defi-wonderland / smock

The Solidity mocking library
MIT License
319 stars 40 forks source link

Mappings with string as key are not being set by setVariable #87

Open ElijahJohnson5 opened 2 years ago

ElijahJohnson5 commented 2 years ago

Describe the bug I was trying to set a variable in a contract that is mapping(string => uint256) however it seems to not be getting set correctly. I am able to set other mappings using setVariable

Reproduction steps

  1. Create a contract with a mapping(string => uint256) [variableName]
  2. In a test mock the contract
  3. try to setVariable([variableName], { "key": 1 }
  4. use a simple getter to try and get the value for "key"

Expected behavior I expect this behavior to be the same as all of the other mapping set variable calls.

System Specs: