What is the use of Check gas limit in Chainlink Keepers?

154 Views Asked by At

In chainlink keepers document here. There is a conf called checkGasLimit with 6,500,000 as the default value.

Since the computation in checkUpKeep is expected to be outsourced off-chain, why there is a configuration called checkGasLimit where computation is off-chain?

Or checkGasLimit is for the situation where function checkUpKeep is supposed to modify some state.

1

There are 1 best solutions below

3
On BEST ANSWER

You got it!

checkUpkeep can be used to change the state of the blockchain. The Chainlink nodes will call the checkUpkeep function when it returns true - and if it costs gas, it will use gas.

The use of the checkGasLimit then, is to make sure they don't use too much gas. Per the docs:

The maximum amount of gas that can be used by your checkUpkeep for off-chain computation.