Skip to content
Lattice

IGelatoAutomate

Git Source

Title: IGelatoAutomate

Author: Vendored minimal subset of Gelato (https://github.com/gelatodigital/automate/blob/master/contracts/interfaces/IAutomate.sol).

Upstream license: MIT.

Minimal interface for the Gelato Automate (Web3 Functions / keeper) task manager.

Vendored subset — do not add a gelato dependency. Gelato executes a created task through a task-creator-specific dedicated msg.sender (the Automate proxy); every exec entrypoint must gate on it.

Functions

createTask

Creates an automation task.

function createTask(
        address execAddress,
        bytes calldata execDataOrSelector,
        ModuleData calldata moduleData,
        address feeToken
    ) external returns (bytes32 taskId);

Parameters

NameTypeDescription
execAddressaddressThe contract Gelato will call when the task runs.
execDataOrSelectorbytesThe calldata (or selector, for resolver/web3-function modules) to run.
moduleDataModuleDataThe modules configuring how/when the task triggers.
feeTokenaddressThe fee token (address(0) for native; off-chain via 1Balance otherwise).

Returns

NameTypeDescription
taskIdbytes32The identifier assigned to the created task.

cancelTask

Cancels a previously created task.

function cancelTask(bytes32 taskId) external;

Parameters

NameTypeDescription
taskIdbytes32The task to cancel.

Structs

ModuleData

The set of modules (and their ABI-encoded args) attached to a task.

struct ModuleData {
        Module[] modules;
        bytes[] args;
    }

Properties

NameTypeDescription
modulesModule[]
argsbytes[]

Enums

Module

Task module kinds, combined via ModuleData when creating a task.

enum Module {
        RESOLVER,
        DEADLINE,
        PROXY,
        SINGLE_EXEC,
        WEB3_FUNCTION,
        TRIGGER
    }

Variants

NameDescription
RESOLVER
DEADLINE
PROXY
SINGLE_EXEC
WEB3_FUNCTION
TRIGGER