Getting Started
Last updated
Last updated
Supra’s Automation Network is built to be developer-friendly. It provides multiple interfaces for registering tasks, managing them, and observing execution. Developers can integrate automation into their applications with minimal setup using the REST API, Supra CLI, or the SDK. Here is an overview of a diagram which will give you the idea of the workflow.
Before creating tasks, make sure the following conditions are met:
The target smart contract is deployed on the Supra network.
The target smart contract exposes callable entry functions to invoke automation.
The developer wallet has enough funds to cover registration fees and automation gas costs.
Automation is enabled on the network: usually active by default on supported Testnets and Mainnets.
There are two ways to register an automation task:
The CLI provides a straightforward interface:
This command registers a task that will call the specified function with the given arguments when its condition evaluates to true.
You can also register tasks by submitting signed transactions via REST. The payload structure includes:
Target entry function (The entry function includes the conditional logic that determines when to execute the task)
Arguments
Expiry time
Maximum gas amount
Gas price cap
Automation fee cap
Query active task IDs using view functions.
Fetch task metadata by index.
Cancel a task with the cancel_task API
or CLI sub-command.
Estimate automation fees using REST view endpoints
Tasks that expire or exceed fee limits are automatically removed at the start of the next epoch.
Manually cancelled tasks also remain active until the current epoch ends and are removed in the following