Gelato-automations/deployments/mainnet/solcInputs/32abadde127e3c5f4f727f0b5ec233f4.json

34 lines
12 KiB
JSON
Raw Permalink Normal View History

{
"language": "Solidity",
"sources": {
"contracts/contracts/connectors/ConnectGelato.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity 0.7.4;\npragma experimental ABIEncoderV2;\n\n// solhint-disable\n\n// Gelato Data Types\nstruct Provider {\n address addr; // if msg.sender == provider => self-Provider\n address module; // e.g. DSA Provider Module\n}\n\nstruct Condition {\n address inst; // can be AddressZero for self-conditional Actions\n bytes data; // can be bytes32(0) for self-conditional Actions\n}\n\nenum Operation {Call, Delegatecall}\n\nenum DataFlow {None, In, Out, InAndOut}\n\nstruct Action {\n address addr;\n bytes data;\n Operation operation;\n DataFlow dataFlow;\n uint256 value;\n bool termsOkCheck;\n}\n\nstruct Task {\n Condition[] conditions; // optional\n Action[] actions;\n uint256 selfProviderGasLimit; // optional: 0 defaults to gelatoMaxGas\n uint256 selfProviderGasPriceCeil; // optional: 0 defaults to NO_CEIL\n}\n\nstruct TaskReceipt {\n uint256 id;\n address userProxy;\n Provider provider;\n uint256 index;\n Task[] tasks;\n uint256 expiryDate;\n uint256 cycleId; // auto-filled by GelatoCore. 0 for non-cyclic/chained tasks\n uint256 submissionsLeft;\n}\n\nstruct TaskSpec {\n address[] conditions; // Address: optional AddressZero for self-conditional actions\n Action[] actions;\n uint256 gasPriceCeil;\n}\n\n// Gelato Interface\ninterface IGelatoInterface {\n /**\n * @dev API to submit a single Task.\n */\n function submitTask(\n Provider calldata _provider,\n Task calldata _task,\n uint256 _expiryDate\n ) external;\n\n /**\n * @dev A Gelato Task Cycle consists of 1 or more Tasks that automatically submit\n * the next one, after they have been executed, where the total number of tasks can\n * be only be an even number\n */\n function submitTaskCycle(\n Provider calldata _provider,\n Task[] calldata _tasks,\n uint256 _expiryDate,\n uint256 _cycles\n ) external;\n\n /**\n * @dev A Gelato Task Chain consists of 1 or more Tasks that automatically submit\n * the next one, after they have been executed, where the total number of tasks can\n * be an odd number\n */\n function submitTaskChain(\n Provider calldata _provider,\n Task[] calldata _tasks,\n uint256 _expiryDate,\n uint256 _sumOfRequestedTaskSubmits\n ) external;\n\n /**\n * @dev Cancel multiple tasks at once\n */\n function multiCancelTasks(TaskReceipt[] calldata _taskReceipts) external;\n\n /**\n * @dev Whitelist new executor, TaskSpec(s) and Module(s) in one tx\n */\n function multiProvide(\n address _executor,\n TaskSpec[] calldata _taskSpecs,\n address[] calldata _modules\n ) external payable;\n\n /**\n * @dev De-Whitelist TaskSpec(s), Module(s) and withdraw funds from gelato in one tx\n */\n function multiUnprovide(\n uint256 _withdrawAmount,\n TaskSpec[] calldata _taskSpecs,\n address[] calldata _modules\n ) external;\n}\n\ninterface MemoryInterface {\n function setUint(uint256 _id, uint256 _val) external;\n\n function getUint(uint256 _id) external returns (uint256);\n}\n\nabstract contract Helpers {\n uint256 internal immutable _id;\n\n constructor(uint256 id) {\n _id = id;\n }\n\n /**\n * @dev Return Memory Variable Address\n */\n function getMemoryAddr() internal pure returns (address) {\n return 0x8a5419CfC711B2343c17a6ABf4B2bAFaBb06957F; // InstaMemory Address\n }\n\n /**\n * @dev Set Uint value in InstaMemory Contract.\n */\n function setUint(uint256 setId, uint256 val) internal {\n if (setId != 0) MemoryInterface(getMemoryAddr()).setUint(setId, val);\n }\n\n /**\n * @dev Get Uint value from InstaMemory Contract.\n */\n function getUint(uint256 getId, uint256 val)\n internal\n returns (uint256 returnVal)\n {\n returnVal = getId == 0\n ? val\n : MemoryInterface(get
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.gasEstimates"
],
"": ["ast"]
}
},
"metadata": {
"useLiteralContent": true
}
}
}