GelatoAutomateAdapter
Inherits: IGelatoAutomateAdapter
Title: GelatoAutomateAdapter
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from Gelato (https://github.com/gelatodigital/automate)
Diamond facet for Gelato Automate (Web3 Functions) task management.
Stateless delegator — all logic and storage live in GelatoAutomateAdapterLib.
This facet handles the create/track/cancel layer only. Gelato executes a
created task through a task-creator-specific dedicated msg.sender; consumer
exec entrypoints must gate on it via the library's
requireDedicatedMsgSender guard.
Notes:
- lattice-version: 0.1.0
- lattice-source: Gelato
Functions
getConfig
Returns the current Automate configuration.
function getConfig() external view virtual override returns (address automate, address dedicatedMsgSender);Returns
| Name | Type | Description |
|---|---|---|
| automate | address | The Gelato Automate contract. |
| dedicatedMsgSender | address | The dedicated msg.sender Gelato execs through. |
isTask
Returns whether taskId is tracked by this adapter.
function isTask(bytes32 taskId) external view virtual override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| taskId | bytes32 | The task ID to query. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
setConfig
Sets or replaces the Automate configuration.
Caller must hold DEFAULT_ADMIN_ROLE. Reverts GelatoAutomateInvalidConfig on a zero field.
function setConfig(address automate, address dedicatedMsgSender) external virtual override;Parameters
| Name | Type | Description |
|---|---|---|
| automate | address | The Gelato Automate contract. |
| dedicatedMsgSender | address | The dedicated msg.sender Gelato execs through (derived off-chain via the OpsProxyFactory for this diamond). |
createTask
Creates and tracks a Gelato Automate task.
Caller must hold DEFAULT_ADMIN_ROLE.
function createTask(
address execAddress,
bytes calldata execDataOrSelector,
IGelatoAutomate.ModuleData calldata moduleData,
address feeToken
) external virtual override returns (bytes32 taskId);Parameters
| Name | Type | Description |
|---|---|---|
| execAddress | address | The contract Gelato will call when the task runs. |
| execDataOrSelector | bytes | The calldata (or selector) to run. |
| moduleData | IGelatoAutomate.ModuleData | The modules configuring how/when the task triggers. |
| feeToken | address | The fee token (address(0) for native; off-chain via 1Balance otherwise). |
Returns
| Name | Type | Description |
|---|---|---|
| taskId | bytes32 | The Automate-assigned task ID. |
cancelTask
Cancels and untracks a Gelato Automate task.
Caller must hold DEFAULT_ADMIN_ROLE. Reverts GelatoAutomateTaskNotFound if untracked.
function cancelTask(bytes32 taskId) external virtual override;Parameters
| Name | Type | Description |
|---|---|---|
| taskId | bytes32 | The task to cancel. |
exportSelectors
ERC-8153 selector export: this facet's cuttable selectors, tightly packed (4 bytes each).
Excludes exportSelectors() itself (0x0ef22643) - it is never cut into a diamond. Order matches
forge inspect GelatoAutomateAdapter methodIdentifiers (alphabetical by signature); kept in exact parity by
ExportSelectorsParityTest. Chunks:
cancelTask(bytes32) 0xee8ca3b5
createTask(address,bytes,(uint8[],bytes[]),address) 0x3323b467
getConfig() 0xc3f909d4
isTask(bytes32) 0x0d04218f
setConfig(address,address) 0xb602024b
function exportSelectors() external pure virtual returns (bytes memory selectors);Returns
| Name | Type | Description |
|---|---|---|
| selectors | bytes |