Skip to content

Commit 1d2271e

Browse files
authored
chore: Automate renaming (#101)
* chore: rename main contracts * chore: rename ProxyFactory & ProxyModule * chore: rename integration & example contracts * chore: rename readme & package.json * chore: revert ProxyFactory & ProxyModule renaming * chore: deploy on arbgoerli * chore: deploy on ogoerli * chore: deploy on goerli * chore: deploy on mumbai * chore: deploy on cronos * chore: deploy on moonriver * chore: deploy on moonbeam * chore: deploy on gnosis * chore: deploy on arbitrum * chore: deploy on optimism * chore: deploy on bsc * chore: deploy on avalanche * chore: deploy on fantom * chore: deploy on polygon * chore: deploy on mainnet
1 parent 66a923a commit 1d2271e

132 files changed

Lines changed: 15595 additions & 12185 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Gelato Ops 🍦
1+
# Gelato Automate 🍦
22

33
## Description
44

5-
Automate smart contract executions with Gelato by submitting tasks to `Gelato Ops`
5+
Automate smart contract executions with Gelato by submitting tasks to `Gelato Automate`
66

77
Check out the [Gelato Documentation](https://docs.gelato.network/).
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import {Gelatofied} from "./vendor/gelato/Gelatofied.sol";
88
import {GelatoBytes} from "./vendor/gelato/GelatoBytes.sol";
99
import {Proxied} from "./vendor/proxy/EIP173/Proxied.sol";
10-
import {OpsStorage} from "./OpsStorage.sol";
10+
import {AutomateStorage} from "./AutomateStorage.sol";
1111
import {LibDataTypes} from "./libraries/LibDataTypes.sol";
1212
import {LibEvents} from "./libraries/LibEvents.sol";
1313
import {LibLegacyTask} from "./libraries/LibLegacyTask.sol";
@@ -16,14 +16,14 @@ import {LibTaskModule} from "./libraries/LibTaskModule.sol";
1616
import {
1717
ITaskTreasuryUpgradable
1818
} from "./interfaces/ITaskTreasuryUpgradable.sol";
19-
import {IOps} from "./interfaces/IOps.sol";
19+
import {IAutomate} from "./interfaces/IAutomate.sol";
2020

2121
/**
22-
* @notice Ops enables everyone to have Gelato monitor and execute transactions.
22+
* @notice Automate enables everyone to have Gelato monitor and execute transactions.
2323
* @notice ExecAddress refers to the contract that has the function which Gelato will call.
2424
* @notice Modules allow users to customise conditions and specifications when creating a task.
2525
*/
26-
contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
26+
contract Automate is Gelatofied, Proxied, AutomateStorage, IAutomate {
2727
using GelatoBytes for bytes;
2828
using EnumerableSet for EnumerableSet.Bytes32Set;
2929

@@ -42,7 +42,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
4242
returnData = _handleLegacyTaskCreation(_callData);
4343
}
4444

45-
///@inheritdoc IOps
45+
///@inheritdoc IAutomate
4646
function createTask(
4747
address _execAddress,
4848
bytes calldata _execDataOrSelector,
@@ -66,7 +66,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
6666
);
6767
}
6868

69-
///@inheritdoc IOps
69+
///@inheritdoc IAutomate
7070
function cancelTask(bytes32 _taskId) external {
7171
address _taskCreator = LibTaskModule.preCancelTask(
7272
_taskId,
@@ -77,7 +77,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
7777
_cancelTask(_taskCreator, _taskId);
7878
}
7979

80-
///@inheritdoc IOps
80+
///@inheritdoc IAutomate
8181
function exec(
8282
address _taskCreator,
8383
address _execAddress,
@@ -109,7 +109,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
109109
);
110110
}
111111

112-
///@inheritdoc IOps
112+
///@inheritdoc IAutomate
113113
function setModule(
114114
LibDataTypes.Module[] calldata _modules,
115115
address[] calldata _moduleAddresses
@@ -120,12 +120,12 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
120120
}
121121
}
122122

123-
///@inheritdoc IOps
123+
///@inheritdoc IAutomate
124124
function getFeeDetails() external view returns (uint256, address) {
125125
return (fee, feeToken);
126126
}
127127

128-
///@inheritdoc IOps
128+
///@inheritdoc IAutomate
129129
function getTaskIdsByUser(address _taskCreator)
130130
external
131131
view
@@ -136,7 +136,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
136136
return taskIds;
137137
}
138138

139-
///@inheritdoc IOps
139+
///@inheritdoc IAutomate
140140
function getTaskId(
141141
address taskCreator,
142142
address execAddress,
@@ -153,7 +153,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
153153
);
154154
}
155155

156-
///@inheritdoc IOps
156+
///@inheritdoc IAutomate
157157
function getTaskId(
158158
address taskCreator,
159159
address execAddress,
@@ -189,7 +189,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
189189

190190
require(
191191
!_createdTasks[_taskCreator].contains(taskId),
192-
"Ops.createTask: Duplicate task"
192+
"Automate.createTask: Duplicate task"
193193
);
194194

195195
LibTaskModule.onCreateTask(
@@ -216,7 +216,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
216216
function _cancelTask(address _taskCreator, bytes32 _taskId) private {
217217
require(
218218
_createdTasks[_taskCreator].contains(_taskId),
219-
"Ops.cancelTask: Task not found"
219+
"Automate.cancelTask: Task not found"
220220
);
221221

222222
_createdTasks[_taskCreator].remove(_taskId);
@@ -238,7 +238,7 @@ contract Ops is Gelatofied, Proxied, OpsStorage, IOps {
238238
) private {
239239
require(
240240
_createdTasks[_taskCreator].contains(_taskId),
241-
"Ops.exec: Task not found"
241+
"Automate.exec: Task not found"
242242
);
243243

244244
if (!_useTaskTreasuryFunds) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import {
66
import {LibDataTypes} from "./libraries/LibDataTypes.sol";
77

88
/**
9-
* @notice Storage layout of Ops smart contract.
9+
* @notice Storage layout of Automate smart contract.
1010
*/
1111
// solhint-disable max-states-count
12-
abstract contract OpsStorage {
12+
abstract contract AutomateStorage {
1313
mapping(bytes32 => address) public taskCreator; ///@dev Deprecated
1414
mapping(bytes32 => address) public execAddresses; ///@dev Deprecated
1515
mapping(address => EnumerableSet.Bytes32Set) internal _createdTasks;

contracts/TaskTreasury/TaskTreasuryUpgradable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ contract TaskTreasuryUpgradable is
6767
__ReentrancyGuard_init();
6868
}
6969

70-
/// @notice Function called by whitelisted services to handle payments, e.g. Gelato Ops
70+
/// @notice Function called by whitelisted services to handle payments, e.g. Gelato Automate
7171
/// @param _user Address of user whose balance will be deducted
7272
/// @param _token Token to be used for payment by users
7373
/// @param _amount Amount to be deducted
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import "./Types.sol";
1010
* - Have call restrictions for functions to be automated.
1111
*/
1212
// solhint-disable private-vars-leading-underscore
13-
abstract contract OpsReady {
14-
IOps public immutable ops;
13+
abstract contract AutomateReady {
14+
IAutomate public immutable automate;
1515
address public immutable dedicatedMsgSender;
1616
address private immutable _gelato;
1717
address internal constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
@@ -32,9 +32,9 @@ abstract contract OpsReady {
3232
* @dev
3333
* _taskCreator is the address which will create tasks for this contract.
3434
*/
35-
constructor(address _ops, address _taskCreator) {
36-
ops = IOps(_ops);
37-
_gelato = IOps(_ops).gelato();
35+
constructor(address _automate, address _taskCreator) {
36+
automate = IAutomate(_automate);
37+
_gelato = IAutomate(_automate).gelato();
3838
(dedicatedMsgSender, ) = IOpsProxyFactory(OPS_PROXY_FACTORY).getProxyOf(
3939
_taskCreator
4040
);
@@ -44,7 +44,7 @@ abstract contract OpsReady {
4444
* @dev
4545
* Transfers fee to gelato for synchronous fee payments.
4646
*
47-
* _fee & _feeToken should be queried from IOps.getFeeDetails()
47+
* _fee & _feeToken should be queried from IAutomate.getFeeDetails()
4848
*/
4949
function _transfer(uint256 _fee, address _feeToken) internal {
5050
if (_feeToken == ETH) {
@@ -60,6 +60,6 @@ abstract contract OpsReady {
6060
view
6161
returns (uint256 fee, address feeToken)
6262
{
63-
(fee, feeToken) = ops.getFeeDetails();
63+
(fee, feeToken) = automate.getFeeDetails();
6464
}
6565
}

contracts/integrations/OpsTaskCreator.sol renamed to contracts/integrations/AutomateTaskCreator.sol

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
// SPDX-License-Identifier: UNLICENSED
22
pragma solidity ^0.8.14;
33

4-
import "./OpsReady.sol";
4+
import "./AutomateReady.sol";
55

66
/**
77
* @dev Inherit this contract to allow your smart contract
88
* to be a task creator and create tasks.
99
*/
10-
abstract contract OpsTaskCreator is OpsReady {
10+
abstract contract AutomateTaskCreator is AutomateReady {
1111
using SafeERC20 for IERC20;
1212

1313
address public immutable fundsOwner;
1414
ITaskTreasuryUpgradable public immutable taskTreasury;
1515

16-
constructor(address _ops, address _fundsOwner)
17-
OpsReady(_ops, address(this))
16+
constructor(address _automate, address _fundsOwner)
17+
AutomateReady(_automate, address(this))
1818
{
1919
fundsOwner = _fundsOwner;
20-
taskTreasury = ops.taskTreasury();
20+
taskTreasury = automate.taskTreasury();
2121
}
2222

2323
/**
@@ -49,7 +49,7 @@ abstract contract OpsTaskCreator is OpsReady {
4949
address _feeToken
5050
) internal returns (bytes32) {
5151
return
52-
ops.createTask(
52+
automate.createTask(
5353
_execAddress,
5454
_execDataOrSelector,
5555
_moduleData,
@@ -58,7 +58,7 @@ abstract contract OpsTaskCreator is OpsReady {
5858
}
5959

6060
function _cancelTask(bytes32 _taskId) internal {
61-
ops.cancelTask(_taskId);
61+
automate.cancelTask(_taskId);
6262
}
6363

6464
function _resolverModuleArg(

contracts/integrations/Types.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct ModuleData {
1313
bytes[] args;
1414
}
1515

16-
interface IOps {
16+
interface IAutomate {
1717
function createTask(
1818
address execAddress,
1919
bytes calldata execDataOrSelector,

contracts/integrations/examples/contractCreator/withTreasury/CounterResolverTaskCreator.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// SPDX-License-Identifier: UNLICENSED
22
pragma solidity ^0.8.0;
33

4-
import "../../../OpsTaskCreator.sol";
4+
import "../../../AutomateTaskCreator.sol";
55

66
/**
77
* @dev
88
* Example contract that creates a resolver task.
99
*/
1010
// solhint-disable not-rely-on-time
1111
// solhint-disable no-empty-blocks
12-
contract CounterResolverTaskCreator is OpsTaskCreator {
12+
contract CounterResolverTaskCreator is AutomateTaskCreator {
1313
uint256 public count;
1414
uint256 public lastExecuted;
1515
bytes32 public taskId;
@@ -18,8 +18,8 @@ contract CounterResolverTaskCreator is OpsTaskCreator {
1818

1919
event CounterTaskCreated(bytes32 taskId);
2020

21-
constructor(address _ops, address _fundsOwner)
22-
OpsTaskCreator(_ops, _fundsOwner)
21+
constructor(address _automate, address _fundsOwner)
22+
AutomateTaskCreator(_automate, _fundsOwner)
2323
{}
2424

2525
function createTask() external {

contracts/integrations/examples/contractCreator/withTreasury/CounterSingleExecTaskCreator.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// SPDX-License-Identifier: UNLICENSED
22
pragma solidity ^0.8.0;
33

4-
import "../../../OpsTaskCreator.sol";
4+
import "../../../AutomateTaskCreator.sol";
55

66
/**
77
* @dev
88
* Example contract that creates a single exec task.
99
*/
1010
// solhint-disable not-rely-on-time
1111
// solhint-disable no-empty-blocks
12-
contract CounterSingleExecTaskCreator is OpsTaskCreator {
12+
contract CounterSingleExecTaskCreator is AutomateTaskCreator {
1313
uint256 public count;
1414
uint256 public lastExecuted;
1515
bytes32 public taskId;
@@ -18,8 +18,8 @@ contract CounterSingleExecTaskCreator is OpsTaskCreator {
1818

1919
event CounterTaskCreated(bytes32 taskId);
2020

21-
constructor(address _ops, address _fundsOwner)
22-
OpsTaskCreator(_ops, _fundsOwner)
21+
constructor(address _automate, address _fundsOwner)
22+
AutomateTaskCreator(_automate, _fundsOwner)
2323
{}
2424

2525
function createTask() external {

contracts/integrations/examples/contractCreator/withTreasury/CounterTimeTaskCreator.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// SPDX-License-Identifier: UNLICENSED
22
pragma solidity ^0.8.0;
33

4-
import "../../../OpsTaskCreator.sol";
4+
import "../../../AutomateTaskCreator.sol";
55

66
/**
77
* @dev
88
* Example contract that creates a time task.
99
*/
1010
// solhint-disable not-rely-on-time
1111
// solhint-disable no-empty-blocks
12-
contract CounterTimeTaskCreator is OpsTaskCreator {
12+
contract CounterTimeTaskCreator is AutomateTaskCreator {
1313
uint256 public count;
1414
uint256 public lastExecuted;
1515
bytes32 public taskId;
@@ -18,8 +18,8 @@ contract CounterTimeTaskCreator is OpsTaskCreator {
1818

1919
event CounterTaskCreated(bytes32 taskId);
2020

21-
constructor(address _ops, address _fundsOwner)
22-
OpsTaskCreator(_ops, _fundsOwner)
21+
constructor(address _automate, address _fundsOwner)
22+
AutomateTaskCreator(_automate, _fundsOwner)
2323
{}
2424

2525
function createTask() external {

0 commit comments

Comments
 (0)