๐Ÿค– Automation

AutomationConsumer

Since smart contracts cannot initate transactions without the help of an externally owned account, a service like chainlink automation is required to reliably execute transactions at regular intervals or based on conditional logic triggers.

Click start to update the boolean state variable integrated with the checkUpkeep function's return value that controls if chainlink nodes should call the performUpkeep function every interval seconds.

interval
isCounting
NaN
counter
0.0 LINKleft in upkeep subscription

Upkeep Events

Getting Started

Chainlink Automation calls a smart contract function if a specified set of criteria are met. The time-based trigger calls a target function on a target contract every specified interval. The custom logic trigger allows your contract to use on-chain state to determine when to call a target function. The log trigger allows your contract to use event log data as both a trigger and an input

Steps

  1. Decide which trigger fits best for your use case
  2. Import the appropriate interface and override the checkUpkeep and performUpkeep functions inhereted from the interface
  3. Register a new upkeep with chainlink by providing your target contract address and depositing LINK tokens

Details