I am trying to compile the following contract. I am using Remix IDE. It is giving me infinite error in the Withdraw method.
pragma solidity ^0.4.24;
contract financialContracts4{
address issuer; constructor() public{ issuer = msg.sender; }
modifier ifIssuer(){ if(issuer != msg.sender){
revert(); }else {
_;//underscore } }
function receiveFunds( )public payable{
}
function getValue() public view returns(uint) { address myAddress = this; return myAddress.balance; }
function withdrawFunds(uint funds) ifIssuer{ issuer.transfer(funds); } }
The error message is:
Gas requirement of function financialContracts4.withdrawFunds(uint256) 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) is:
Some body please guide me.
Zulfi.