I am trying to compile a simple contract on Remix but I am getting following 3 warnings:
- Gas requirement of function Greeter.hello() high: infinite. If the gas requirement of a function is higher than the block gas limit, it cannot be executed. Please avoid loops in your functions or actions that modify large areas of storage (this includes clearing or copying arrays in storage)
Gas requirement of function Greeter.set(string) high: infinite. If the gas requirement of a function is higher than the block gas limit, it cannot be executed. Please avoid loops in your functions or actions that modify large areas of storage (this includes clearing or copying arrays in storage)
Gas requirement of function Greeter.yourName() high: infinite. If the gas requirement of a function is higher than the block gas limit, it cannot be executed. Please avoid loops in your functions or actions that modify large areas of storage (this includes clearing or copying arrays in storage)
The contract is given below:
pragma solidity ^0.4.22;
contract Greeter {
string public yourName;
constructor() public{
yourName = "World";
}
function (string name) public {
yourName = name;
}
function hello( ) public constant returns (string) {
return yourName;
}
}
Some body please guide me how to remove the above warnings.
Zulfi.