I am getting this warning in remix. What does this mean? Am I missing something here? Here is the simple code to demonstrate it:
pragma solidity ^0.4.20;
contract HelloWorld
{
string hello = "Hello World";
function sayHello() returns (string)
{
return hello;
}
}
Now I am getting a warning:
browser/HelloWorld.sol:6:5: Warning: Function state mutability can be restricted to view
function sayHello() returns (string)
^ (Relevant source part starts here and spans across multiple lines).