hardhat-vscode
hardhat-vscode copied to clipboard
Assembly references to storage variables are not included
trafficstars
"Go to references" works well with assembly for local variables. For example, using it with value here correctly includes the assembly line:
uint value;
assembly {
value = 1
}
But if you do the same thing with a storage variable, then it doesn't work:
contract Foo {
uint public x;
function inc() public {
x++;
}
function set(uint _x) public {
x = _x;
}
function setWithAssembly(uint _x) public {
assembly {
sstore(x.slot, _x)
}
}
}
Here, the references list for x includes x++ and x = _x, but it doesn't include sstore(x.slot, _x).