Closed Tezei closed 1 day ago
Comment out the required calldata in your checkUpkeep function like this:
function checkUpkeep(
bytes memory /* checkData */
) public view returns (bool upkeepNeeded, bytes memory /*performData*/) {
bool timeHasPassed = ((block.timestamp - s_lastTimeStamp) >=
i_interval);
bool isOpen = (s_lotteryState == LotteryState.OPEN);
bool hasBalance = address(this).balance > 0;
bool hasPlayers = s_entrants.length > 0;
//this will return upkeepNeeded due to the explicit declaration in the return statement above
upkeepNeeded = timeHasPassed && isOpen && hasBalance && hasPlayers;
return (upkeepNeeded, "");
}
Please use the Discussions tab for coding help, or join us in Discord!
Hiya guys, When I tried forge build command I am getting error as follows:
Please, advise.
10x in advance