We are using a custom logic automation. when checking checkUpkeep the boolean returns true (pic attached) but our perform upkeep doesn't run. It is calling another function to run that cost rougly 50k to 100k in gas (when run manually) What are we missing? (p.s. when we do a simple toggle function call the performUpkeep works - but not our function). I've even put the gas up to 2,500,000 for testing using a timebased option as well (calling a specific function to execute same logic). Here is the repo https://github.com/billyjitsu/expir3/tree/main/packages/backend/contracts
WE are expecting when the checkUpkeep returns true to execute the upkeep
In order to solve the problem like "Why Chainlink checkUpkeep does not execute", I suggest doing the following things to debug your upkeep.
checkUpkeep
andperformUpkeep
are both triggered by Chainlink automation, you need to check your automation subscription first. In the automation app, double check the contract address is correct.performUpkeep
in your consumer contract), it has to pay the gas fee. It is important to make sure there is a minimum balance of LINK in your subscription.checkUpkeep
works as expected. If the pre-defined condition for automation is satisfied in your smart contract,checkUpkeep
should return true. Chainlink automation only callsperformUpkeep
whencheckUpkeep
returnstrue
, so the upkeep does not work ifcheckUpkeep
cannot return true. CallcheckUpkeep
by yourself to test if it works properly. If you cannot gettrue
as returned value, automation cannot gettrue
either.performUpkeep
works as expected. The mechanism of Chainlink automation is to callperformUpkeep
whencheckUpkeep
returnstrue
, so you must make sure theperformUpkeep
can be called by automation. Try to call theperformUpkeep
manually to see if it works properly.Hope it helps!