You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npx everdev sol set --compiler 0.57.3
npx everdev sol compile --code --output-dir build App.sol
Warning: Function state mutability can be restricted to pure
--> App.sol:21:5:
|
21 |functionfoo(string bar) public view onlyOwner returns(string out) {
| ^ (Relevant source part starts here and spans across multiple lines).
The text was updated successfully, but these errors were encountered:
broxus/ever-contracts#4 (comment) This method can't be pure because the onlyOwner modifier must have access to the contract state which is not loaded for pure methods. It is a known bug in compiler which still exists. @Rexagon
Hi @IgorKoval ! How's it going? For me, it seems like a critical bug. onlyOwner is a well-known pattern in Solidity development. Probably every second developer will see the compiler hint and insert the pure modifier, which leads to unexpected behavior.
App.sol
The text was updated successfully, but these errors were encountered: