this
SLITHER-W1092The contract reads its own variable using this
, adding overhead of an unnecessary STATICCALL.
contract C {
mapping(uint => address) public myMap;
function test(uint x) external returns(address) {
return this.myMap(x);
}
}
Read the variable directly from storage instead of calling the contract.
var-read-using-this on Slither's wiki.