StdStorage Slot find does not find storage slot for short strings. #345
Open
Description
Example contract:
contract MyContract {
// short string as it only has 31 characters
string public exists = "thequickbrownfoxjumpsoverthelaz";
}
Script:
contract MyScript is Script {
using stdStorage for StdStorage;
function run() public {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);
MyContract s = new MyContract();
uint256 slot = stdstore.target(address(s)).sig("exists()").find();
console2.log(slot);
vm.stopBroadcast();
}
}
Output:
stdStorage find(StdStorage): Slot(s) not found.
Metadata
Assignees
Labels
No labels