Open TucanCrypto opened 4 months ago
Finally, somebody could help me and that's the solution for the function checkUpkeep:
function checkUpkeep(
bytes memory /*checkData*/
)
public
view
override
returns (
bool upkeepNeeded,
bytes memory /* performData */
)
{
bool isOpen = (RaffleState.OPEN == s_raffleState);
bool timePassed = (block.timestamp - s_lastTimeStamp) > i_interval;
bool hasPlayers = (s_players.length > 0);
bool hasBalance = address(this).balance > 0;
upkeepNeeded = (isOpen && timePassed && hasPlayers && hasBalance);
return (upkeepNeeded, "0x0");
}
When I try to compile my code, there's an error in the function checkUpkeep and performUpkeep about calldata and memory. There are some libraries of Chainlink that change it, so I don't know how to fix. There's the code:
And the problem is: